[comp.sys.sun] newfs: decreasing bytes/inode

jjb@zeus.cs.wayne.edu (Jon J. Brewster) (02/23/89)

Both newfs and mkfs have a parameter which is supposed to allow the user
to vary the number of inodes created in a filesystem.  However, it appears
that the parameter has no effect, judging from the output of the command
-- bytes/inode seems to be pegged at 2048.  Does anyone know if this is
true?  (I.e., is it perhaps only the informational message that's fixed at
2048?  Slim hope, I know.)  We run out of inodes at about 60% utilization
on this one filesystem (/usr/spool/news) and decreasing the bytes/inode
seems the only remedy.  Oh, we're running 4.0 on Sun-3's.

hedrick@geneva.rutgers.edu (Charles Hedrick) (03/06/89)

Yet another person is running out of inodes on /var because of news.  Yes,
bytes per inode can't be taken below 2048.  If you look at the source for
mkfs you'll find all sorts of complex relationships among the parameters,
because of the data structures used on the disk.  So only certain
combinations of parameters are possible.  If you try to set a parameter
that isn't possible, it ignores you.  it turns out that the easiest way to
get more inodes is to set cylinders per group to 8 (down from a default of
16).

mangler@csvax.caltech.edu (Don Speck) (03/23/89)

This is the Most Frequently Asked Question on comp.sys.sun.

Try the "-c 8" option to newfs.  On some disks (such as 688MB and 892MB
drives) you will also have to use a smaller blocksize, which you should do
anyway if you intend to create lots of small files.

drk@twinkie.rational.com (David R. Kaelbling) (04/05/89)

I tried reducing the block size in my file systems (so that I could reduce
the #cyl/group, so that I could get more inodes).  Whenever I ran a binary
out of the partition in question the system printed a disturbing message
to the effect that paging was disabled because of the small block size.
You might want to consider this before rebuilding all of your partitions.

	David
David Kaelbling                                       (408) 496-3600
c/o Rational; 3320 Scott Boulevard; Santa Clara, CA       95054-3197
drk@Rational.COM, drk@igor.uu.net, ...!{uunet,ubvax,amdcad}!igor!drk

kre@uunet.uu.net (Robert Elz) (04/26/89)

Don't decrease the block size (on a sun at least), paging requires that
blocks be at least as big as pages (8k on sun 3's and up).

However there's nothing at all that says that any of the other parameters
in disktab *must* relate in any way at all to the drive you're using.

You will (may) get better performance if they do, but that's all the
difference they make.  If the difference is between 5% or 10% performance
on must huge filesystems (/usr/spool/news and user type filesystems rather
than /tmp or /usr) and not having enough inodes to be able to put all the
files that need to be there in the filesystem, I know which I'm going to
choose...

Change the number of sectors, the number of tracks, the number of
cylinders so they end end up multiplying to the right number of blocks, or
close to it, and until you can get enough inodes to survive.

If you can, halve the number of tracks or sectors, and double the number
of cylinders, that will give minimum performance loss, but anything will
do.

kre