Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I got CollabNet Subversion Server 1.6.2.37639 installed on Windows Server 2003 R2 (Enterprise, x86) and obviously set it to run as a service. I only host one repository, which is a svnsync mirror of another one (hosted on another machine). The service works well, but after a few days of being up and running it occupies more than 200MB of RAM for no apparent reason. Also, traffic to the repository is very negligible. No malfunction is registered, and the there does not seem to be a memory leak as the memory consumption never goes beyond that figure.

The size of the repository is about 194MB and the number of commits/checkouts are roughly 10 per day.

It seems quite a lot of "wasted" memory that could be allocated, for example, for database cache.

Does anyone know more about this problem and how to solve it? I guess it could be some form of data caching done by svnserve.exe, but I found no clues about that on the Internet.

share|improve this question

3 Answers 3

You probably want to establish how long exactly it is taking to get to this level of memory use. Is it purely a matter of time, or can you accelerate the process by performing more commits, or doing more check-outs etc. Memory leaks are rare but possible and generally result in performance problems. These problems will manifest them at different points for different configurations. Is the repository slower after it reaches 200MB?

In most cases memory is not 'wasted'. It is the job of the operating system to manage memory allocations overall, but some applications may have their own strategy. In this case, SVN may have a cache, but it could also be allocating more memory so that it is a contiguous allocation of memory. Generally the OS should see memory pressure and use a range of heuristics to ensure other applications continue to function normally.

Things I would try:

  • Use Performance Monitor (perfmon.exe) to capture various statistics on memory usage etc.
  • Review the log for each repository to see what types of operations have taken place.
  • Restarting the service and running a large number of checkouts, commits etc using an automated script. Do each of these independently before trying a mix of the two types of operations. This may be less applicable if you only have a pure replica of another subversion server.
share|improve this answer

That#s interesting - I havn't heard of a large memory usage of Svnserve on the mailing lists, perhaps you'd like to post there.

share|improve this answer

Just a couple of questions for you...

  • how big is your Subversion repository?
  • how many commits, checkouts and updates per hour, day, week?
  • How much traffic does the other machine handle?

I'm not really an expert with Windows by any stretch, but it does sound like caching of some sort or your repository is quite large so the necessary indexes to operate it efficiently classify as "chunky" :) Is there a way, like with Linux, to see how memory is allocated/used on a per-process basis, perhaps through Task Manager or the Resource Monitor?

Edit: This should really be a comment to your question, but comments seem to utterly mangle all formatting and I really wanted bullet points for the questions. :-)

share|improve this answer
    
Size of repo is about 194 MB and the number of commits/checkouts are roughly 10 per day. –  Dario Solera Jun 28 '09 at 17:31

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.