git/list[1] front-page[2] threads[3] people[4] search[5] about
 

cgit vs. gitweb

From
LHLars Hjemli <hjemli@gmail.com>
Date
Dec 25, 2006, 17:21 UTC
Message-ID
<8c5c35580612250921o765e141cq27f81b06364d0a4@mail.gmail.com>
Hi

I wanted to compare cgit against gitweb to see the effect of using libgit and internal caching. So I ran the attached scripts against http://hjemli.net/git/ and http://hjemli.net/cgi-bin/gitweb.cgi 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 commits).

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
-- 
larsh

ps: server is an AMD Athlon XP2600, running at ~2Ghz with 512MB ram
Next: Jakub Narebski
Message 1 of 6 in “cgit vs. gitweb”
  1. Lars HjemliDec 25, 2006
  2. Jakub NarebskiDec 25, 2006
  3. Lars HjemliDec 26, 2006
  4. Jakub NarebskiDec 26, 2006
  5. Robert FitzsimonsDec 26, 2006
  6. Lars HjemliDec 26, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.