Slow hgweb.cgi
Dominik Psenner
dpsenner at gmail.com
Wed Apr 13 06:50:43 CDT 2011
See below
> -----Original Message-----
> From: Adrian Buehlmann [mailto:adrian at cadifra.com]
> Sent: Wednesday, April 13, 2011 11:45 AM
> To: Dominik Psenner
> Cc: mercurial-devel at selenic.com
> Subject: Re: Slow hgweb.cgi
>
> On 2011-04-13 08:44, Dominik Psenner wrote:
> > *argh* I could bang my head on the table. I just did:
> >
> > 1 cloned the complete hgweb.cgi to another url (hgserver/hg2)
> > 2 set up a repository folder that is not a samba share (mkdir)
> > 3 copied the biggest repository to that folder
> > 4 ran a hg pull from my pc
> >
> > Guess what? It went through within a jiffy. So the problem is indeed
> > smb/cifs. Yet I do not fully understand what's going on because it
> doesn't
> > seem to be a timeout issue where hgweb.cgi is just waiting for the smb
> > share.
> >
> > I used to set it up with autofs:
> >
> > -- quote auto.cifs --
> > $ cat /etc/auto.cifs
> > HGRoot -fstype=cifs,rw,credentials=/etc/samba/cred-file,uid=www-
> data,gid=hg
> > ://"dc1/Disk_X/HGRoot/"&
> > -- eof quote--
> >
> > The script goes into a heavy operation that consumes one core completely
> for
> > a rather long time where it has no obvious reason to do that. *hm* It
> feels
> > like there's something in hg or hgweb that causes problems, but I can't
> > really confirm it. It just feels like hgweb is somehow doing:
> >
> > If samba
> > Heavy loop
> > Continue
>
> Do you see any unusual slowness if you enter
>
> $ dir \\servername\sharename
On my machine (Win7) it takes almost no time.
On the Server I cannot issue \\dc1\share as he doesn't know how to access
that uri. Anyway I did a hg --debug in for every possibility:
method | time | repository
---------------------------------------
local | 0m0.107s | /var/hg2/repos/XX-stable
smb+local | 0m0.216s | /var/hg/repos/XX-stable
hgweb | 0m0.549s | http://hgserver/hg2/XX-stable
smb+hgweb | 0m16.681s | http://hgserver/hg/XX-stable
The only performance penalty here applies to smb+hgweb. If kb/832161 would
be the problem, shouldn't smb+local be slow too?
>
> or
>
> $ dir \\servername
>
> Note that the second should fail, but I'm interested in how fast it fails.
>
> I'm still not so sure about the WebDAV stuff not being an issue
> (kb/832161)...
>
> Might be time to fire up wireshark and have a look at the messages
> exchanged.
>
> BTW, may I ask you to add your replies underneath the message you are
> replying to? (No top-posting).
Sure. Normally I would do it, but Outlook 2003 has its own philosophy about
that. ;-)
>
> FWIW, I'm not really a fan of putting repositories on windows shares.
> I'm just puzzled that people apparently still keep trying doing it.
>
Unfortunatly, that's something I have no influence in. That might change
sooner or later, once the right people start asking why. :-)
More information about the Mercurial-devel
mailing list