linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Theodore Tso <tytso@mit.edu>
To: Jan Engelhardt <jengelh@medozas.de>
Cc: Eric Sandeen <sandeen@redhat.com>,
	linux-ext4@vger.kernel.org, kzak@redhat.com
Subject: Re: mkfs.ext4: high default -i value undocumented
Date: Tue, 3 Mar 2009 21:49:04 -0500	[thread overview]
Message-ID: <20090304024904.GK32284@mit.edu> (raw)
In-Reply-To: <alpine.LSU.2.00.0903040125410.12894@fbirervta.pbzchgretzou.qr>

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

  parent reply	other threads:[~2009-03-04  2:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-03 23:12 mkfs.ext4: high default -i value undocumented Jan Engelhardt
2009-03-03 23:19 ` Eric Sandeen
2009-03-04  0:36   ` Jan Engelhardt
2009-03-04  0:43     ` Eric Sandeen
2009-03-04  0:57       ` Jan Engelhardt
2009-03-04  2:49     ` Theodore Tso [this message]
2009-03-04  3:11       ` Jan Engelhardt
2009-03-09 14:17   ` Goswin von Brederlow
2009-03-09 15:56     ` Eric Sandeen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090304024904.GK32284@mit.edu \
    --to=tytso@mit.edu \
    --cc=jengelh@medozas.de \
    --cc=kzak@redhat.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=sandeen@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).