Article View: news.software.nntp
Article #24530Re: NNRP delay
From: Lars Fenneberg
Date: Sun, 21 Dec 1997 00:00
Date: Sun, 21 Dec 1997 00:00
63 lines
2930 bytes
2930 bytes
Hi all!
Brian wrote:
> What is the best cure for getting NNRPD to spawn faster when someone
> connects to port 119? Sometimes it can take as long as 10-15 seconds!
>
> More memory? A certain patch? INNd starts up quick for my peers, but
> NNRPd lags......I thought I had read that the "apb" patch was what you
> should do for this problem.
>
> INN-1.7
> Linux
We're also seeing this. I don't think that it is a problem
with INN but with Linux' implementation of the execve
system call. Our inn is very fast on sending the
innd banner (if you're allowed as a feed) but if you
issue a "mode reader" the wait begins. I've straced
this and here're the results (times in seconds in <..>
brackets):
Just before the execve... the fork in innd goes quite fast:
[...]
getsockopt(16, IPPROTO_IP4, [16], [0]) = 0 <0.000056>
setsockopt(16, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0 <0.000051>
ioctl(16, FIONBIO, [0]) = 0 <0.000048>
fork() = 22623 <0.015371>
But then the exec of the nnrpd program in the new process:
dup2(16, 0) = 0 <0.000199>
dup2(16, 1) = 1 <0.000230>
dup2(16, 2) = 2 <0.000112>
close(16) = 0 <0.000047>
fcntl(0, F_SETFD, 0) = 0 <0.000049>
fcntl(1, F_SETFD, 0) = 0 <0.000047>
fcntl(2, F_SETFD, 0) = 0 <0.000047>
nice(4) = 0 <0.000047>
setgid(13) = 0 <0.000046>
setuid(9) = 0 <0.000046>
execve("/usr/sbin/in.nnrpd", ["/usr/sbin/in.nnrpd",
"-s
"...], [/* 6 vars */]) = 0 <28.574605>
mmap(0, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x40006000 <0.000067>
[...]
Do you see that? It took over 28 seconds. If nnrpd is started
via inetd then the execve is almost instantinious(sp?).
I think it has something to do with the large memory
footprint (mostly mmap'ed memory) of innd.
Any Linux kernel hackers around that like to comment?
Lars.
--
Lars Fenneberg, lf@elemental.net (private), lf@cityline.net (work)
pgp fingerprint D1 28 F1 FF 3C 6B C0 27 CC 9C 6C 09 34 0A 55 18
Technical Details
Message-ID:
<349CE587.173F7AA7@elemental.net>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mailReferences:
<349B5357.27BF@shreve.net>Show Full Headers
Complete Article Headers
Message-ID: <349CE587.173F7AA7@elemental.net> Subject: Re: NNRP delay Date: Sun, 21 Dec 1997 00:00:00 +0000 From: Lars Fenneberg <lf@elemental.net> References: <349B5357.27BF@shreve.net> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail X-Deja-AN: 309046687 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii Organization: MCS - Moorbek Computer Systeme GmbH, Hamburg, Germany Mime-Version: 1.0 Newsgroups: news.software.nntp