Huge memory usage for bzr branch/checkout
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Fix Released
|
High
|
Unassigned | ||
Breezy |
Triaged
|
High
|
Unassigned | ||
bzr (Ubuntu) |
Triaged
|
High
|
Unassigned |
Bug Description
$ uname -a
Linux odin 2.6.27.9-kn #1 SMP Sat Dec 27 10:40:16 CET 2008 x86_64 GNU/Linux
$ bzr --version
Bazaar (bzr) 1.13
Python interpreter: /usr/bin/python 2.5.2
Python standard library: /usr/lib/python2.5
bzrlib: /usr/lib/
(This is Ubuntu 8.04 on x86_64, with the bzr from the Hardy bzr ppa).
bzr needs huge amounts of memory when creating a branch or checkout of the mysql-server repository.
To repeat, run this:
bzr branch lp:mysql-server/6.0
Running top alongside show (on my machine) the resident memory usage of bzr to rise to 633MB before it is finished.
We have seen bzr abort on out of memory. This seems a big issue, as apparently it makes it impossible to develop using bzr with this repository on machines with <1Gb of memory.
User `lifeless` on FreeNode IRC #bzr suggested I file this as a bug.
The mysql-server/6.0 has a lot of history, the shared repository size is about 650 Mb.
Using a shared repository locally doesn't seem to solve the problem. A bzr branch --no-tree takes little memory then, but a bzr checkout still uses up >600MB.
Changed in bzr: | |
status: | New → Confirmed |
importance: | Undecided → High |
Changed in bzr (Ubuntu): | |
status: | New → Confirmed |
Changed in bzr (Ubuntu): | |
status: | Confirmed → Triaged |
importance: | Undecided → High |
Changed in bzr: | |
status: | Confirmed → Incomplete |
Changed in brz: | |
status: | New → Triaged |
importance: | Undecided → High |
tags: | added: performance |
tags: | added: bzr-format |
Changed in bzr (Ubuntu): | |
status: | Triaged → Confirmed |
Changed in brz: | |
status: | Triaged → Fix Committed |
Changed in bzr: | |
status: | Confirmed → Fix Released |
Changed in bzr (Ubuntu): | |
status: | Triaged → Confirmed |
Changed in brz: | |
status: | Triaged → Fix Committed |
Changed in bzr (Ubuntu): | |
status: | Confirmed → Fix Committed |
Changed in bzr (Ubuntu): | |
status: | Fix Committed → Triaged |
Changed in brz: | |
status: | Fix Committed → Triaged |
~$ free -m ~/bzr.repo$ du -sh ~/bzr.repo$ bzr info
total used free shared buffers cached
Mem: 1010 109 901 0 5 32
-/+ buffers/cache: 71 939
Swap: 1906 397 1509
rune@rao:
9,9G .
rune@rao:
Shared repository (format: pack-0.92)
Location:
shared repository: .
So I have a shared repository taking up 10GB and less than 10GB memory.
This gives me problems (I run out of memory), when I run bzr check (and other commands).
rune@rao: ~/bzr.repo$ cd data ~/bzr.repo/ data$ bzr check errors. KnitCorrupt: Knit <bzrlib. knit._PackAcces s object at 0x86de70c> corrupt: While reading {<email address hidden>} got MemoryError()
rune@rao:
bzr: ERROR: bzrlib.
Traceback (most recent call last): python2. 5/site- packages/ bzrlib/ commands. py", line 834, in run_bzr_ catch_errors python2. 5/site- packages/ bzrlib/ commands. py", line 790, in run_bzr python2. 5/site- packages/ bzrlib/ commands. py", line 492, in run_argv_aliases **all_cmd_ args) python2. 5/site- packages/ bzrlib/ builtins. py", line 2408, in run branch_ obj, verbose) python2. 5/site- packages/ bzrlib/ check.py" , line 254, in check repository. check([ branch. last_revision( )]) python2. 5/site- packages/ bzrlib/ decorators. py", line 127, in read_locked python2. 5/site- packages/ bzrlib/ repository. py", line 1847, in check revision_ ids) python2. 5/site- packages/ bzrlib/ repository. py", line 1851, in _check python2. 5/site- packages/ bzrlib/ check.py" , line 79, in check check_one_ rev(rev_ id) python2. 5/site- packages/ bzrlib/ check.py" , line 190, in check_one_rev _check_ revision_ tree(rev_ id) python2. 5/site- packages/ bzrlib/ check.py" , line 234, in _check_ revision_ tree python2. 5/site- packages/ bzrlib/ inventory. py", line 375, in check _check( checker, rev_id, tree) python2. 5/site- packages/ bzrlib/ inventory. py", line 598, in _check self.revision) : python2. 5/site- packages/ bzrlib/ knit.py" , line 760, in get_sha1 sha1s([ version_ id])[0] python2. 5/site- packages/ bzrlib/ knit.py" , line 764, in get_sha1s record_ map(version_ ids) python2. 5/site- packages/ bzrlib/ knit.py" , line 1121, in _get_record_map _data.read_ records_ iter(records) : python2. 5/site- packages/ bzrlib/ knit.py" , line 2639, in read_records_iter record( version_ id, data) python2. 5/site- packages/ bzrlib/ knit.py" , line 2545, in _parse_record _.__name_ _, str(e))) knit._PackAcces s object at 0x86de70c> corrupt: While reading {<email address hidden>...
File "/usr/lib/
return run_bzr(argv)
File "/usr/lib/
ret = run(*run_argv)
File "/usr/lib/
return self.run(
File "/usr/lib/
check(
File "/usr/lib/
repo_result = branch.
File "/usr/lib/
return unbound(self, *args, **kwargs)
File "/usr/lib/
return self._check(
File "/usr/lib/
result.check()
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
ie.check(self, rev_id, inv, tree)
File "/usr/lib/
self.
File "/usr/lib/
if self.text_sha1 != w.get_sha1(
File "/usr/lib/
return self.get_
File "/usr/lib/
record_map = self._get_
File "/usr/lib/
self.
File "/usr/lib/
content, digest = self._parse_
File "/usr/lib/
% (version_id, e.__class_
KnitCorrupt: Knit <bzrlib.