[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: "svn diff" performance

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2002-07-24 15:43:04 CEST

Ben Collins-Sussman <sussman@collab.net> writes:

> In your comparison, you're testing file:/// vs. http://localhost. I
> would still expect the http version to be slower, although maybe
> you're right -- maybe it's too slow. Do you have reason to believe
> that apache is 'hanging' or something? Do you see the GET requests in
> ethereal? Where does the 'delay' happen?

If I switch on neon debugging (line 341 in libsvn_ra_dav/session.c)
and use Vladimir's command

$ svn diff -r2674:2675 http://svn.collab.net/repos/svn

then during the what would otherwise appear to be a delay I see the
client reading and processing the <S:resource-walk>.

We can use the stress.pl script to create a repository with a couple
of hundred files in over a hundred directories, with revisions 2 and 3
changing just a single file.

$ tools/dev/stress.pl -c -N7 -x1 -s0 -n2

Now compare

$ time svn diff -r2:3 file:///home/pm/repostres
real 0m0.838s
user 0m0.150s
sys 0m0.060s

and

$ time svn diff -r2:3 http://localhost:8888/repostress
real 0m11.197s
user 0m0.120s
sys 0m0.010s

The problem, if there is one, seems to be in the server

$ ps ax | grep [h]ttpd
31941 ? S 0:00 /usr/local/apache2/bin/httpd -k start
31942 ? S 0:00 /usr/local/apache2/bin/httpd -k start
31943 ? S 0:10 /usr/local/apache2/bin/httpd -k start
31944 ? S 0:00 /usr/local/apache2/bin/httpd -k start
31945 ? S 0:00 /usr/local/apache2/bin/httpd -k start
31946 ? S 0:00 /usr/local/apache2/bin/httpd -k start
31950 ? S 0:10 /usr/local/apache2/bin/httpd -k start
31952 ? S 0:00 /usr/local/apache2/bin/httpd -k start
31953 ? S 0:00 /usr/local/apache2/bin/httpd -k start
31954 ? S 0:10 /usr/local/apache2/bin/httpd -k start
$ time svn diff -r2:3 http://localhost:8888/repostress
real 0m10.857s
user 0m0.130s
sys 0m0.020s
ps ax | grep [h]ttpd
31941 ? S 0:00 /usr/local/apache2/bin/httpd -k start
31942 ? S 0:00 /usr/local/apache2/bin/httpd -k start
31943 ? S 0:10 /usr/local/apache2/bin/httpd -k start
31944 ? S 0:00 /usr/local/apache2/bin/httpd -k start
31945 ? S 0:00 /usr/local/apache2/bin/httpd -k start
31946 ? S 0:10 /usr/local/apache2/bin/httpd -k start
31950 ? S 0:10 /usr/local/apache2/bin/httpd -k start
31952 ? S 0:00 /usr/local/apache2/bin/httpd -k start
31953 ? S 0:00 /usr/local/apache2/bin/httpd -k start
31954 ? S 0:10 /usr/local/apache2/bin/httpd -k start

The httpd process 31946 has used 10 seconds of processor time, so that
explains the delay seen by the client, it's waiting for the server.
So the question becomes why does the server take so long to generate
<S:resource-walk>?

Disclaimer: I've got APR_POOL_DEBUG set so my numbers may be misleading.

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Jul 24 15:43:42 2002

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.