[clug] Tips for improving ext3 performance

Chris Smart chris at kororaa.org
Thu Jul 3 20:44:06 GMT 2008


On Thu, 2008-07-03 at 15:02 +1000, Daniel Pittman wrote:
> "Chris Smart" <chris at kororaa.org> writes:
> 
> > Been reading up a little about this lately, does anyone out there have
> > any tips or suggestions for improving ext3 performance for a desktop
> > machine?
> >
> > Some things that come to mind are changing the journal type, 
> 
> Use the largest journal size, and a longer commit interval, to reduce
> contention and stalls due to journal writes or flushing for space.
> 
> The commit interval increases your risk window for data loss, so don't
> just raise it blindly, think about what you can afford.

Should be sweet so long as I have a UPS on the machine.

> 
> > changing atime, 
> 
> Using noatime, or relatime, will significantly reduce the number of
> inode writes on access, which will in turn reduce journal load, and so
> improve performance.

Yes, I think the desktop could get away with noatime, but at the least
relatime would be fine.

> 
> > using a stride size when using raid and offsetting the partition start
> > to align with stripe.
> 
> This should just come by magic, since the mkfs tools interrogate the
> underlying RAID for details.  (As I understand it, with a sufficiently
> recent version, etc, etc, which should be "it just works" today.)

Interesting.. got any links to back that up? 'Cause I don't know how to
check that once a filesystem has been applied, unlike things like the
journal.

> 
> > Anyone had a play with this sort of thing?
> 
> If you can, placing the journal on an external device will deliver a
> much, much bigger performance boost that these other changes.  It allows
> your data and metadata writes to occur in parallel.

Ok, that should introduce some sort of bottleneck at some stage, perhaps
on a large RAID0 system or something, whereby you can write lots of data
on the stripe in parallel, but only have a single disk to write all of
that data's journal. Of course I have no idea how fiddly the journal
data is, how slow it is to write. It would certainly improve a single
drive system, I wonder where the benefit would be lost. But having the
journal data on a separate device is interesting.

> 
> If you have an underlying RAID mirror an external bitmap can also
> achieve performance gains in some cases.

Yeah, just thinking that.

Cheers
-c



More information about the linux mailing list