Re: [PATCH] gitweb: Use config file or file for repository owner's name.
- From
- Bruno Cesar Ribas <ribas@c3sl.ufpr.br>
- Date
- Feb 5, 2008, 04:41 UTC
- Message-ID
- <20080205044121.GA13263@c3sl.ufpr.br>
- In-Reply-To
- <7vabmmg0cb.fsf@gitster.siamese.dyndns.org>
On Wed, Jan 30, 2008 at 07:06:44PM -0800, Junio C Hamano wrote:
> If the config reading interface is too slow (somebody has to > bench it on a large set of repositories), maybe we would need to
I made a simple bench as follows.
dd= 'dd if=/dev/zero of=/home/bruno/dds/$i bs=1M count=400000'
Machine: 4*opteron 2.8GHz
32GB ram
14*750GB RAID0 sata2 /home
Generated a 1000 projects [ too much?! git.debian.org has 668]
For each test a 'echo 2 > /proc/sys/vm/drop_caches' was done before running
it.command: time gitweb.cgi > /dev/null
----------------- ----------------- ------------ -----------------
With Project List NO Project List LoadAvg description way
----------------- ----------------- ------------ -----------------
->0*dd ->0*dd
1m0.851s 1m18.651s 0.78 0.70 description file
1m1.511s 0m55.051s 0.83 0.35 gitweb.description
->2*dd ->2*dd
21m0.899s 17m19.706s 8.21 6.48 description file
16m29.455s 13m36.602s 5.90 5.95 gitweb.description
->4*dd ->4*dd
23m6.781s 26m51.544s 10.81 12 description file
20m57.249s 26m32.704s 11.50 12.55 gitweb.descriptionMy test was simple =) But we can get some conclusions on it. Running a git-config -z -l for each git repository is not a problem, as we obtain same speed on tests (only loosing on very high IO's) [maybe i should run with 8*dd or 80...].
After that, having a gitweb.owner might not be a problem as we parse all config file once.
Running the "git-for-each-ref" is the big killer [waaaw =P]. We could store timestamp at gitweb.lastchange, which is updated by a hook?! Or store it in some way[ i will bench with if stored].
-- Bruno Ribas - ribas@c3sl.ufpr.br http://web.inf.ufpr.br/ribas C3SL: http://www.c3sl.ufpr.br