From: DervishD <lkml@dervishd.net>
To: Helge Hafting <helgehaf@aitel.hist.no>
Cc: Linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: ext2 optimal partition size
Date: Sun, 15 May 2005 19:14:37 +0200 [thread overview]
Message-ID: <20050515171437.GC248@DervishD> (raw)
In-Reply-To: <20050515164307.GB26197@hh.idb.hist.no>
Hi Helge :)
* Helge Hafting <helgehaf@aitel.hist.no> dixit:
> On Sun, May 15, 2005 at 06:00:37PM +0200, DervishD wrote:
> > Hi all :)
> >
> > Let's assume I want to partition a hard disk so the partition
> > size is optimal for a given block size and bytes per inode ratio in
> > an ext2/ext3 filesystem. By 'optimal' I mean that no space in the
> > partition is wasted, that is, the metadata and the data blocks fit
> > perfectly in the partition, and no space is left unused because that
> > space is less than a data block.
> >
> > For example, if disk structures occupy 1024 bytes and each data
> > block is 1024 bytes too, the partition size must be a multiple of
> > 1024: if I allocate 2049 bytes for the partition, then one byte will
> > be lost because ext2/3 cannot have blocks smaller than the block
> > size.
> >
> > So: which is the optimal partition size for a given block size
> > and a given bytes per inode ratio? Can it be easily calculated?
> >
> You can't allocate 2049 bytes for a partition - it is always a
> whole number of 512-byte blocks.
That's was just an example, and anyway I can create an ext2/3
filesystem on a file.
> Just make sure your partition is a whole number of blocks,
> ext2/ext3 should then be able to utilize the partition fully to the
> last block.
Do that means that metadata (disk structures, block groups
structs and the like) all fits in block-size chunks???
> Using a blocksize equal to the pagesize (i.e. 4096) is usually optimal.
Thanks, I'll try it :) My main doubt was if the metadata was
managed in block-sized chunks, it seems so.
Raúl Núñez de Arenas Coronado
--
Linux Registered User 88736 | http://www.dervishd.net
http://www.pleyades.net & http://www.gotesdelluna.net
It's my PC and I'll cry if I want to...
next prev parent reply other threads:[~2005-05-15 17:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-15 16:00 ext2 optimal partition size DervishD
2005-05-15 16:43 ` Helge Hafting
2005-05-15 17:14 ` DervishD [this message]
2005-05-16 22:01 ` Helge Hafting
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=20050515171437.GC248@DervishD \
--to=lkml@dervishd.net \
--cc=helgehaf@aitel.hist.no \
--cc=linux-kernel@vger.kernel.org \
/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