cost of tdb transactions on ext4 with barriers

tridge at samba.org tridge at samba.org
Thu Feb 11 17:39:45 MST 2010


Hi Rusty,

I put a new disk in my laptop today, and thought I'd give ext4 a go
(on a 2.6.31-19 Ubuntu karmic kernel).

I found that some of the ldb and tdb tests were massively slower on
ext4 than ext3. I wrote a little script to demonstrate:

  http://samba.org/ftp/unpacked/junkcode/testldbspeed.sh

It creates a new fs on a spare block device, and runs a speedtest (the
usage gives examples for tdbtorture and ldbtest).

With tdbtorture I get:

  ext3 barrier=0   1.9s
  ext4 barrier=0   2.5s
  ext3 barrier=1   13.4s
  ext4 barrier=1   36.0s

The change of default in ext4 to have barriers enabled is obviously
hurting us a lot, but what is surprising is the comparison between
ext3 with barriers and ext4 with barriers. Why are barriers hurting
tdb on ext4 so much more than on ext3?

I know you've recently been looking into the cost of barriers with
tdb, so I wondered if you had any idea why this happens? 

Meanwhile, I've disabled barriers on my devel ext4 filesystem on my
laptop as otherwise doing testing of s4 is far too painful (it adds
about 15 minutes to 'make test').

Cheers, Tridge


More information about the samba-technical mailing list