Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Dec 2001 12:38:17 -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:  <20011214122200.N94620-100000@catalyst.sasknow.net>
In-Reply-To: <3C1A41A0.1A54C229@bigstudios.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Sam Suh wrote to Ryan Thompson:

> Ryan Thompson wrote:
> > [...]
> > 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
> > [...]
> >
> > - Ryan
>
> Hi, Ryan. Thanks for the very insightful information. You are
> right. df -i did reveal something I didn't want to see. 4835994
> free inodes with nothing in the disk!

Yep! That sounds about right.


> As you said, I would like to free up the spaces. If it is not too
> much of problem, could you recommend what inode size should be?

It really depends on what you plan to store on the filesystem. This is
really a question of the average file size on the file system.  On the
/var/ partition of my mailserver, the average file size is around
10KB. (To calculate this, just take the "used" column from df and
divide by the "iused" column. On a general user/staff storage
filesystem (home directories, more or less), the average file size
here is about 150KB. If you have a special purpose in mind, your
actual numbers might go outside of these bounds.

A good rule of thumb I use is, if I already have a good idea what the
density is going to be (i.e., I am adding or upgrading a system of
the same type), I'll set the bytes per inode to about half of the
expected value. If my observations were valid, then it is very
unlikely that I'd run out of inodes.

I always try and find some representative sample data. If I don't have
a clue, I'll be much more conservative with bytes per inode... As it
is better to have too many than too few. I have never seen a
filesystem (even very large ones) with 4.5 million files, though...
;-) 16K ( -i 16384) or 32K (-i 32768), or even higher, are usually
safe for many filesystems, but, again, your mileage may vary.

- Ryan





> I am sorry for such a newbie question but I hate to say I didn't
> had to meddle with newfs, beside letting fbsd to do the job ( I
> mean fbsd default all the time ).
>

-- 
  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?20011214122200.N94620-100000>