Re: determining the bytes-per-inode (mke2fs) value



joysons3@xxxxxxxxx writes:

Hi all,
I have a running diskarray serving as a Astronomical data server
disk. The data set is basically huge from the raido telescope, but
some others are small (descriptions). Now there will be a new
diskarray (and will copy the current one to the new) and I am
formatting this new one by mke2fs. I was told that ext3 filesystem can
be finetunned at the bytes-per-inode value according to the real file
size situations, to be 4k, 8k, 1M, 4M,,,,etc.

Now my question is: is there a benchmark method that I can run it on
my current running diskarray, and report/suggest how big the bytes-per-
inode shall be? so that I can setup the new array (mke2fs it)
accordingly?

This is a very simple calculation. Use the df command to obtain the metrics of your current partition.

First, use 'df -i' to give you an inode count:

df -i /dev/md1
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/md1 4333280 258899 4074381 6% /

So, I have 258899 inodes on this partition. Next, use 'df' to get its size:

# df /dev/md1
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/md1 34067996 22772088 9565312 71% /

So, I have about 22 GB of data on this partition. Simple math shows me that I'm using up about 90000 bytes per inode.

inodes are cheap, and take up little space. You're better off overestimating how many you need, then not. If you run out of inodes, you can't do anything else with this partition.

If you anticipate that you'll be using, say, 64KB per inode, divide that by 4, and format the partition using 16gb per inode.


Attachment: pgpDXA1JMgfb1.pgp
Description: PGP signature



Relevant Pages