From mboxrd@z Thu Jan 1 00:00:00 1970 From: ron minnich To: 9fans@cse.psu.edu Subject: Re: [9fans] Rstat needs three size fields? In-Reply-To: <009d01c3454a$2b1ca5a0$d2944251@insultant.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Date: Tue, 8 Jul 2003 08:14:40 -0600 Topicbox-Message-UUID: ef0beeba-eacb-11e9-9e20-41e7f4b1d025 On Tue, 8 Jul 2003, boyd, rounin wrote: > > Another common strategy that I've used is to double up until to > > threshold, and then extend by a constant chunk size after that. For > > instance, you might double things until you get to, say, a megabyte, > > and then add on a megabyte after that. > > yeah, that's not a bad idea, but it depends on what you're trying to > allocate etc ... defining the 'threshold' and the 'chunk size' is the > hard part. If the stuff is files, you can depend on some things. Every time I check a file system I find the lovely bimodal size distribution. You can start with 32K or some nominal such size and you'll cover most of the files; past that point things are "big" so you can start allocating reasonably big chunks. That's how I've done it anyways, unless I pre-computed the size. ron