bzr memory usage

Dimitrios Apostolou jimis at gmx.net
Wed May 4 10:28:54 UTC 2011


Hi Andrew, thanks for your reply.

On Wed, 4 May 2011, Andrew Bennetts wrote:
> Dimitrios Apostolou wrote:
>> I thought I'd measure memory usage of the following command, hoping
>> it would be minimal, since it doesn't download any metadata, as I
>> understand it.
>>
>> bzr checkout --lightweight -v lp:gcc gcc-co-light/
>
> checkout --lightweight is currently only optimised for local use.  As you've
> seen it currently performs pretty horridly over the network :(
>
> The primary bug tracking this is <https://bugs.launchpad.net/bzr/+bug/762330>,
> although there may be others.
>
> It's probably moderately easy to improve, it just hasn't been the top of
> anyone's to-do list.  Part of the concern is that even if we make the initial
> checkout --lightweight over the network reasonably fast that they're likely
> still be painfully slow to use after that.  It's just not what lightweight

I think the user should be warned about this, the normal expectation is to 
run --lightweight because you need less network utilisation. What I was 
actually expecting was no metadata transfers at all, all calculations 
being made server-side and me getting only the results of those.

> checkouts are designed for.  There is a use case of “I just want the current
> state of the tree and then no further bzr operations” though, and we probably
> can and should support that much better, although not necessarily via
> lightweight checkouts.  Is that your case?

In my case I'd like to be able to run just a few bzr commands, but for now 
even being able to download the tree would be a huge improvement, 
actually it would make bzr usable for me.

For the sake of completeness I have run all 4 available commands to 
download a tree:

(1) bzr branch lp:gcc
(2) bzr branch --stacked lp:gcc
(3) bzr checkout lp:gcc
(4) bzr checkout --lightweight lp:gcc

Here are the exact results I saw, which make bzr unusable equipment with 
little RAM:

(1) took 1h and maxed at 800MB VM usage
(2) took 4.7h and maxed at 500MB VM usage
(3) was OOM killed (!) after 1h with VM usage exceeding 850MB
(4) took 5.5h, downloaded about 8GB of data, and used a maximum of 450MB

I should note that I did the branch or checkout, without being logged in 
launchpad, and without having done an "init" upfront. After these command 
here are the sizes of the local directories:

$ du -sh *
1.2G	gcc-branch
624M	gcc-branch-stacked
568M	gcc-co-heavy        # OOM killed!
624M	gcc-co-light


Notes: (2) took much more than expected, (4) downloaded much more than 
expected and used too much memory, I was expecting minimal requirements 
for lightweight checkouts, but as you told me it is a known bug.


Hope this helps,

Dimitris


More information about the bazaar mailing list