Hi,

In a repository that contains a large number of files and folders (over 100K), many of which have the needs-lock property set, If any user attempts to check out this entire repository, the large number of locks created on the server render the server almost unusable due to high load and cause the 'svn ls --xml' command to fail.

I ve attached a test script which will create the environment to reproduce this problem.

Some of the tests I did with different versions of subversion for the above problem revealed that there is something wrong with svn 1.6.x versions of subversion.

Following are my findings,

With svn 1.6.9, in the working copy,
<snip>
$ time /usr/sbin/svn ls . > /tmp/ls.txt

real    0m5.745s
user    0m4.281s
sys     0m1.653s

$ tail /tmp/ls.txt
test99990.txt
test99991.txt
test99992.txt
test99993.txt
test99994.txt
test99995.txt
test99996.txt
test99997.txt
test99998.txt
test99999.txt

$ time /usr/sbin/svn ls --xml . > /tmp/ls.txt
### Waits infinitely with no meaningful output ###
</snip>

With svn 1.4.2, in the working copy,
<snip>
$ time svn ls . > /tmp/ls.txt

real    0m2.866s
user    0m1.890s
sys     0m0.681s

$ tail /tmp/ls.txt
<no output>

$ time svn ls --xml . > /tmp/ls.txt

real    0m3.047s
user    0m1.842s
sys     0m0.680s

$ tail /tmp/ls.txt
<?xml version="1.0"?>
<lists>
<list
   path=".">
</list>
</lists>
</snip>

With svn 1.6.9, in the repository,
<snip>
$ time /usr/sbin/svn ls file:///tmp/repos > /tmp/ls.txt

real    0m4.656s
user    0m1.686s
sys     0m1.470s

$ tail /tmp/ls.txt
test99990.txt
test99991.txt
test99992.txt
test99993.txt
test99994.txt
test99995.txt
test99996.txt
test99997.txt
test99998.txt
test99999.txt

$ time /usr/sbin/svn ls --xml file:///tmp/repos > /tmp/ls.txt

real    160m44.583s
user    113m42.129s
sys     2m7.358s

$ tail /tmp/ls.txt
<name>test99999.txt</name>
<size>0</size>
<commit
   revision="1">
<author>root</author>
<date>2010-07-11T15:09:10.029363Z</date>
</commit>
</entry>
</list>
</lists>

######## Top stats as follows ################
29657 ssenthil 25 0 565m 418m 2896 R 36.6 20.8 23:33.42 svn 30838 ssenthil 25 0 217m 70m 2840 R 38.3 3.5 3:17.07 svn
</snip>

With svn 1.4.2, in the repository,
<snip>
$ time svn ls file:///tmp/repos > /tmp/ls.txt

real    0m2.849s
user    0m1.429s
sys     0m0.177s
[ssent...@cu041 tmp]$ tail /tmp/ls.txt
test99990.txt
test99991.txt
test99992.txt
test99993.txt
test99994.txt
test99995.txt
test99996.txt
test99997.txt
test99998.txt
test99999.txt

$ time svn ls --xml file:///tmp/repos > /tmp/ls.txt

real    0m27.708s
user    0m17.528s
sys     0m7.224s

$ tail /tmp/ls.txt
<name>test99999.txt</name>
<size>0</size>
<commit
   revision="1">
<author>ssenthil</author>
<date>2010-07-03T03:48:04.471139Z</date>
</commit>
</entry>
</list>
</lists>
</snip>

Looking at the numbers furnished above, it is clear that subversion does real work of getting the directory listing in plain and in xml format without any issues. But the real problem is the time taken to generate output for '--xml', not to mention 1.4.2 version is faster than 1.6.9 in this aspect.

Am looking at the cause of this behavior, meanwhile would like to post it here to find out if it rings some bell for someone :)

Thank You.
--
Senthil Kumaran S
http://www.stylesen.org/

Attachment: slow-execution.sh
Description: Bourne shell script

Reply via email to