Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Dec 2001 15:32:22 -0600 (CST)
From:      Ryan Thompson <ryan@sasknow.com>
To:        Sam Suh <sam@bigstudios.com>
Cc:        <freebsd-questions@FreeBSD.ORG>
Subject:   Re: Disk space shrink?
Message-ID:  <20011213152346.S94620-100000@catalyst.sasknow.net>
In-Reply-To: <3C190E14.E0442E28@bigstudios.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Sam Suh wrote to freebsd-questions@FreeBSD.ORG:

> Hi, everyone.
>
> [...]
> on other 3; hence 186 GB. Now, I have it on the freebsd, it only reports
> 164 GB of free space. Why is it happening? In a installation phase, I
> have selected da0a drive and selected use entire drive option.
> [...]

Hi Sam,

Most likely what you are experiencing here is the "minfree" property
of FFS, which, by default, reserves 8% of your filesystem space to
reduce fragmentation. root can write to the unused 8%, so if a root
process fills up a filesystem, you'll typically see 108% used... which
usually begs a lot of questions. :-)

Anyways, on a filesystem of this size, minfree does NOT need to be set
at 8%. You can use tunefs(8) to safely reduce it to 5%. Any lower, and
the kernel will optimize writes for space, which will give you a
performance hit. Some time ago, I wrote a patch for the filesystem
code which will allow you to reduce the minfree setting to below 5%
without the kernel optimizing for time. Let me know if you're
interested, and I'll dig it up.

Also, you are probably wasting a significant amount of space with free
inodes. On a filesystem of this size, you will have, by default, WAY
more inodes than you need. (inode density, by default, is one inode
per 4K..) Check the output of df -i to see how many inodes you have
available. You should be shocked. :-) You'll have to remake the
filesystem to reduce this... use the -i option to newfs and specify a
much higher value for bytes per inode.

- Ryan

-- 
  Ryan Thompson <ryan@sasknow.com>
  Network Administrator, Accounts

  SaskNow Technologies - http://www.sasknow.com
  #106-380 3120 8th St E - Saskatoon, SK - S7H 0W2

        Tel: 306-664-3600   Fax: 306-664-1161   Saskatoon
  Toll-Free: 877-727-5669     (877-SASKNOW)     North America


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011213152346.S94620-100000>