[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ext3 inode_ratio

damacus wrote:
> In /etc/mke2fs.conf on Ubuntu 8.04, the defaults are:
>         base_features = sparse_super,filetype,resize_inode,dir_index,ext_attr
>         blocksize = 4096
>         inode_size = 128
>         inode_ratio = 16384
> But if you set -T largefile on mke2fs, it changes inode_ratio to 1048576.
> Google hasn't been very helpful.  Does anyone know what inode_ratio is
> a ratio of and its effects?
 From the mkfs.ext3 man page... :)

*-i*/ bytes-per-inode/
    Specify the bytes/inode ratio. *mke2fs* creates an inode for every
    /bytes-per-inode/ bytes of space on the disk. The larger the
    /bytes-per-inode/ ratio, the fewer inodes will be created. This
    value generally shouldn't be smaller than the blocksize of the
    filesystem, since then too many inodes will be made.

That parameter, IIRC, is fed to mkfs.ext3 as -i's argument.  
Specifically, -T largefile is a shortcut for using one inode per MB.  1 
MB is 1024 KB.  1024*1024 is 1048576 bytes.

The effect of changing that is that you either get more space used for 
inodes, allowing a lot of small files, or fewer inodes which use less 
space, but only allowing a few very large files.

Using something like reiserfs or xfs avoids that whole silly problem. ;)


To unsubscribe, send email to majordomo@luci.org with
"unsubscribe luci-discuss" in the body.