testing memory scaling for bzr

Robert Collins robertc at robertcollins.net
Thu Jun 19 03:02:34 BST 2008


So, we have some occasional memory issues with bzr.

If you set the following ulimits:
ulimit -v <VMSIZE>
ulimit -m <MEMSIZE>

(both in k) you can cause malloc to fail for bzr rather than swapping to
the limit of your swapfile before failing. This lets you pretend to have
a smaller machine.

In fact, just setting:
ulimit -v 2097152

should be enough to pretend to have a 2G machine.

Then, when bzr does something stupid, you can start finding and fixing
the bugs before our users encounter them :).

The -m limit prevent bzr having more in-ram usage than a specific
figure, useful to stop bzr swapping out your development tools. The -v
sets the total process size - to get fast results I would suggest that
your -v and -m settings be the same. (Prevents bzr swapping
arbitrarily).

Oh, and setting it too low seems to upset python rather badly:
11:51 < lifeless> h$ bzr pull http://bazaar-vcs.org/bzr/bzr.dev
11:51 < lifeless> Fatal Python error: PyString_InternInPlace: strings
only please!
11:51 < lifeless> Aborted


-Rob

-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20080619/9978f312/attachment.pgp 


More information about the bazaar mailing list