I have a series of scripts that are doing many svn operations and taking too long and we're not sure why. For example
svn switch svn+ssh://srv/repo/... ...
This consistently takes about 1.1 seconds. We are using subversion 1.6.6 on RHEL 5.4.
The time for a
ssh srv exit is about 80 msec (we've worked on getting this down)! So the time is not being spent in ssh.
strace on the client and server, I see this (
sv is svnserve on the server,
cl is client):
sv 08:29:43.470772 close(4) = 0 sv 08:29:43.470839 unlink("/tmp/tempfile.tmp") = 0 sv 08:29:43.470937 write(1, "( success ( ) ) ", 16) = 16 sv 08:29:43.471062 read(0, "", 4096) = 0 cl 08:29:44.019452 unlink("/export/.../.svn/lock") = 0
So it seems half a second is stuck waiting for this final read to complete. Looking at sources, I'm guessing this is the read timeout in the apr library. I don't see where though subversion calls the library with a non-zero timeout (ignoring for HTML).
Is there a way to shorten this timeout or otherwise significantly improve the command turnaround time?
We could update the server version if we know it will help, but cannot upgrade the client version (as there are about 500 client systems in use). We could recompile the server or client if needed.