Differences between revisions 30 and 31
Revision 30 as of 2007-09-16 13:25:32
Size: 2438
Editor: OndrejCertik
Comment:
Revision 31 as of 2007-09-17 11:31:49
Size: 2827
Editor: OndrejCertik
Comment:
Deletions are marked like this. Additions are marked like this.
Line 38: Line 38:
== Research ==

We just discovered, that mounting XFS partition with:

{{{
sudo mount -o nobarrier /dev/sda2 /mnt/p1
}}}

speeds things up on all machines. The reason is, that the option "-o barrier" was added by default to all kernels >= 2.6.17, so dakol has nobarrier, all the others have barrier. By mounting with nobarrier, the cp and rm times are around 1.7s. That's a-ok.

Benchmarks of COW directory copies and removal in [:cowbuilder: cowbuilder].

Details

The numbers in the copy column were generated using:

time sudo cp -al /var/cache/pbuilder/base.cow /tmp/new

and in the remove column:

time sudo rm -rf /tmp/new

Everything is in seconds. XFS filesystems:

computer

copy

remove

computer details

pc232

16.1

18.2

Intel Core 2 Duo, ST3250820AS /dev/sda1 (10GB, xfs, 80% full), sid, i386, 2.6.22-2-686

pc232

9.0

10.0

Intel Core 2 Duo, ST3250820AS /dev/sda2 (10GB, xfs, 2.4% full), sid, i386, 2.6.22-2-686

august

9.3

10.9

Intel Core 2 Quad, ST3320620AS /dev/sda1 (20GB, xfs, 20% full), sid, i386, 2.6.22-1-686

august

5.8

9.5

Intel Core 2 Quad, ST3320620AS /dev/sda3 (233GB, xfs, 0.2% full), sid, i386, 2.6.22-1-686

dakol

0.48

0.5

AMD Athlon 64 3800+, ST3160827AS /dev/sda7 (135GB, xfs, 32% full), sid, amd64, 2.6.16-2-amd64-k8

fuji

13.9

16.4

Intel Core Duo, WDC WD1600BEVS-2 /dev/sda1 (14GB, xfs, 33% full), sid, i386, 2.6.21-1-686

Ext3 filesystems:

computer

copy

remove

computer details

pc232

0.2

0.14

Intel Core 2 Duo, ST3250820AS /dev/sda2 (10GB, ext3, 2.4% full), sid, i386, 2.6.22-2-686

august

0.22

0.13

Intel Core 2 Quad, ST3320620AS /dev/sda5 (42GB, ext3, 0.9% full), sid, i386, 2.6.22-1-686

dakol

0.22

0.15

AMD Athlon 64 3800+, ST3160827AS /dev/sda5 (2GB, ext3, 14.5% full), sid, amd64, 2.6.16-2-amd64-k8

Note 1: All copies were done on the same partition, the number of which is noted in the computer details column.

Note 2: XFS filesystem was created using mkfs.xfs, ext3 filesystem was created with mkfs.ext3. No options added.

Note 3: On dakol with XFS filesystem, cp takes 0.5s, sync takes 3s (!), rm takes 0.5s, and another sync takes 2.8s. However, with the ext3 filesystem on the same system, the sync is negligible. On august with ext3, cp takes 0.2s, sync 0.2s, rm 0.09s, sync 0.18.

Note 4: All tests were run several times and the deviation is usually around 10%. So instead of 16s, it could also be 15s (but not 10s), and instead of 0.22s, it could be 0.24s (but not 1s).

Research

We just discovered, that mounting XFS partition with:

sudo mount -o nobarrier /dev/sda2 /mnt/p1

speeds things up on all machines. The reason is, that the option "-o barrier" was added by default to all kernels >= 2.6.17, so dakol has nobarrier, all the others have barrier. By mounting with nobarrier, the cp and rm times are around 1.7s. That's a-ok.

Conclusion

The ext3 filesystem is truly superior to XFS for the cowbuilder purpose. Just use it and you'll be fine.