On Tue, Aug 18, 2015 at 01:06:02PM +0200, J. Hannken-Illjes wrote:
 > > /root/test/files> time seq 1 10000|xargs touch
 > >     3.10s real     0.01s user     3.07s system
 > > /root/test/files> rm *
 > > /root/test/files> time seq 1 20000|xargs touch
 > >     9.88s real     0.01s user     8.51s system
 > > /root/test/files> rm *
 > > /root/test/files> time seq 1 30000|xargs touch
 > >    23.45s real     0.04s user    20.41s system
 > > /root/test/files> time seq 1 40000|xargs touch
 > >    43.35s real     0.05s user    38.32s system
 > > 
 > > That is clearly not linear.
 > 
 > I'm quite sure this is the memcmp in ufs_lookup.c:390.
 > 
 > For every file we have to compare its name to all names in the
 > directory so far leading to 0.5*n*(n-1) calls to memcmp.
 > 
 > And our memcmp is sloooow ...

This problem is shared with non-wapbl ffs, however...

-- 
David A. Holland
dholl...@netbsd.org

Reply via email to