git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Lars Hjemli" <hjemli@gmail.com>
To: "Git Mailing List" <git@vger.kernel.org>
Subject: cgit vs. gitweb
Date: Mon, 25 Dec 2006 18:21:47 +0100	[thread overview]
Message-ID: <8c5c35580612250921o765e141cq27f81b06364d0a4@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1593 bytes --]

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

[-- Attachment #2: cgit.sh --]
[-- Type: application/x-sh, Size: 375 bytes --]

[-- Attachment #3: gitweb.sh --]
[-- Type: application/x-sh, Size: 427 bytes --]

             reply	other threads:[~2006-12-25 17:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-25 17:21 Lars Hjemli [this message]
2006-12-25 22:19 ` cgit vs. gitweb Jakub Narebski
2006-12-26  0:04   ` Lars Hjemli
2006-12-26  0:32     ` Jakub Narebski
2006-12-26  0:44       ` Robert Fitzsimons
2006-12-26  0:44       ` Lars Hjemli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8c5c35580612250921o765e141cq27f81b06364d0a4@mail.gmail.com \
    --to=hjemli@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).