2

How can it be that svn ls -v needs ~250 longer than a normal svn ls?

It does not seem to matter which transport i am using even with file:// schema it's no difference. I also tried enabling memcached, but no improvements either.

The funny thing is at the top level directory this command is the slowest, the deeper i go the faster it gets. And it does not seem to matter how many items are in a directory.

I am using svn version 1.7.1 for both client and server. And FSFS repo format.

Here the timings

svn ls -v svn://trac/koh/  0.01s user 0.01s system 0% cpu 39.960 total
svn ls svn://trac/koh/  0.00s user 0.02s system 6% cpu 0.243 total
bahrep
  • 29,961
  • 12
  • 103
  • 150
parceval
  • 370
  • 4
  • 9

2 Answers2

1

It is possible that svn ls is able to use the information locally from the working directory while svn ls -v has to go back to the server to get the information it needs. It could also be the amount of information to query too. svn ls merely needs the file names while svn ls needs the revision and last author too.

However, I don't find the time to be 250 times longer:

$ time svn ls

real    0m0.514s
user    0m0.046s
sys     0m0.061s

$ time svn ls -v

real    0m0.530s
user    0m0.000s
sys     0m0.109s

Does this happen on all clients or just the machine you are on? Is this Windows or Unix/Linux? How big is the directory you're trying to list? Are there changes in the working directory when you do a svn ls? Or, are you using a URL all the time, so it has to go to the server? Do you notice anything else that has a speed issue?

David W.
  • 105,218
  • 39
  • 216
  • 337
  • the same behavior happens with different client machines, i allways do the ls to a repo URL, no working copy involved. My server runs FreeBSD and clients are windows, FreeBSD, OS X, its the same everywhere. The size of the directories, does not seem to matter, my top level dir has only 4 entries, but its the slowest to list. The Repo itself although is big its 55k revisions, and takes 550GB on the server. – parceval Aug 24 '12 at 13:38
  • I'll have to try it once I can connect to my SVN repository via the URL. It could be due to the amount of information it must fetch: Fetching just the file name vs. the file name, last commit, and author of the commit. The name might be easy to retrieve, but the revision and author may require a deeper query. – David W. Aug 26 '12 at 03:03
1

I have found that "svn ls -v svn://svn" results in a "get-locks" server log message, which is where the time is taken. Our repository file system is NFS. Many "getattr" and "lookup" NFS calls occur. So for some reason the SVN server is doing a lot of attribute getting for get-locks.

I haven't found what the reason for this is yet...

Tom Lucas
  • 81
  • 1
  • 1