[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: speed of COW directory copying: XFS 20x slower than ext3



On Sun, 16 Sep 2007, Ondrej Certik wrote:

I am using cowbuilder for building my packages, because the
initialization takes like 10s, compared to several minutes with
pbuilder on my system. A few days ago, I realized that on one of my
systems, it takes 0.5s only to copy the COW directory. I became
curious and wanted to know why, so I did a benchmarking [1] and to my
utter surprise, it turned out the problem is in the XFS filesystem,
that is 20x slower, than the ext3 filesystem. I know that XFS is bad
at handling small files, but 20x times?

Basically, what cowbuilder is doing is just those 2 commands:

cp -al /var/cache/pbuilder/base.cow /tmp/new
rm -rf /tmp/new

Does this possibly have to do with buffer flushing choices by the filesystem? Maybe xfs syncs after some operations (like rm -rf) that ext3 does not.

Try adding 'sync' after both steps and see if that changes performance.

-- Asheesh.

--
  An Irishman is never at peace except when he's fighting.



Reply to: