[comp.unix.aux] I want my i-nodes

herbw@wiskit.pdx.com (Herb Weiner) (11/28/90)

--------
After running smoothly for almost two weeks, I ran out of i-nodes in
my /usr/spool/news partition.  (There was still plenty of disk space.)
That seemed strange, I thought, since I had formatted the partition
with "newfs -i 1024", which should have provided plenty of i-nodes.

WRONG! When I checked the numbers, I actually had approximately one
i-node for every 4K bytes.

It turns out that newfs apparently has a limit of 2048 i-nodes per
cylinder group.  With a high capacity hard drive (lots of sectors
per track and lots of tracks per cylinder), the limit of 2048 becomes
a significant limitation.

I reformatted my partition with only 8 cylinders per cylinder group
(the default is 16 cylinders per group), effectively doubling the
number of available i-nodes, but this is a hard limit.  newfs will
not allow me to reduce the number of cylinders per group below 8.

Now I wonder whether there is a better way.  Is a blocksize of 4096
(the minimum allowable with BSD file systems on A/UX) wasteful for
a news spool partition?  A SYS V file system doesn't appear to be
the solution, since it has a limit of 65,500 i-nodes -- far too low.

I look forward to hearing how others have solved this problem.

Herb Weiner (herbw@wiskit.pdx.com)

liam@cs.qmw.ac.uk (William Roberts) (12/03/90)

In <1990Nov28.150821.398@wiskit.pdx.com> herbw@wiskit.pdx.com (Herb Weiner) 
writes:

>Now I wonder whether there is a better way.  Is a blocksize of 4096
>(the minimum allowable with BSD file systems on A/UX) wasteful for
>a news spool partition?

No, 4096 for a block isn't wasteful, because BSD filesystems actually 
allocate space for a file as (N Blocks + M "frags") where the frag size is 
smaller than the block size: it defaults to 1024 bytes, so a 2000 byte file 
would be allocated as 0 blocks + 2 frags. There are extra free-lists for 
different sized contiguous free frag groups (1 frag, 2 frags or 3 frags).
I have heard it said that smaller block sizes were a good thing for /tmp 
filestores - A/UX doesn't provide the bsd "dumpfs" utility which would tell
you more about the BSD filesystem that you could ever have wished to know, 
including what sizes you everr got.

For what it's worth, the bytes-per-inoe figure can be increased: my root
partition is small and has lots of large files, so I increased to to help 
squeeze in a few more Kbytes whilst still leaving space for a whole spare 
kernel (autoconfig - I hate you!). Df says:

% df -t /
/          /dev/dsk/c0d0s0          1459 blocks    1000 i-nodes
                         total    19823 blocks    1920 i-nodes

So that must be about 5k per inode...? Maybe it didn't work after all?
>I look forward to hearing how others have solved this problem.

>Herb Weiner (herbw@wiskit.pdx.com)
--

William Roberts                 ARPA: liam@cs.qmw.ac.uk
Queen Mary & Westfield College  UUCP: liam@qmw-cs.UUCP
Mile End Road                   AppleLink: UK0087
LONDON, E1 4NS, UK              Tel:  071-975 5250 (Fax: 081-980 6533)