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.
Just a couple of questions for you...
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. :-)
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:
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.