Git vs. Subversion: A performance comparison

I've used Git for my personal projects for quite some time now. Before Git, I used Subversion. I occasionally used CVS in the past (mainly for the Drupal repository). I had heard about Git and all its goodies during the time I used Subversion, but didn't think to take it for a spin. Until one day, that I tested it. I read a couple of resources to understand the logic behind it and started with a dummy repository. It was the first commit that I did when I thought "Wow, this thing is damn fast". It took me a while to understand the principles of a distributed vcs and why all commit, branch, etc. operations were super fast. After that day, I never looked back (that is, I never used again Subversion or CVS for my needs).

The test

Today, I thought to compare Git and Subversion from the performance perspective. I have a repository of 2,757 files and 428 directories (which is actually the trunk version of the Yii PHP framework as of today), a total of 26MiB. For my projects, I use the free Unfuddle service provider, which provides free private Subversion and Git repositories. For small projects, I highly recommend it. So, I created one Subversion and one Git repository. For the first, I checked out the (empty) repository from the Unfuddle server. I then added the files and committed. After some time, revision 1 was committed. I also did the opposite. I deleted my local repository copy and checked out rev.1 from the server. So, it's two simple commit and checkout procedures. For Git, I created an empty repository, committed the files and pushed to the Unfuddle server. Then, I deleted the local repository and cloned the remote repository. I counted the time needed for the procedures (two measurements for Subversion and other two for Git). The results are shown below. Times were measured using the time Linux command. The software versions used for Git is and for Subversion 1.6.16.

Commit times chart

Below is the network traffic during the Git push and pull operations and Subversion commit and checkout operations respectively:

Network traffic while Git pushing

Git push operation

Network traffic while Git pulling

Git pull operation

Network traffic while Subversion committing

Subversion commit

Network traffic while Subversion checking out

Subversion check out


Git is DAMN FAST! It's performance is excellent. While subversion took more than 22 minutes to commit all files to the remote repository, Git did the same procedure in less than 2 minutes! If this isn't fast, what is??? Even Git's pull (check out in Subversion terminology) operation is 11 seconds faster. From the network traffic during these operations, one can figure out that Subversion does not compress (although not 100% sure) or use the network effectively to commit files to the repository, while Git does the exact opposite and shines! The check out operation is OK I guess, but still Git is ~25% faster than Subversion.

So, who's the winner? Clearly, it's Git. Besides its far more superior performance, its features make it a far better (maybe the best at this point, although I haven't tried Mercurial or Bazaar) than anything else out there. I highly recommend that you try it out for a couple of days. You'll never go back!

υπολογιστές / computers: 
Χρήσιμο / Useful: 
Average: 5 (4 votes)
Ψηφίστε για την ποιότητα του άρθρου / Vote for the article's quality