{"thread":{"id":"6107","subject":"cgit vs. gitweb","startedAt":"2006-12-25T17:21:47Z","lastAt":"2006-12-26T00:44:44Z","messageCount":6,"participants":["Lars Hjemli","Jakub Narebski","Robert Fitzsimons"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"30272","messageId":"8c5c35580612250921o765e141cq27f81b06364d0a4@mail.gmail.com","threadId":"6107","inReplyTo":null,"subject":"cgit vs. gitweb","fromName":"Lars Hjemli","fromEmail":"hjemli@gmail.com","sentAt":"2006-12-25T17:21:47Z","receivedAt":"2006-12-25T17:21:47Z","isPatch":false,"sender":{"key":"hjemli@gmail.com","avatar":null},"body":"Hi\n\nI wanted to compare cgit against gitweb to see the effect of using\nlibgit and internal caching. So I ran the attached scripts against\nhttp://hjemli.net/git/ and http://hjemli.net/cgi-bin/gitweb.cgi as a\nvery simplistic benchmark.\n\nThe scripts forks a number of similar child processes (specified by\n$1) and then uses curl(1) to request the first log page of three\nrepositories $2 times. This is an attempt to simulate concurrent\nrequests for different pages/repositories (I chose the log-pages since\nthey're pretty similar in cgit and gitweb, both showing info for 100\ncommits).\n\nThe numbers are the average of three runs, executed from another box\non my subnet. To avoid a roundtrip to my ISP, the pages are accessed\nby a local hostname.\n\nSo, here's the results, as measured by time(1):\n\nfork count|cached uncached gitweb.cgi\n---- -----+------ -------- ----------\n   0    10|  0.28     0.46      15.33\n   1    10|  0.56     0.77      29.72\n  10    10|  2.77     4.22     166.40\n\nfork: number of child processes\ncount: number of loop iterations, each requesting 3 different log-pages\ncached: results for cgit with caching enabled\nuncached: results for cgit with caching disabled\ngitweb.cgi: results for gitweb\n\nIf ((fork+1) * count * 3) is taken as a rough estimate of the total\nnumber of page requests, then requests/second looks like this:\n\n req| cached uncached gitweb.cgi\n----+------- -------- ----------\n  30| 107.14    65.22       1.96\n  60| 107.14    77.92       2.01\n 330| 119.13    78.20       1.98\n\n\n-- \nlarsh\n\nps: server is an AMD Athlon XP2600, running at ~2Ghz with 512MB ram\n"},{"id":"30278","messageId":"empikd$s32$1@sea.gmane.org","threadId":"6107","inReplyTo":"8c5c35580612250921o765e141cq27f81b06364d0a4@mail.gmail.com","subject":"Re: cgit vs. gitweb","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-12-25T22:19:34Z","receivedAt":"2006-12-25T22:19:34Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"[Cc: git@vger.kernel.org]\n\nLars Hjemli wrote:\n\n> I wanted to compare cgit against gitweb to see the effect of using\n> libgit and internal caching. So I ran the attached scripts against\n> http://hjemli.net/git/ and http://hjemli.net/cgi-bin/gitweb.cgi as a\n> very simplistic benchmark.\n\nFirst, could you try this also with mod_perl, not only CGI?\n\n> The scripts forks a number of similar child processes (specified by\n> $1) and then uses curl(1) to request the first log page of three\n> repositories $2 times. This is an attempt to simulate concurrent\n> requests for different pages/repositories (I chose the log-pages since\n> they're pretty similar in cgit and gitweb, both showing info for 100\n> commits).\n\nCould you include ApacheBench (ab) results?\n\n-- \nJakub Narebski\nWarsaw, Poland\nShadeHawk on #git\n"},{"id":"30282","messageId":"8c5c35580612251604s5e211518yd958fdc2e73232ef@mail.gmail.com","threadId":"6107","inReplyTo":"empikd$s32$1@sea.gmane.org","subject":"Re: cgit vs. gitweb","fromName":"Lars Hjemli","fromEmail":"hjemli@gmail.com","sentAt":"2006-12-26T00:04:39Z","receivedAt":"2006-12-26T00:04:39Z","isPatch":false,"sender":{"key":"hjemli@gmail.com","avatar":null},"body":"On 12/25/06, Jakub Narebski <jnareb@gmail.com> wrote:\n> [Cc: git@vger.kernel.org]\n>\n> Lars Hjemli wrote:\n>\n> > I wanted to compare cgit against gitweb to see the effect of using\n> > libgit and internal caching. So I ran the attached scripts against\n> > http://hjemli.net/git/ and http://hjemli.net/cgi-bin/gitweb.cgi as a\n> > very simplistic benchmark.\n>\n> First, could you try this also with mod_perl, not only CGI?\n\nWell, not easily I'm afraid: I'm running slackware 11 w. apache\n1.3.37, w.o. mod_perl, and when trying to install mod_perl tonight I\nended up w.o. a working httpd :-(\n\nBut I guess someone who has tested gitweb w. and w.o. mod_perl could\ncome up with an estimate on the difference between them?\n\n\n> Could you include ApacheBench (ab) results?\n\nSure (I didn't know about this tool, thanks for the pointer)\n\nHere's the result of a few requests:\n\n$ ab -n 1000 -c 1 http://box1/git/cgit/log/?h=master\nThis is ApacheBench, Version 1.3d <$Revision: 1.73 $> apache-1.3\n[...snip...]\nDocument Path:          /git/cgit/log/?h=master\nDocument Length:        9373 bytes\n\nConcurrency Level:      1\nTime taken for tests:   5.788 seconds\nComplete requests:      1000\nFailed requests:        0\nBroken pipe errors:     0\nTotal transferred:      9604000 bytes\nHTML transferred:       9373000 bytes\nRequests per second:    172.77 [#/sec] (mean)\nTime per request:       5.79 [ms] (mean)\nTime per request:       5.79 [ms] (mean, across all concurrent requests)\nTransfer rate:          1659.30 [Kbytes/sec] received\n\nConnnection Times (ms)\n              min  mean[+/-sd] median   max\nConnect:        0     0    0.0      0     0\nProcessing:     3     5   19.0      3   206\nWaiting:        3     5   19.0      3   206\nTotal:          3     5   19.0      3   206\n\nPercentage of the requests served within a certain time (ms)\n  50%      3\n  66%      3\n  75%      3\n  80%      3\n  90%      4\n  95%      4\n  98%      4\n  99%      4\n 100%    206 (last request)\n\n\n$ ab -n 1000 -c 10 http://box1/git/cgit/log/?h=master\n[..snip..]\nConcurrency Level:      10\nTime taken for tests:   3.421 seconds\nComplete requests:      1000\nFailed requests:        0\nBroken pipe errors:     0\nTotal transferred:      9604000 bytes\nHTML transferred:       9373000 bytes\nRequests per second:    292.31 [#/sec] (mean)\nTime per request:       34.21 [ms] (mean)\nTime per request:       3.42 [ms] (mean, across all concurrent requests)\nTransfer rate:          2807.37 [Kbytes/sec] received\n\nConnnection Times (ms)\n              min  mean[+/-sd] median   max\nConnect:        0     0    0.0      0     1\nProcessing:     3    31   98.8     13  1037\nWaiting:        3    31   98.8     13  1037\nTotal:          3    31   98.8     13  1037\nERROR: The median and mean for the initial connection time are more\nthan twice the standard\n       deviation apart. These results are NOT reliable.\n\nPercentage of the requests served within a certain time (ms)\n  50%     13\n  66%     16\n  75%     17\n  80%     20\n  90%     27\n  95%     61\n  98%    335\n  99%    665\n 100%   1037 (last request)\n\n$ ab -n 1000 -c 100 http://box1/git/cgit/log/?h=master\n[..snip..]Concurrency Level:      100\nTime taken for tests:   3.450 seconds\nComplete requests:      1000\nFailed requests:        0\nBroken pipe errors:     0\nTotal transferred:      9612547 bytes\nHTML transferred:       9381316 bytes\nRequests per second:    289.86 [#/sec] (mean)\nTime per request:       345.00 [ms] (mean)\nTime per request:       3.45 [ms] (mean, across all concurrent requests)\nTransfer rate:          2786.25 [Kbytes/sec] received\n\nConnnection Times (ms)\n              min  mean[+/-sd] median   max\nConnect:        0     0    0.3      0     3\nProcessing:     9   322  143.8    311  1780\nWaiting:        6   322  143.8    311  1780\nTotal:          9   322  143.6    311  1780\n\nPercentage of the requests served within a certain time (ms)\n  50%    311\n  66%    316\n  75%    321\n  80%    323\n  90%    334\n  95%    383\n  98%    737\n  99%   1146\n 100%   1780 (last request)\n\n$ ab -n 100 -c 1 http://box1/cgi-bin/gitweb.cgi?p=cgit;a=shortlog\n[...snip...]\nDocument Path:          /cgi-bin/gitweb.cgi?p=cgit\nDocument Length:        16636 bytes\n\nConcurrency Level:      1\nTime taken for tests:   21.908 seconds\nComplete requests:      100\nFailed requests:        0\nBroken pipe errors:     0\nTotal transferred:      1678100 bytes\nHTML transferred:       1663600 bytes\nRequests per second:    4.56 [#/sec] (mean)\nTime per request:       219.08 [ms] (mean)\nTime per request:       219.08 [ms] (mean, across all concurrent requests)\nTransfer rate:          76.60 [Kbytes/sec] received\n\nConnnection Times (ms)\n              min  mean[+/-sd] median   max\nConnect:        0     0    0.0      0     0\nProcessing:   216   219    1.0    219   222\nWaiting:      216   219    0.9    219   221\nTotal:        216   219    1.0    219   222\n\nPercentage of the requests served within a certain time (ms)\n  50%    219\n  66%    219\n  75%    220\n  80%    220\n  90%    221\n  95%    221\n  98%    221\n  99%    222\n 100%    222 (last request)\n\n$ ab -n 100 -c 10 http://box1/cgi-bin/gitweb.cgi?p=cgit;a=shortlog\n[...snip...]\nConcurrency Level:      10\nTime taken for tests:   23.480 seconds\nComplete requests:      100\nFailed requests:        0\nBroken pipe errors:     0\nTotal transferred:      1744006 bytes\nHTML transferred:       1728636 bytes\nRequests per second:    4.26 [#/sec] (mean)\nTime per request:       2348.00 [ms] (mean)\nTime per request:       234.80 [ms] (mean, across all concurrent requests)\nTransfer rate:          74.28 [Kbytes/sec] received\n\nConnnection Times (ms)\n              min  mean[+/-sd] median   max\nConnect:        0     0    0.0      0     0\nProcessing:   216  2244  897.8   2044  4905\nWaiting:      216  2244  897.8   2043  4905\nTotal:        216  2244  897.8   2044  4905\n\nPercentage of the requests served within a certain time (ms)\n  50%   2044\n  66%   2566\n  75%   3008\n  80%   3119\n  90%   3487\n  95%   3591\n  98%   4094\n  99%   4171\n 100%   4905 (last request)\n\n$ ab -n 100 -c 50 http://box1/cgi-bin/gitweb.cgi?p=cgit;a=shortlog\n[...snip...]\nConcurrency Level:      50\nTime taken for tests:   29.552 seconds\nComplete requests:      100\nFailed requests:        0\nBroken pipe errors:     0\nTotal transferred:      1978127 bytes\nHTML transferred:       1958697 bytes\nRequests per second:    3.38 [#/sec] (mean)\nTime per request:       14776.00 [ms] (mean)\nTime per request:       295.52 [ms] (mean, across all concurrent requests)\nTransfer rate:          66.94 [Kbytes/sec] received\n\nConnnection Times (ms)\n              min  mean[+/-sd] median   max\nConnect:        0     1    0.0      1     1\nProcessing:   221 11464 5725.4  11769 22556\nWaiting:      221 11464 5725.5  11769 22556\nTotal:        221 11465 5725.6  11770 22557\nERROR: The median and mean for the initial connection time are more\nthan twice the standard\n       deviation apart. These results are NOT reliable.\n\nPercentage of the requests served within a certain time (ms)\n  50%  11770\n  66%  14899\n  75%  16229\n  80%  16535\n  90%  19184\n  95%  20065\n  98%  22227\n  99%  22397\n 100%  22557 (last request)\n\n\nThis does seem to confirm the results of my homemade scripts.\n\n-- \nlarsh\n"},{"id":"30283","messageId":"200612260132.41062.jnareb@gmail.com","threadId":"6107","inReplyTo":"8c5c35580612251604s5e211518yd958fdc2e73232ef@mail.gmail.com","subject":"Re: cgit vs. gitweb","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-12-26T00:32:40Z","receivedAt":"2006-12-26T00:32:40Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Lars Hjemli wrote:\n> On 12/25/06, Jakub Narebski <jnareb@gmail.com> wrote:\n>> Lars Hjemli wrote:\n>>\n>>> I wanted to compare cgit against gitweb to see the effect of using\n>>> libgit and internal caching. So I ran the attached scripts against\n>>> http://hjemli.net/git/ and http://hjemli.net/cgi-bin/gitweb.cgi as a\n>>> very simplistic benchmark.\n\n[...] \n\n>> Could you include ApacheBench (ab) results?\n> \n> Sure (I didn't know about this tool, thanks for the pointer)\n> \n> Here's the result of a few requests:\n[snip]\n> This does seem to confirm the results of my homemade scripts.\n\nBy the way, which version of gitweb did you use (shortened sha1 of \ncommit, or result of git-describe)? I'm interested if it is before\nor after Robert Fitzsimons patches which replaced 101 forks in\nlog-like views with 1 fork, which I think affects gitweb performance\na lot.\n\nThe page which is optimized is summary view, if you use projects_list\nand not projectroot directory...\n-- \nJakub Narebski\nPoland\n"},{"id":"30284","messageId":"20061226004413.GA6558@localhost","threadId":"6107","inReplyTo":"200612260132.41062.jnareb@gmail.com","subject":"Re: cgit vs. gitweb","fromName":"Robert Fitzsimons","fromEmail":"robfitz@273k.net","sentAt":"2006-12-26T00:44:13Z","receivedAt":"2006-12-26T00:44:13Z","isPatch":false,"sender":{"key":"robfitz@273k.net","avatar":null},"body":"> By the way, which version of gitweb did you use (shortened sha1 of \n> commit, or result of git-describe)? I'm interested if it is before\n> or after Robert Fitzsimons patches which replaced 101 forks in\n> log-like views with 1 fork, which I think affects gitweb performance\n> a lot.\n\nHere are the numbers for a few tests I ran yesterday, this is with\ngitweb without mod_perl.\n\nv267,                  1842 38.5 +/- ms (with v1.4.4.3 git tools)\nv1.4.4.3,               445  2.5 +/- ms\nmaster,                 445  2.5 +/- ms\nmaster + bulk patches,  340  3.7 +/- ms (--skip patch)\n\n(/usr/sbin/ab -n 20 -k \"http://localhost/git/?p=home/bob/src/git/git/.git;a=summary\")\n\nRobert\n"},{"id":"30285","messageId":"8c5c35580612251644u26fde33aoe23d331c9192f8e7@mail.gmail.com","threadId":"6107","inReplyTo":"200612260132.41062.jnareb@gmail.com","subject":"Re: cgit vs. gitweb","fromName":"Lars Hjemli","fromEmail":"hjemli@gmail.com","sentAt":"2006-12-26T00:44:44Z","receivedAt":"2006-12-26T00:44:44Z","isPatch":false,"sender":{"key":"hjemli@gmail.com","avatar":null},"body":"On 12/26/06, Jakub Narebski <jnareb@gmail.com> wrote:\n> By the way, which version of gitweb did you use (shortened sha1 of\n> commit, or result of git-describe)?\n\nResults from ab used gitweb/1.4.4.3.gd4ada (pulled tonight), but my\nhomemade scripts used c902c9a6 (from dec 21)\n\n> I'm interested if it is before\n> or after Robert Fitzsimons patches which replaced 101 forks in\n> log-like views with 1 fork, which I think affects gitweb performance\n> a lot.\n\nab is after the patches, my homemade scripts was before\n\n> The page which is optimized is summary view, if you use projects_list\n> and not projectroot directory...\n\nI tested 'a=shortlog', since it seems to be functionally equivalent to\ncgits log view.\n\n-- \nlarsh\n"}]}