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

Ruby bindings' excessive memory usage

From: David Felstead <dfelstead_at_site5.com>
Date: 2005-12-12 10:58:49 CET

Hi all - I've discovered what looks to be a problem with the SVN ruby
bindings where they begin to consume large amounts of memory whilst
adding a large number of small files to a repository. My _guess_ is
that there are APR pools not being disposed of or reused properly,
but this is complete conjecture on my part. Once the memory usage
exceeds around 2GB we get a core dump. This occurs on both Mac OS X
and Linux, Ruby 1.8.2 and Ruby 1.8.3 with the svn HEAD.

Attached is some code to reproduce the problem - it creates 4000
small files in a new working copy (/tmp/wc) and calls 'add' for each
file. If you view memory usage in 'top' it begins to climb at an
alarming rate, until ruby eventually core dumps. If you attempt to
perform the same action using the 'svn' command at the command line,
the memory usage remains stable, so it appears that the core libs are
not at fault.

Best regards,

-David Felstead

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

  • text/x-ruby-script attachment: leak.rb
Received on Mon Dec 12 11:00:53 2005

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.