From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,5bb635386d5a6db4 X-Google-Attributes: gid1164f8,public From: bland@umich.edu (Peyton Bland) Subject: Re: Q: disk minfree & tunefs Date: 1996/12/16 Message-ID: #1/1 X-Deja-AN: 204417295 distribution: world references: organization: Univ. of Mich., Dept. of Radiology followup-to: comp.sys.dec newsgroups: comp.sys.dec Alan Rollow was kind enough to e-mail the following info to me which is posted here with his permission. Peyton ---------------------- begin mail msg ---------------------- Date: Sun, 15 Dec 1996 23:03:57 -0700 From: alan@nabeth.cxo.dec.com (Alan Rollow - Dr. File System's Home for Wayward Inodes.) To: bland@umich.edu Subject: Re: Q: disk minfree & tunefs Newsgroups: comp.sys.dec Organization: Digital Equipment Corp., Colorado Springs, CO. >I don't want to make it 0% - maybe more like 2%. Any comments or >experience on this? For a disk that large 1-2% is probably safe. The space allocation algorithms depend on being able to find free space quickly. Other- wise it can a relatively long time to find free space (it uses a linear search as the last reort when searching) which in turn affects read access time. With more free space available to chose from it is fairly easy to find space. >Also, what about the -o option? What are the legal >values ("time" or "space" as shown on the newfs man page?) "time" and "space" are the only values. It determines how small amounts of space get allocated. For files less than the file system block size or the ends of files until all the direct blocks are used (96 KB), the file system has two choices; only allocate a fragment at the beginning of a block or allocate any fragment that is the right size. When you allocate a fragment of the right size no matter where, you'll get better space usage since it allows fragments to do the job they were intended. The problem is that when one of these fragments grows and there isn't space at the end of the fragment, or it grows into a whole block, it may have to copied somewhere. You get better space usage at the cost of time. When you chose the other all fragments are aligned at the beginning of a block so that when it grows it uses the space there and doesn't have to copy the block; time saved for space wasted. >and how does this interact (if at all) with minfree? Good question, since it does. Given the right conditions, the file system code will switch from one to the other. I've never quite figured out the conditions and it seems to switch very easily. I think part of the problem is that the switch was designed around the time that people might have actually used minfree files *larger* than 10%. Since modern disks can use smaller values, the switch over is very easy to trigger and nearly worthless if you want it to stay in (what the file system thinks is) the "wrong" mode. -- Alan Rollow alan@nabeth.cxo.dec.com