Re: mkfs.ext4: high default -i value undocumented

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

 



On Wed, Mar 04, 2009 at 01:36:44AM +0100, Jan Engelhardt wrote:
> >> 
> >> Creating an ext4 filesystem on a 4 GB image file (to be loop-mounted 
> >> later) gives me 256K inodes. Choosing -i 4096 instead gives 1M, which 
> >> would mean the default for -i is 16384. 
> >
> >Which part of a 16384-data-bytes-to-inode-count ratio do you find
> >unreasonable?  Do you find it unreasonably high, or unreasonably low?
> 
> I think it's a bit too high, causing the amount of usable inodes
> to be a bit too low.

So out of curiosity, what are you storing on the filesystem such that
you're worried about running out of inodes?  The assumption was that
on most filesystems the average file size would indeed be bigger than
4k these days, although obviously things will vary depending on what
you plan to store.  Even if you're using maildir stores, or squid
caches, it seemed like 16k was a good default.

> >> does not mention this 16384 default.
> >> Hope this can be addressed.
> >
> >You could send a patch :)

The problem is the default isn't as simple as 16384.  See the
description under the -T option:

      -T usage-type[,...]
              Specify how the filesystem is going to be used, so  that  mke2fs
              can  choose  optimal  filesystem  parameters  for that use.  The
              usage types that are supported are defined in the  configuration
              file  /etc/mke2fs.conf(5).   The  user  may  specify one or more
              usage types using a comma separated list.

              If this option is is not specified, mke2fs will  pick  a  single
              default  usage  type  based  on the size of the filesystem to be
              created.  If the filesystem size is less  than  or  equal  to  3
              megabytes,  mke2fs  will use the filesystem type floppy.  If the
              filesystem size is greater than 3 but less than or equal to  512
              megabytes,  mke2fs(8) will use the filesystem small.  Otherwise,
              mke2fs(8) will use the default filesystem type default.


So for example, if you say "-T news" the default mke2fs.conf file will
cause the default inode ratio to be 4096.  (As I said, that's probably
not right, since the average size for Usenet spools is probably way
over 8k these days; the fact that -T news uses a default inode ratio
of 4096 is historic, and dates back to before p0rn sites dropped huge
numbers of uuencoded image files in the alt.* hierarchy.  :-)

As another example, if the file is smaller that 512 megabytes, the
"small" type will be used, and that causes the default inode ratio to
be 4096, the inode size to be 128, and the block size to be 1024.

   	     	   	      	   - Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux