[clug] Kernel without initramfs
Daniel Pittman
daniel at rimspace.net
Fri Mar 27 00:19:04 GMT 2009
Robert Edwards <bob at cs.anu.edu.au> writes:
> Daniel Pittman wrote:
> ...
>>
>> My guess is that you mention it to emphasise the "avoid writes",
>> together with your claim that ext3 journalling causes a "fantastic"
>> number of writes, correct?
>
> Would it be wrong to guess that journalling (ext3 style) would
> increase the number of writes by a factor of a little over 2?
Apropos the topic, I have some actual facts to bring to this discussion,
since Theodore Ts'o has just gone and published his testing in the area.
http://thunk.org/tytso/blog/2009/03/01/ssds-journaling-and-noatimerelatime/
> Each write to fs would involve a preliminary write to the journal.
> Every now and then (1 sec., 5 secs, whatever) the journal needs to be
> cleared. Or is this a little too simplistic?
Significantly: every *metadata* operation needs to pass through the
journal, more or less, and the journal needs to be flushed when full,
but the costs of that are significantly lower.
(See the article for details of the operations, but the dataset is a
regular Linux kernel git repository and source tree.)
Amount of data written (in megabytes) on an ext4 filesystem
Operation with journal w/o journal percent change
git clone 367.7 353.0 4.00%
make 231.1 203.4 12.0%
make clean 14.6 7.7 47.3%
Amount of data written (in megabytes) on an ext4 filesystem
mounted with noatime
Operation with journal w/o journal percent change
git clone 367.0 353.0 3.81%
make 207.6 199.4 3.95%
make clean 6.45 3.73 42.17%
Metadata heavy workloads — delete a lot of stuff, specifically, which
*really* sucks on ext3 in terms of I/O writes — might cost close to
twice as much, but normal workloads are vastly better.
> A more important consideration for ext2 or 3 or most other r/w fs's on
> a flash device is to turn off access-time updates to inode metadata.
*nod* That makes a significant difference in the 'make' case, and a
non-trivial difference in the other two cases.
> This is obvious, but I might regain some kudos by grabbing the
> low-hanging fruit... :-) Turn off access-time updates by specifying
> "noatime" in the mount options in fstab (usually).
No, that is good advice, and as discussion on the Linux kernel list
today shows, it *NEEDS* to be emphasised to people, because most
distributions don't disable it (or use relatime) by default.
Regards,
Daniel
More information about the linux
mailing list