| bzr is Dog-Slow and Generally Sucks |
[Jan. 7th, 2010|08:18 pm]
Shlomif's Technical Posts Community
|
| [ | Tags | | | bzr, canonical, control, dazjorz, emacs, inkscape, linux, open, rant, sjors, slow, slowness, source, subversion, svn, ubuntu, version | ] |
| [ | Current Location |
| | Home | ] |
| [ | Current Music |
| | PeerGynt Logobris - Theme from the Past (from Jamendo.com) | ] |
The
Bzr version control system (Bazaar) is a version control system from
Canonical Ltd. (the parent company behind the Ubuntu Linux distribution). While
being open-source, it sucks royally and this is a blog about this.
First of all it is excruciatingly slow. Branching postr.dev (which is a bzr branch of
the very small
postr project takes 2:48 minutes. And that's not all:
shlomi:~/Download/unpack/net/www/TEMP$ cd postr.dev/
shlomi:~/Download/unpack/net/www/TEMP/postr.dev$ du -cs *
4.0K AUTHORS
20K COPYING
80K data
4.0K nautilus
20K po
4.0K postr
4.0K postr.doap
4.0K README
4.0K setup.py
256K src
4.0K TODO
404K total
shlomi:~/Download/unpack/net/www/TEMP/postr.dev$ echo "Hello" >> postr
shlomi:~/Download/unpack/net/www/TEMP/postr.dev$ time bzr di
=== modified file 'postr'
--- postr 2007-07-19 17:57:09 +0000
+++ postr 2010-01-07 18:00:06 +0000
@@ -42,3 +42,4 @@
for url in sys.argv[1:]:
p.add_image_filename(url)
reactor.run()
+Hello
Command exited with non-zero status 1
1.47user 0.08system 0:01.69elapsed 92%CPU (0avgtext+0avgdata 60080maxresident)k
288inputs+8outputs (0major+5673minor)pagefaults 0swaps
shlomi:~/Download/unpack/net/www/TEMP/postr.dev$ time bzr di
=== modified file 'postr'
--- postr 2007-07-19 17:57:09 +0000
+++ postr 2010-01-07 18:00:06 +0000
@@ -42,3 +42,4 @@
for url in sys.argv[1:]:
p.add_image_filename(url)
reactor.run()
+Hello
Command exited with non-zero status 1
1.47user 0.07system 0:01.61elapsed 95%CPU (0avgtext+0avgdata 60096maxresident)k
0inputs+0outputs (0major+5672minor)pagefaults 0swaps
So a simple "bzr diff" command takes over 1.6 seconds.
I reported a bug
in inkscape - "bzr branch lp:inkscape is very slow and emits errors and leaves
a broken local repository after exit" It took bzr 3 minutes to try and
checkout the Launchpad's Inkscape branch, and it finished with an error and
left the repository in an unsuable state. I tried it on my Debian Testing
VM and ended up with the same result.
To quote Sjors: "Bzr is slower than
Subversion in combination with Sourceforge." (and that says a lot.).
Recently, GNU
Emacs switched to Bzr. Now the question is how many decades one will have
to wait to "bzr branch" its main repository.
Cheers!
|
|
|
| Comments: |
Here is numbers for the same experiments on my netbook with Windows XP. And note that on Windows things generally much slower than on Linux: C:\Temp>timeit bzr get http://burtonini.com/bzr/postr/postr.devBranched 279 revision(s). time: 30.952 C:\Temp>cd postr.dev C:\Temp\postr.dev> C:\Temp\postr.dev>echo Hello >> postr C:\Temp\postr.dev>timeit bzr diff === modified file 'postr' --- postr 2007-07-19 17:57:09 +0000 +++ postr 2010-01-13 08:31:53 +0000 @@ -42,3 +42,4 @@ for url in sys.argv[1:]: p.add_image_filename(url) reactor.run() +Hello time: 0.943 C:\Temp\postr.dev>timeit bzr diff === modified file 'postr' --- postr 2007-07-19 17:57:09 +0000 +++ postr 2010-01-13 08:31:53 +0000 @@ -42,3 +42,4 @@ for url in sys.argv[1:]: p.add_image_filename(url) reactor.run() +Hello time: 0.928 So for me branching takes 30 seconds (vs your 2:48 min) and diff takes less than second. Do you think your machine is OK? What is your bzr version?
![[User Picture]](https://l-userpic.livejournal.com/30465675/4231862) | From: shlomif 2010-01-13 10:11 am (UTC)
My machine | (Link)
|
Do you think your machine is OK?
What is your bzr version?
Yes, I think it is OK. It is a Pentium 4 2.4 GHz machine with 2.5 GB of RAM running Mandriva Linux Cooker, and I have a 300 KBytes/second ADSL connection. Naturally, I've kept the same Mandriva Cooker installation for a long while now and it may have acquired a lot of cruft.
My bzr version is bzr-2.0.3-1mdv2010.1 - latest in Cooker.
My machine perhaps slightly slower than your: Intel Atom 1.6GHz + 1GB of RAM. And 100KBytes/second ADSL. And as I said I'm running Windows, and bzr is working slower there. The same bzr version. Nevertheless my numbers better than yours.
I can't comment on initial branching speed, but slow diff may indicate the problem either with your disk or the fact you have not compiled extensions for bzr.
Can you tell what is time for execution `bzr rocks` command?
![[User Picture]](https://l-userpic.livejournal.com/116762888/4231862) | From: shlomif 2010-01-13 05:24 pm (UTC)
Re: My machine | (Link)
|
shlomi:~$ time bzr --version
Bazaar (bzr) 2.0.3
Python interpreter: /usr/bin/python 2.6.4
Python standard library: /usr/lib/python2.6
Platform: Linux-2.6.32.3-desktop-2mnb-i686-with-mandrake-2010.1-Cooker
bzrlib: /usr/lib/python2.6/site-packages/bzrlib
Bazaar configuration: /home/shlomi/.bazaar
Bazaar log file: /home/shlomi/.bzr.log
Copyright 2005, 2006, 2007, 2008, 2009 Canonical Ltd.
http://bazaar-vcs.org/
bzr comes with ABSOLUTELY NO WARRANTY. bzr is free software, and
you may use, modify and redistribute it under the terms of the GNU
General Public License version 2 or later.
0.94user 0.06system 0:01.05elapsed 95%CPU (0avgtext+0avgdata 50864maxresident)k
0inputs+0outputs (0major+4936minor)pagefaults 0swaps
shlomi:~$ time bzr --version
Bazaar (bzr) 2.0.3
Python interpreter: /usr/bin/python 2.6.4
Python standard library: /usr/lib/python2.6
Platform: Linux-2.6.32.3-desktop-2mnb-i686-with-mandrake-2010.1-Cooker
bzrlib: /usr/lib/python2.6/site-packages/bzrlib
Bazaar configuration: /home/shlomi/.bazaar
Bazaar log file: /home/shlomi/.bzr.log
Copyright 2005, 2006, 2007, 2008, 2009 Canonical Ltd.
http://bazaar-vcs.org/
bzr comes with ABSOLUTELY NO WARRANTY. bzr is free software, and
you may use, modify and redistribute it under the terms of the GNU
General Public License version 2 or later.
0.89user 0.06system 0:01.03elapsed 93%CPU (0avgtext+0avgdata 50896maxresident)k
0inputs+8outputs (0major+4928minor)pagefaults 0swaps
shlomi:~$ time bzr --version
Bazaar (bzr) 2.0.3
Python interpreter: /usr/bin/python 2.6.4
Python standard library: /usr/lib/python2.6
Platform: Linux-2.6.32.3-desktop-2mnb-i686-with-mandrake-2010.1-Cooker
bzrlib: /usr/lib/python2.6/site-packages/bzrlib
Bazaar configuration: /home/shlomi/.bazaar
Bazaar log file: /home/shlomi/.bzr.log
Copyright 2005, 2006, 2007, 2008, 2009 Canonical Ltd.
http://bazaar-vcs.org/
bzr comes with ABSOLUTELY NO WARRANTY. bzr is free software, and
you may use, modify and redistribute it under the terms of the GNU
General Public License version 2 or later.
1.07user 0.06system 0:01.20elapsed 94%CPU (0avgtext+0avgdata 50896maxresident)k
0inputs+0outputs (0major+4930minor)pagefaults 0swaps
shlomi:~$ time bzr rocks
It sure does!
0.94user 0.05system 0:01.03elapsed 95%CPU (0avgtext+0avgdata 57008maxresident)k
0inputs+0outputs (0major+4341minor)pagefaults 0swaps
shlomi:~$ time bzr rocks
It sure does!
1.16user 0.05system 0:01.29elapsed 94%CPU (0avgtext+0avgdata 57104maxresident)k
0inputs+8outputs (0major+4462minor)pagefaults 0swaps
> 1.16user 0.05system 0:01.29elapsed 94%CPU (0avgtext+0avgdata 57104maxresident)k 0inputs+8outputs (0major+4462minor)pagefaults 0swaps
Am I read this correctly: the commands spends 1 second in user time, 50 ms in system and 1 minute overall? These numbers just does not correlate each to other.
The `bzr rocks` command do almost nothing -- just starts python and then execute more or less simple code. I guess something not very good with either disk read/write or python iterpreter itself. But it's not the bzr slowness as general rule as you said in your article.
![[User Picture]](https://l-userpic.livejournal.com/116762888/4231862) | From: shlomif 2010-01-14 10:09 am (UTC)
Re: My machine | (Link)
|
> 1.16user 0.05system 0:01.29elapsed 94%CPU (0avgtext+0avgdata 57104maxresident)k
0inputs+8outputs (0major+4462minor)pagefaults 0swaps
Am I read this correctly: the commands spends 1 second in user time, 50 ms in system and 1 minute overall? These numbers just does not correlate each to other.
No, it was 1.29 second overall.
The `bzr rocks` command do almost nothing -- just starts python and then execute more or less simple code. I guess something not very good with either disk read/write or python iterpreter itself. But it's not the bzr slowness as general rule as you said in your article.
</blockquote>
But python is fast here:
shlomi:~$ time python -c 'print "Hello"'
Hello
0.02user 0.00system 0:00.03elapsed 82%CPU (0avgtext+0avgdata 11616maxresident)k
0inputs+0outputs (0major+820minor)pagefaults 0swaps
Oh, yes. Sorry. So your diff time is 1.6 second as you said in the post. Basically `bzr rocks` shows you the bzr startup time. So 1.3 seconds is bzr startup time on your machine, and 0.3 seconds is the diff operation itself. | |