cgit vs. gitweb

From: Lars Hjemli <>
Date: 2006-12-26 04:21:47

I wanted to compare cgit against gitweb to see the effect of using
libgit and internal caching. So I ran the attached scripts against and as a
very simplistic benchmark.

The scripts forks a number of similar child processes (specified by
$1) and then uses curl(1) to request the first log page of three
repositories $2 times. This is an attempt to simulate concurrent
requests for different pages/repositories (I chose the log-pages since
they're pretty similar in cgit and gitweb, both showing info for 100

The numbers are the average of three runs, executed from another box
on my subnet. To avoid a roundtrip to my ISP, the pages are accessed
by a local hostname.

So, here's the results, as measured by time(1):

fork count|cached uncached gitweb.cgi
---- -----+------ -------- ----------
   0    10|  0.28     0.46      15.33
   1    10|  0.56     0.77      29.72
  10    10|  2.77     4.22     166.40

fork: number of child processes
count: number of loop iterations, each requesting 3 different log-pages
cached: results for cgit with caching enabled
uncached: results for cgit with caching disabled
gitweb.cgi: results for gitweb

If ((fork+1) * count * 3) is taken as a rough estimate of the total
number of page requests, then requests/second looks like this:

 req| cached uncached gitweb.cgi
----+------- -------- ----------
  30| 107.14    65.22       1.96
  60| 107.14    77.92       2.01
 330| 119.13    78.20       1.98


ps: server is an AMD Athlon XP2600, running at ~2Ghz with 512MB ram

To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to
More majordomo info at

Received on Tue Dec 26 04:22:35 2006

This archive was generated by hypermail 2.1.8 : 2006-12-26 04:24:09 EST