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

computer

copy

remove

computer details

pc232

16.1

18.2

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

august

9.3

10.9

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

dakol

0.48

0.5

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

fuji

13.9

16.4

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

If anyone has any explanation, why dakol is 20x faster than the other computers, please write it here. Is it because of the position of the disk partition, or that it's larger? pc232 is full, but the other computers have around the same disk usage. Note: /var and /tmp is on the same partition on all computers.

Update: I also tried on august to copy the base.cow to a larger 233GB partition, 0.2% full, and then copy on this partition, and it took 6s. So a little improvement, but that is not the reason, why it is so terribly slow, compared to dakol.

The only explanation I can think of is that xfs filesystem is 64bit, and thus is simply 20x faster on amd64 debian, compared to i386 debian...

Update: I think I know: on dakol, cp takes 0.5s, sudo sync takes 3s (!), rm takes 0.5s, and another sudo sync takes 2.8s. So it's only 2x faster than august. And that could be explained by the 64bits. However, in practies, since the kernel is caching the files, it's 20x faster.