Archive for July, 2008

darcs, hg, git and bzr on low-end

Wednesday, July 2nd, 2008

On 2006-09-24, era commented on this post, saying that bzr is not usable on low end machines. era had a 133MHz laptop with 64MB RAM. He was on a Ubuntu Dapper without X and found that both SVK and bzr fell on their faces after having consumed up all memory. (He has 1G swap.) Then he tried darcs and found darcs just works.

This comment was post on 2006-09-24, roughly two years ago. What’s up now? And what about hg and git? I decided to do a test on my virtual machine.

I tested darcs, hg, git, and bzr on Debian Etch: (some versions are in backports)

  • darcs 1.0.9~rc1-0.1
  • mercurial 0.9.1-1+etch1
  • git 1:1.5.5.1-1~bpo40+1
  • bzr 1.5-1~bpo40+1

My virtual machine has 64 MB RAM, 256MB swap and a CPU which is something like old Celeron before the P III generation. Also, I set a more strict limit on the user who is running VCSes. (Much stricter than the default setting on Linux.)

$ ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) 102400
max nice                        (-e) 0
file size               (blocks, -f) 2048
pending signals                 (-i) 4096
max locked memory       (kbytes, -l) 32
max memory size         (kbytes, -m) 1000
open files                      (-n) 256
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
max rt priority                 (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 100
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

I cloned a 49MB darcs repository and a 36MB hg repository. They all work out.

When I’m trying to clone a 27M git repository, I got a “File size limit exceeded” error. Similarly, I got a “File too large” error when cloning a 46M bzr repository. After changing to Linux’s default ulimit settings:

core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
max nice                        (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) unlimited
max locked memory       (kbytes, -l) unlimited
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) unlimited
max rt priority                 (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) unlimited
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

git works. However bzr hung out for more than 5 hours. I have to manually kill it at last. (This is not a network problem. Cloning the same bzr repository costs several minutes on a 1.33GHz, 512MB machine.) Then I tried to clone a 15M bzr repository. This time bzr does work on the machine.

So the conclusion is that darcs and hg are more light weight choices than git and bzr. In a limited low end box, git is still acceptable, while bzr is not.

Two years passed and bzr still doesn’t work well on low end boxes.

netbsd真有古風

Wednesday, July 2nd, 2008

debian的base裡less也不肯帶,還帶了nano和vim-tiny。freebsd除了vi還帶了ee。都還帶了“正常”的編輯器。netbsd的基本系統只帶了vi,可能看別人都帶了2個,所以手冊說,基本系統裡有兩個編輯器,一個是vi,還有一個是…….ed。

mibbit

Tuesday, July 1st, 2008

mibbit.com是web界面的irc聊天服務。支持freenode等流行的irc網絡。有一些有意思的特性,比如加入一個頻道後會顯示你加入前的一部分談話,ssl支持等。再配合http代理,不能出國的校園網無法連freenode的問題應該可以解決,當然兩重代理後,估計會非常慢。