[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RE: Memory Consumption...

From: Sander Striker <striker_at_apache.org>
Date: 2002-02-02 15:13:36 CET

> So after a night of reading and running the code in a debugger, I
> finally gave up and turned on the apr_pool debugging. Then the problem
> went away. I hate bugs like that.
> Adding this:
> #define APR_POOL_DEBUG 1
> to apr/include/apr_pools.h
> right after the comment and before the preprocessor stuff:
> * When no debug level was specified, assume general debug mode.
> * If level 0 was specified, debugging is switched off
> */
> <-- insert here...
> #if defined(APR_POOL_DEBUG)
> #if (APR_POOL_DEBUG != 0) && (APR_POOL_DEBUG - 0 == 0)


You could have just passed --enable-pool-debug to configure to
get the same result. The whole point was that people shouldn't
have to edit the source files...
> fixes all of the memory consumption issues. Code runs like a champ
> after that. I couldn't import even half of the linux-2.4.0 imported
> into a repository with 300MB of VM it died from OOM, however, the max
> memory consumption with that added is a little over 11M at the peak.
> I have two binaries, one badSVN and svn. Both were created from:
> make clean && make
> run in the root of the tree. I have apr, neon and bdb softlinked from
> the root of the repository. I had svn build everything for me as
> described in the README file. The only difference between the two is
> the debug flag on pools.

It is quite normal that the production pools code eats more memory than
the debug code. There should be a peak, and at that peak the memory usage
stays until after termination (there are exceptions, but you won't see
those in subversion, since it only uses one allocator).
> Sorry if anybody wasted too much time on my report earlier. I am too
> tired right now to figure out what is broken with pools in APR. They
> swap out a lot of guts when you turn debugging on so I imagine it will
> be a trick to figure it out. Given I am not sure I understand all of
> the fundamentals of the pool stuff, I'll leave it to the experts...

I'll be looking at pool behaviour this weekend. The test program
that Yoshiki sent in should be of some help.
> Oh, I have the version of APR from the CVS repository from Jan 30th I
> believe. The neon and db are the versions listed in the README.

Nothing significant changed in there IIRC.
> Thanks,
> Kirby


To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:37:03 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.