From: Kay Sievers <kay.sievers@vrfy.org>
To: Linus Torvalds <torvalds@osdl.org>
Cc: "H. Peter Anvin" <hpa@zytor.com>, Git Mailing List <git@vger.kernel.org>
Subject: Re: gitweb.cgi
Date: Wed, 19 Oct 2005 03:23:41 +0200 [thread overview]
Message-ID: <20051019012341.GA15256@vrfy.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0510181753340.3369@g5.osdl.org>
On Tue, Oct 18, 2005 at 06:02:29PM -0700, Linus Torvalds wrote:
>
>
> On Tue, 18 Oct 2005, H. Peter Anvin wrote:
> >
> > It turns out that the default CacheSize is only 256K. D'oh! Fixed.
> >
> > I also changed the CacheDefaultExpire to 600 seconds.
>
> Ok, that sounds like it should improve things. My quick tests didn't seem
> to show any difference, though. Do you need to re-load the apache module
> or something?
>
> > The only thing the front page really should need is to know when the last
> > change to the tree was, which presumably means looking at each head of each
> > tree and follow the chain until there is a datable object.
>
> Yeah. I tried to follow gitweb.cgi, but I'm neither http- nor
> perl-literate, so I'm not sure I caught everything.
>
> But it does seem to basically end up doing a "git_read_commit()" for each
> project, and that in turn was doing the "git-rev-list --max-count=1" thing
> that I just sent out a suggested improvement for.
>
> It effectively removes two or more copies of
>
> stat64("/objects/xy/zzy", {...})
> fd = open("objects/xy/zzy", O_RDONLY|O_NOATIME)
> addr = mmap(NULL, size, PROT_READ, MAP_PRIVATE, fd, 0)
> close(fd)
> munmap(addr, size)
>
> which really should be very cheap operations, but hey, if the disk head is
> somewhere else (and busy) and it's not cached, it can be quite expensive.
> Especially since we don't end up usign the result.
>
> I'm sure there's room for improvement inside gitweb itself too, but maybe
> the git-rev-list optimization will help.
There definitely is! But I tried a single "stat() all HEAD files" with a
simple script and it took more than 3 seconds for the 80 trees. Then I
gave up "optimizing" and was sure we want to have a single-file cached front
page instead. :)
Kay
next prev parent reply other threads:[~2005-10-19 1:23 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-18 2:57 gitweb.cgi H. Peter Anvin
2005-10-18 11:07 ` gitweb.cgi Kay Sievers
2005-10-18 16:52 ` gitweb.cgi H. Peter Anvin
2005-10-18 17:24 ` gitweb.cgi H. Peter Anvin
2005-10-18 20:44 ` gitweb.cgi Brian Gerst
2005-10-19 0:27 ` gitweb.cgi Linus Torvalds
2005-10-19 0:30 ` gitweb.cgi H. Peter Anvin
2005-10-19 0:53 ` Optimize common case of git-rev-list (was Re: gitweb.cgi) Linus Torvalds
2005-10-19 0:38 ` gitweb.cgi H. Peter Anvin
2005-10-19 1:02 ` gitweb.cgi Linus Torvalds
2005-10-19 1:14 ` gitweb.cgi H. Peter Anvin
2005-10-19 13:59 ` gitweb.cgi Linus Torvalds
2005-10-19 16:16 ` gitweb.cgi H. Peter Anvin
2005-10-19 1:23 ` Kay Sievers [this message]
2005-10-19 1:33 ` gitweb.cgi Kay Sievers
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=20051019012341.GA15256@vrfy.org \
--to=kay.sievers@vrfy.org \
--cc=git@vger.kernel.org \
--cc=hpa@zytor.com \
--cc=torvalds@osdl.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.