Optimize Tortoise SVN Cache (TSVNCache.exe) Disk I/O

I've got a lot of background processes running and killing my disk performance with all the I/O they're doing.  One of the primary offenders is the TortoiseSVN cache that helps put the icon overlays in Explorer.  Several folks I know disabled the cache altogether, but I like the icons.

Rather than disable the cache, you can optimize the paths it looks at so it only actually looks at working copies and not your whole disk.  If you keep all of your working copies in specific known locations, this is a really simple thing to do.  For example, I keep all of my checked out code in one of three places - a "dev" folder I have, the "Visual Studio 2005" folder in "My Documents," and the "Visual Studio Projects" folder in "My Documents."

To optimize the disk usage...

  1. Right-click on your desktop and select "TortoiseSVN -> Settings..."
  2. In the tree view, find the "Look and Feel/Icon Overlays" branch.
  3. In the "Exclude Paths" box, put C:\* to exclude the entire C drive.  If you have more drives than that, exclude them all at the top level.  Separate the values by newlines.
  4. In the "Include Paths" box, list all of the locations you have working copies, separated by newlines.  Again, this is easier if you keep all of your working copies in a specific folder or set of folders.  Using my example, this is what I put in the "Include Paths" box:
    C:\dev\*
    C:\Documents and Settings\tillig\My Documents\Visual Studio 2005\*
    C:\Documents and Settings\tillig\My Documents\Visual Studio Projects\*


    And here's a screen shot:
    TortoiseSVN icon overlay options - set the "Exclude paths" and "Include paths" values
  5. Click OK to apply the changes.
  6. Either reboot or open Task Manager and kill "TSVNCache.exe" so it restarts when needed.  You have to restart it for these options to take effect.

After I did this, the icon overlays still worked great but the disk I/O went down to nearly nothing.  YMMV.

posted on Wednesday, September 26, 2007 10:05 AM | Filed Under [ GeekSpeak ]

Comments

Gravatar # re: Optimize Tortoise SVN Cache (TSVNCache.exe) Disk I/O
by Joe at 9/26/2007 9:09 PM
I tested this using Sysinternal's Filemon, but even after excluding C: and including only c:\source I still see activity all over the drive
Gravatar # re: Optimize Tortoise SVN Cache (TSVNCache.exe) Disk I/O
by Simone Chiaretta at 9/27/2007 4:42 AM
That's a great tip... my laptop is very old, and suffering a lot from the TSVNCache.exe process.
Thank you
Simo
Gravatar # re: Optimize Tortoise SVN Cache (TSVNCache.exe) Disk I/O
by Travis Illig at 9/27/2007 7:51 AM
I noticed that same thing until I killed the TSVNCache.exe process and let it restart manually. (It restarts when you do an update or other TortoiseSVN operation.) After that, it stopped its random probing and only touched the parts of the disk it was told to (with the exception of a couple of common log files, which is fine).

Not sure why it wouldn't work for you; maybe something to report to the TSVN team?
Gravatar # re: Optimize Tortoise SVN Cache (TSVNCache.exe) Disk I/O
by Jason Poll (Yoopergeek) at 9/27/2007 9:21 AM
A coworker pointed me to your post. I was surprised at just how 'noisy' TSVNCache.exe is!

I fired up FileMon, sent my coworker an IM stating "I'll check it out." and, when my IM client wrote the message to it's log file, I saw TSVNCache.exe notice the file change, and immediately inspect the log file's location for a ".svn" folder.

How incredibly noisy!

Thanks for this great tip, you're getting a link-back from me! :)
Gravatar # re: Optimize Tortoise SVN Cache (TSVNCache.exe) Disk I/O
by erdinch at 10/6/2007 12:07 PM
Joe,

the * in the exclude path is necesary to include the subfolders. Make sure you have C:\* instead of only C:\

Thx for this post, it really makes a difference ;)

/e
Gravatar # re: Optimize Tortoise SVN Cache (TSVNCache.exe) Disk I/O
by Eric at 10/10/2007 4:57 AM
Thanks for the tip...
I noticied a significant decrease in performance after installing TortoiseSVN on a slower laptop, and this made a noticeable difference in disk I/O performance.
Gravatar # re: Optimize Tortoise SVN Cache (TSVNCache.exe) Disk I/O
by Beirti at 10/15/2007 9:08 AM
Seeing a 'slight' performance increase since it's been scanning my overloaded C: drive and all the internal network drives as well.... Grrr.....

Great spot, thanks!
Gravatar # re: Optimize Tortoise SVN Cache (TSVNCache.exe) Disk I/O
by Geoff Stockham at 10/18/2007 5:34 AM
I noticed that the top level folders in my development root were not picking up the icons. Changing the include path from c:\dev\* to c:\dev* seemed to fix this.
Gravatar # re: Optimize Tortoise SVN Cache (TSVNCache.exe) Disk I/O
by Arien at 10/25/2007 7:43 AM
Brilliant tip! I had some folders with tons of archives that were making explorer hang whenever I browsed them. Now they are going really smooth.

Thanks :)
Gravatar # re: Optimize Tortoise SVN Cache (TSVNCache.exe) Disk I/O
by Christoph at 10/25/2007 8:49 AM
Great tip. I always wondered why explorer was that slow.
Gravatar # re: Optimize Tortoise SVN Cache (TSVNCache.exe) Disk I/O
by anjan bacchu at 11/19/2007 3:44 PM
hi there,

thank you.

I've been noticing the pig that it is. Shouldn't there be a better way to do this. I'm wondering why the tool developers didn't do this by default ?

I guess the tool developers did NOT want to get support calls/emails from those who did NOT understand the exclude settings.

But they should educate the users about it. Do they tell us during installation/setup ? That would be nice.

BR,
~A
Gravatar # re: Optimize Tortoise SVN Cache (TSVNCache.exe) Disk I/O
by SAn at 11/28/2007 3:14 AM
Great, Thanks!!!!!!!!!!!!!!

SAn
Gravatar # re: Optimize Tortoise SVN Cache (TSVNCache.exe) Disk I/O
by Jose Torres at 12/4/2007 5:40 AM
Thanks! Is a very good tip, we are putting it to work.
Gravatar # re: Optimize Tortoise SVN Cache (TSVNCache.exe) Disk I/O
by Rahul at 12/21/2007 4:04 PM
It is really working for me..Thanks a lot..
Gravatar # re: Optimize Tortoise SVN Cache (TSVNCache.exe) Disk I/O
by Blake at 1/7/2008 8:17 AM
Yes very nice, an alternative is to uncheck "Fixed drives" in the Drive Types area instead of excluding the C: drive. Should do the same trick.
Gravatar # re: Optimize Tortoise SVN Cache (TSVNCache.exe) Disk I/O
by Lucas Shaw at 2/20/2008 4:48 PM
Great tip! This helped me out a lot! My computer was bogged down severely by this process.
Gravatar # re: Optimize Tortoise SVN Cache (TSVNCache.exe) Disk I/O
by Ricardo Fiel at 3/10/2008 12:44 PM
Thank you so much! Really helped! :)
Gravatar # re: Optimize Tortoise SVN Cache (TSVNCache.exe) Disk I/O
by Rich Mills at 3/26/2008 7:56 PM
Fantastic tip. Thanks.

Another tip that works for me: In the Icon Overlays section, set "Status cache" to "shell" instead of default. This turns off recursive checking of status commit status, but make things lightning fast. Very helpful if you've got gigabytes of versioned binary files that tsvncache constantly thrashes on. -- Rich
Gravatar # re: Optimize Tortoise SVN Cache (TSVNCache.exe) Disk I/O
by nick at 7/26/2008 4:28 PM
this bug in tsvn brought down the performance of my fastest machine to 1995 level.
Gravatar # re: Optimize Tortoise SVN Cache (TSVNCache.exe) Disk I/O
by Philip Wagenaar at 8/5/2008 3:46 AM
Great article! I was just about to hate the svncache process!
Comments have been closed on this topic.