Article View: cu.decstation.managers
Article #968SUMMARY: more inodes
From: Kent Adams
Date: Wed, 08 Nov 1995 00:00
Date: Wed, 08 Nov 1995 00:00
172 lines
7954 bytes
7954 bytes
Original Question:
We have an Ultrix system running ULTRIX V4.4 (Rev. 69) System #59: Mon Feb
27 17:43:19 +1000 1995 UWS V4.4 (Rev. 11) which is used as a news server.
Have recently set aside an rz28 for the purpose of news and we're now
running out of inodes. Testing on another filesystem using the -i option
to newfs doesn't give us what we want??? Using default(2048) we get 22524
inodes and using -i 1024 we still get 22524. Help appreciated.
This explains:
First of all vanilla newfs...
nurk # newfs -v /dev/rrz2a rz56
Warning: partition table overriding /etc/disktab
/etc/mkfs /dev/rrz2a 131072 54 15 8192 1024 16 10 60 2048 t
Warning: 148 sector(s) in last cylinder unallocated
/dev/rrz2a: 131072 sectors in 162 cylinders of 15 tracks, 54 sectors
67.1Mb in 11 cyl groups (16 c/g, 6.64Mb/g, 2048 i/g)
super-block backups (for fsck -b#) at:
32, 13056, 26080, 39104, 52128, 65152, 78176, 91200, 104224, 117248, 130272,
installing boot code
sector 0 boot + 1st level boot = /usr/mdec/bootblks
nurk # mount /dev/rz2a /mnt
nurk # df -i /mnt
Filesystem Total kbytes kbytes % inodes inodes %
node kbytes used free used used free used Mounted on
/dev/rz2a 62527 9 56266 0% 4 22524 0% /mnt
^^^^^
then
with -c #cylinders/group and -i number of bytes per inode changed from
defaults of 16 and 2048 shown above.
nurk # newfs -v -c 8 -i 512 /dev/rrz2a rz56
Warning: partition table overriding /etc/disktab
/etc/mkfs /dev/rrz2a 131072 54 15 8192 1024 8 10 60 512 t
Warning: 148 sector(s) in last cylinder unallocated
/dev/rrz2a: 131072 sectors in 162 cylinders of 15 tracks, 54 sectors
67.1Mb in 21 cyl groups (8 c/g, 3.32Mb/g, 2048 i/g)
super-block backups (for fsck -b#) at:
32, 6576, 13120, 19664, 26208, 32752, 39296, 45840, 52384, 58928,
65472, 72016, 78560, 85104, 91648, 98192, 103712, 110256, 116800, 123344,
129888,
installing boot code
sector 0 boot + 1st level boot = /usr/mdec/bootblks
nurk # mount /dev/rz2a /mnt
nurk # df -i /mnt
Filesystem Total kbytes kbytes % inodes inodes %
node kbytes used free used used free used Mounted on
/dev/rz2a 59807 9 53818 0% 4 43004 0% /mnt
^^^^^
Voila! More explanation below.
Thanks to:
***From: Grant Ward <gaward@cssip.edu.au>
***From: George Scott <george@moa.cc.monash.edu.au>
***From: Gary Watts <itugiw@tinker.Levels.UniSA.Edu.Au>
It should be possible by changing the number of cylinders in a cylinder group.
By doing this you will increase the number of cylinder groups and hence the
number of inodes. Total inodes = inodes/cylinder groug * cylinder groups
To do this use the -c option on newfs.
ie
ntx> newfs -N -c 8 -i 512 /dev/rrz2c rz25
Warning: partition table overriding /etc/disktab
Warning: inode blocks/cyl group (48) >= data blocks (9) in last
cylinder group. This implies 144 sector(s) cannot be allocated.
/dev/rrz2c: 1299024 sectors in 2328 cylinders of 9 tracks, 62 sectors
665.1Mb in 291 cyl groups (8 c/g, 2.29Mb/g, 2048 i/g)
giving us 565968 inodes as opposed to
ntx> newfs -N -i 512 /dev/rrz2c rz25
Warning: partition table overriding /etc/disktab
Warning: 414 sector(s) in last cylinder unallocated
/dev/rrz2c: 1299168 sectors in 2329 cylinders of 9 tracks, 62 sectors
665.2Mb in 146 cyl groups (16 c/g, 4.57Mb/g, 2048 i/g)
299008 inodes obtained using the defaults.
***From: Bevin.Steer@unisa.edu.au
***From: Andrea Zuccollo <andrea@ing.unico.it>
***From: Brian Sherwood <sherwood@esu.edu>
***From: swift@cyyoung.ece.psu.edu
***From: "Philip J. Tait" <b12635@phxase.allied.com>
This is what I used:
Dear Dr. File System,
I need more inodes for my News spool, but when I try to use the -i
option of newfs(8), I still get the same number. What's wrong?
Out of Inodes.
Dear Out of Inodes.
The version of the Berkeley Fast File system used by the
ULTRIX Operating System has a limit of 2048 inodes per
cylinder group. This limit is the constant MAXIPG in the
include file /usr/include/ufs/fs.h.
When newfs/mkfs runs it attempts to allocate enough inodes
so that there are enough for an average file size of 2 KB.
(bytes per inode = 2048). When there are enough cylinder
groups this is easy. In fact, if the cylinder group is small
enough, it may not get close to the MAXIPG limit.
But over the years, disks have gotten bigger. They have
more cylinders, more tracks and the tracks have more sectors.
As a result cylinder groups are larger and it's hard to
allocate enough inodes to meet the 2048 bytes per inode
limit, with only MAXIPG available. Since MAXIPG is fixed
the effective average file size goes up.
On a News spool tree, the average file probably is around
or less than 2 KB. As a result, these large cylinder disks
don't have enough inodes for the typical file size, and, more
importantly, you can't get more, since you're already at the
MAXIPG limit. At least not easily.
But there are some solutions available...
Theme of solutions:
Inodes are allocated on a cylinder group basis.
Want more inodes, use more cylinder groups.
1. Use fewer cylinders per group, thus getting more groups.
See the -c option of newfs(8).
Note: On the 2nd hand advice of Gregory Neil Shapiro
(gshapiro@wpi.wpi.edu) there are some disks for which
the -c option won't work because mkfs(8) enforces a set
of cylinder group sizes that won't allow reducing the
number cylinders per below the default of 16. This seems
to be the case for the RZ57 and RZ58.
2. Use a different file system block and fragment size; 4K/512a
instead of the usual 8K/1K. In the case of News this may work
best. Since most files are small, using the smaller size may
help reflect the smaller average file size. It may also waste
less space in partially filled fragments.
3. Lie about the geometry. If the track length or tracks
per cylinder is nice factorable number, reduce one to
increase the effective number of cylinders. By playing
games with the factors of the geometry you manage to keep
the geometry approximately the same.
For some disks this may not matter and you can invent whatever
lie you want. For example; the RZ58 uses zoned based recording
(banding). Depending on where you are on the disk, there will
more or less sectors per track. The single geometry presented
by ULTRIX is a convient lie.
--
Alan Rollow alan@nabeth.cxo.dec.com
--
Regards, Kent Adams, System Unit Manager, Computer Centre, JCUNQ
.O O Kent Adams email: Kent.Adams@jcu.edu.au
o/ O O Phone:+61 77 814255 Snail: Computer Centre
./| O O Fax:+61 77 815230 James Cook University
_/_\ O O Townsville..4811
O O Australia
O olleyball.................................................
Technical Details
Message-ID:
<815890268.9066@news.Colorado.EDU>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1065d6,f4b758b4ffaf0098,start X-Google-Attributes: gid1065d6,public From: Kent Adams <Kent.Adams@jcu.edu.au> Subject: SUMMARY: more inodes Date: 1995/11/08 Message-ID: <815890268.9066@news.Colorado.EDU> X-Deja-AN: 119008428 distribution: cu sender: daemon@lace.Colorado.EDU followup-to: poster content-type: TEXT/PLAIN; charset=US-ASCII x-note1: message-id generated by recnews x-note2: mail msgid was <Pine.OSF.3.91.951109140455.13170A-100000@helpdesk.jcu.edu.au> organization: University of Colorado at Boulder mime-version: 1.0 reply-to: Kent Adams <Kent.Adams@jcu.edu.au> newsgroups: cu.decstation.managers