Thread View: news.software.nntp
6 messages
6 total messages
Started by Ragnar Lonn
Fri, 24 May 1996 00:00
Sluggish INND response?
Author: Ragnar Lonn
Date: Fri, 24 May 1996 00:00
Date: Fri, 24 May 1996 00:00
106 lines
6050 bytes
6050 bytes
Hello everybody,
We have a problem with the newsserver at our site. It is a powerful machine
- a Sparc 20/712 (2 CPU) with 320MB RAM, a striped news spool disk array made
out of 6 disks on two dedicated SCSI-buses, and a hardware disk cache
module - running Solaris 2.5 but its response to NNTP/NNRP connections
is very slow. INND seems to consume a lot of CPU time, and the system spends a
lot of time waiting for I/O, according to 'top'. We have between 20 and 50
NNRP readers and four feeds of which two are streaming their data to us.
Is it the streaming that causes the server to become so slow when responding
to connections? It also seems it is slow when accepting articles and is
responding to IHAVE commands. An IHAVE-response can take between 10 and
20 seconds...
I did a truss (trace) on innd and found out it did close to 1000 lseek()
and 1000 read() system calls per second. It hardly seemed to do anything
else in fact. Is this normal?
What can we do? Even though innd apparently lets the machine work quite
a lot it is not so heavily loaded, thanks to the oversized hardware
probably, so I have setup inetd to start nnrpd processes on port 118
so that those of our users that have newsreader clients where it is
possible to configure what portnumber to use will be able to connect
to the (nnrpd) server and read some. Most others (e.g. those using
Netscape as a reader) will get timeouts before they manage to connect
as it takes a minute or two (or more) for innd to start an nnrpd server.
Here is some output (bear with me :-) from various programs:
(the output from iostat is somewhat extreme)
[top]
last pid: 23651; load averages: 0.46, 0.55, 0.67 18:15:36
56 processes: 54 sleeping, 2 on cpu
Cpu states: 16.2% idle, 3.0% user, 14.2% kernel, 66.7% iowait, 0.0% swap
Memory: 315M real, 536K free, 59M swap, 529M free swap
PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND
3884 news -14 0 17M 3628K cpu 36.8H 25.40% 25.05% innd
[vmstat 5]
procs memory page disk faults cpu
r b w swap free re mf pi po fr de sr pe pe pe pe in sy cs us sy id
0 0 0 7152 2588 1 53 115 24 91 0 80 0 0 7 5 204 1488 143 8 34 58
0 1 0 528988 792 1 82 383 19 275 0 213 0 0 14 10 293 6737 200 8 33 59
0 0 0 528896 448 1 78 284 11 360 0 459 0 0 8 9 219 7638 160 10 35 55
0 0 0 529156 952 0 2 252 21 64 0 74 0 0 7 8 207 6023 134 5 26 69
0 0 0 529168 496 0 0 152 4 160 0 133 0 0 6 6 168 7200 132 5 31 65
[truss innd]
lseek(10, 0x04EC73EC, SEEK_SET) = 0x04EC73EC
read(10, " < - 4 l e o h n $ 2 5 4".., 56) = 56
lseek(10, 0x051C9404, SEEK_SET) = 0x051C9404
read(10, " < K P u z Q E A F J e i".., 56) = 56
lseek(10, 0x052D79BD, SEEK_SET) = 0x052D79BD
read(10, " < 4 m b 1 i k $ l p h @".., 56) = 56
read(9, "05 6829205 ;DD0105 $9D J".., 56) = 56
lseek(10, 0x05368291, SEEK_SET) = 0x05368291
read(10, " < 4 m 9 1 o s $ o 6 u @".., 56) = 56
lseek(10, 0x053BDD00, SEEK_SET) = 0x053BDD00
<about 49900 lines out of 50000 are lseek's and read's>
[iostat -x 30]
extended disk statistics
disk r/s w/s Kr/s Kw/s wait actv svc_t %w %b
ptesp-sc 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 2
ptesp-sc 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 2
ptesp0t0 4.3 2.3 28.2 14.6 3308.5 8.4 508135.6 100 69
ptesp0t1 3.5 1.7 21.2 8.3 25.4 0.1 4905.8 80 7
ptesp0t2 4.3 2.4 27.6 15.8 -3831.1 0.6 -573551.0 100 9
ptesp1t0 3.7 1.7 21.6 8.1 26.7 0.1 5061.2 53 7
ptesp1t1 4.2 2.3 29.0 15.0 -4318.8 0.6 -664842.3 100 9
ptesp1t2 3.8 1.7 22.9 8.3 20.6 0.1 3818.3 80 7
sd0 0.0 0.1 0.5 0.7 0.0 0.0 13.1 0 0
sd3 1.2 0.5 5.6 12.7 0.0 0.0 30.1 0 2
sd7 4.3 2.3 28.2 14.6 0.0 0.5 72.4 0 9
sd8 3.5 1.7 21.2 8.3 0.0 0.1 27.6 0 7
sd9 4.3 2.4 27.6 15.8 0.0 0.6 91.2 0 9
sd14 3.7 1.7 21.6 8.1 0.0 0.1 25.8 0 7
sd15 4.2 2.3 29.0 15.0 0.0 0.6 92.1 0 10
sd16 3.8 1.7 22.9 8.3 0.0 0.1 25.1 0 7
extended disk statistics
disk r/s w/s Kr/s Kw/s wait actv svc_t %w %b
ptesp-sc 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 2
ptesp-sc 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 2
ptesp0t0 7.6 0.8 43.7 5.1 4606.0 12.2 554298.0 100 100
ptesp0t1 7.4 1.0 38.3 4.4 154.0 0.1 18350.9 100 9
ptesp0t2 8.2 0.8 42.2 5.6 8694.0 0.1 966217.3 100 9
ptesp1t0 8.0 0.7 40.7 3.4 147.0 0.1 16977.0 100 9
ptesp1t1 7.6 1.0 42.4 6.7 7931.0 0.2 929631.6 100 9
ptesp1t2 7.4 0.6 41.5 2.8 105.0 0.1 13085.7 100 8
sd0 0.0 0.2 0.0 0.9 0.0 0.0 11.3 0 0
sd3 0.7 0.5 3.2 3.1 0.0 0.0 38.2 0 2
sd4 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0
sd7 7.6 0.8 43.7 5.1 0.0 0.2 21.2 0 9
sd8 7.4 1.0 38.3 4.4 0.0 0.1 13.8 0 9
sd9 8.2 0.8 42.2 5.6 0.0 0.1 13.0 0 10
sd14 8.0 0.7 40.7 3.4 0.0 0.1 12.0 0 9
sd15 7.6 1.0 42.4 6.7 0.0 0.2 20.8 0 9
sd16 7.4 0.6 41.3 2.8 0.0 0.1 12.6 0 8
Re: Sluggish INND response?
Author: Erland Sommarskog
Date: Sun, 02 Jun 1996 00:00
Date: Sun, 02 Jun 1996 00:00
59 lines
3507 bytes
3507 bytes
Ragnar Lonn (prl@algonet.se) writes: >We have a problem with the newsserver at our site. It is a powerful machine >- a Sparc 20/712 (2 CPU) with 320MB RAM, a striped news spool disk array made >out of 6 disks on two dedicated SCSI-buses, and a hardware disk cache >module - running Solaris 2.5 but its response to NNTP/NNRP connections >is very slow. INND seems to consume a lot of CPU time, and the system spends >a lot of time waiting for I/O, according to 'top'. We have between 20 and 50 >NNRP readers and four feeds of which two are streaming their data to us. >Is it the streaming that causes the server to become so slow when responding >to connections? It also seems it is slow when accepting articles and is >responding to IHAVE commands. An IHAVE-response can take between 10 and >20 seconds... > >I did a truss (trace) on innd and found out it did close to 1000 lseek() >and 1000 read() system calls per second. It hardly seemed to do anything >else in fact. Is this normal? We managed to solve this problem, and maybe the morals are worth putting in the FAQ, why I'm cc:ing a copy to Heiko. No, it had nothing to do with streaming. The problem was that the server had just recently been set up. We don't run expire here, but prefer dexpire which tries to keep a constant amount of disk space free. But with a 20GB spool, it takes a few weeks before you fill it up, so why run anything in the meantime? So. we thought, but that was our mistake. The history database consists of three files, the plain text files and the dbz files history.dir and history.pag. What size they need to have depends on the text file in question. INN makes an initial guess, but it goes far off the mark for a 20 GB, so you end up with a hash table which is overflowed over and over again, leading to excessive retrieval times. The fix was simple:rebuild the history.pag and history.dir files with the size of the current history file as input. So the moral is: even if you plan to run dexpire and just let the spool fill up, you must make sure that the pag- and dir-files are rebuilt regularly. Particularly when the database is constantly growing, you should run a rebuild each night. Also, be aware of that dexpire does not move history, but you are supposed to do that with the histtrim program which comes with dexpire. You can run it once a week if you like, but you get an unnecessarily large history file then. As for for which means to keep these files in trim, there are several ways: histtrim, "makehistory -r", expire. There are people in this group who are more competent than me on this point, so I'll stop here. The important thing is: an incorrectly sized DBZ file can sink your news system. -- Erland Sommarskog, Stockholm, sommar@algonet.se De klant heeft altijd recht - Nederl�ndskt ordspr�k.
Re: Sluggish INND response?
Author: Matthew Ward
Date: Mon, 03 Jun 1996 00:00
Date: Mon, 03 Jun 1996 00:00
72 lines
3888 bytes
3888 bytes
Erland Sommarskog wrote: > > Ragnar Lonn (prl@algonet.se) writes: > >We have a problem with the newsserver at our site. It is a powerful machine > >- a Sparc 20/712 (2 CPU) with 320MB RAM, a striped news spool disk array made [snip] > >responding to IHAVE commands. An IHAVE-response can take between 10 and > >20 seconds... > > [snip] > > We managed to solve this problem, and maybe the morals are worth putting > in the FAQ, why I'm cc:ing a copy to Heiko. > > No, it had nothing to do with streaming. The problem was that the server > had just recently been set up. We don't run expire here, but prefer > dexpire which tries to keep a constant amount of disk space free. > But with a 20GB spool, it takes a few weeks before you fill it up, > so why run anything in the meantime? > > So. we thought, but that was our mistake. The history database consists > of three files, the plain text files and the dbz files history.dir and > history.pag. What size they need to have depends on the text file > in question. INN makes an initial guess, but it goes far off the > mark for a 20 GB, so you end up with a hash table which is overflowed > over and over again, leading to excessive retrieval times. The fix > was simple:rebuild the history.pag and history.dir files with the > size of the current history file as input. > > So the moral is: even if you plan to run dexpire and just let the > spool fill up, you must make sure that the pag- and dir-files are > rebuilt regularly. Particularly when the database is constantly > growing, you should run a rebuild each night. > > Also, be aware of that dexpire does not move history, but you are > supposed to do that with the histtrim program which comes with > dexpire. You can run it once a week if you like, but you get an > unnecessarily large history file then. > > As for for which means to keep these files in trim, there are several > ways: histtrim, "makehistory -r", expire. There are people in this > group who are more competent than me on this point, so I'll stop here. OK. I'm eagerly looking for further responses along this line with regard to makehistory. Once (loooooong ago, when I had only a few newsgroups) I used to run a makehistory every week, just because. When I moved to a multi-volume spool to deal with a full newsfeed, I learned that makehistory doesn't deal well with the spool spread across multiple partitions, what with cross-posting across mount points etc, etc. (I think ... that was so long ago). Anyway ... can anyone recommend a decent "rebuild history from scratch" script that will deal with my news being spread all over three separate logical volumes? > > The important thing is: an incorrectly sized DBZ file can sink your > news system. Glub, glub! AD(thanks)VANCE, -- A lot of people in this country are | I'm certainly not. And I'm sick sick and tired of being told that | and tired of being told that I am. ordinary, decent people are fed up in | this country with being sick and tired. | /\/\ a tt == Matthew.Ward@gte.net
Re: Sluggish INND response?
Author: Matthew Ward
Date: Tue, 04 Jun 1996 00:00
Date: Tue, 04 Jun 1996 00:00
100 lines
4990 bytes
4990 bytes
Matthew Ward wrote:
>
> Erland Sommarskog wrote:
> >
> > Ragnar Lonn (prl@algonet.se) writes:
> > >We have a problem with the newsserver at our site. It is a powerful machine
> > >- a Sparc 20/712 (2 CPU) with 320MB RAM, a striped news spool disk array made
> [snip]
> > >responding to IHAVE commands. An IHAVE-response can take between 10 and
> > >20 seconds...
> > >
> [snip]
> >
> > We managed to solve this problem, and maybe the morals are worth putting
> > in the FAQ, why I'm cc:ing a copy to Heiko.
> >
> > No, it had nothing to do with streaming. The problem was that the server
> > had just recently been set up. We don't run expire here, but prefer
> > dexpire which tries to keep a constant amount of disk space free.
> > But with a 20GB spool, it takes a few weeks before you fill it up,
> > so why run anything in the meantime?
> >
> > So. we thought, but that was our mistake. The history database consists
> > of three files, the plain text files and the dbz files history.dir and
> > history.pag. What size they need to have depends on the text file
> > in question. INN makes an initial guess, but it goes far off the
> > mark for a 20 GB, so you end up with a hash table which is overflowed
> > over and over again, leading to excessive retrieval times. The fix
> > was simple:rebuild the history.pag and history.dir files with the
> > size of the current history file as input.
> >
> > So the moral is: even if you plan to run dexpire and just let the
> > spool fill up, you must make sure that the pag- and dir-files are
> > rebuilt regularly. Particularly when the database is constantly
> > growing, you should run a rebuild each night.
> >
> > Also, be aware of that dexpire does not move history, but you are
> > supposed to do that with the histtrim program which comes with
> > dexpire. You can run it once a week if you like, but you get an
> > unnecessarily large history file then.
> >
> > As for for which means to keep these files in trim, there are several
> > ways: histtrim, "makehistory -r", expire. There are people in this
> > group who are more competent than me on this point, so I'll stop here.
>
> OK. I'm eagerly looking for further responses along this line with
> regard to makehistory. Once (loooooong ago, when I had only a few
> newsgroups) I used to run a makehistory every week, just because.
>
> When I moved to a multi-volume spool to deal with a full newsfeed,
> I learned that makehistory doesn't deal well with the spool spread
> across multiple partitions, what with cross-posting across mount
> points etc, etc. (I think ... that was so long ago).
>
> Anyway ... can anyone recommend a decent "rebuild history from
> scratch" script that will deal with my news being spread all
> over three separate logical volumes?
>
> >
> > The important thing is: an incorrectly sized DBZ file can sink your
> > news system.
OK. I'm going to come right out and ask:
Does anyone know why the following would not work? My objective is
to have a correctly sized dbz file, assuming my history file is
intact and correct. Another BIG objective is to MINIMIZE down time,
so I am betting that running a chopped-up version of the makehistory
suggested in news-recovery(8) would work:
ctlinnd throttle "Rebuilding history DBZ File"
cd ~news
if makehistory -r -s `wc -l <history` -f history.n; then
mv history.n.dir history.dir
mv history.n.pag history.pag
fi
ctlinnd go "Rebuilding history DBZ File"
My spool is spread around as follows:
scsi, internal /users ~news, history, etc
fast-wide scsi1 /usr1 /var/spool/news, except items below
fast-wide scsi1 /usr2 /var/spool/news/alt/binaries
fast-wide scsi2 /spool4 /var/spool/news/control & junk
fast-wide scsi2 /spool5 /var/spool/news/in.coming & out.going
>
> Glub, glub!
>
AD(thanks)VANCE,
--
A lot of people in this country are | I'm certainly not. And I'm sick
sick and tired of being told that | and tired of being told that I am.
ordinary, decent people are fed up in |
this country with being sick and tired. | /\/\ a tt == Matthew.Ward@gte.net
Re: Sluggish INND response?
Author: Brian Tao
Date: Wed, 05 Jun 1996 00:00
Date: Wed, 05 Jun 1996 00:00
41 lines
2384 bytes
2384 bytes
In article <4orr7g$j3d@sophocles.algonet.se>, Erland Sommarskog <sommar@sophocles.algonet.se> wrote:
>
> INN makes an initial guess, but it goes far off the mark for a 20 GB,
> so you end up with a hash table which is overflowed over and over
> again, leading to excessive retrieval times. The fix was
> simple:rebuild the history.pag and history.dir files with the size of
> the current history file as input.
Forgive my obvious question, but doesn't the normal INN expire
(not dexpire) rebuild the dbz file each time? Or do I have to
explicitly rehash? I've run into the same problem as the original
poster, except on a news server that is several months in operation.
It was running very responsively at first (P133 with 128MB and 9
spindles could kick up a connection within 10 seconds, even with 200+
readers and a dozen streaming sites). Now it will sometimes hang for
up to 1.5 minutes before coming back with a response (or the
connection to the newsreader times out).
I've been exploring other avenues of solving the problem,
preferring *not* to rebuild the history file if at all possible, since
my spool is spread out over 7 filesystems.
Here are the current file sizes:
222040 -rw-rw-r-- 1 news news 227243648 Jun 5 00:15 history
1 -rw-rw-r-- 1 news news 123 Jun 5 00:15 history.dir
17888 -rw-rw-r-- 1 news news 18289412 Jun 5 00:15 history.pag
And this is history.dir:
dbz 3 4572353 9 C 8 7 28 4 3 2 1 0
2886894 2854955 2856422 2853406 2850819 2866849 2911323 2932188 2951080 2990568 3014482
What is the significance of those numbers?
--
Brian Tao (BT300, taob@io.org, taob@ican.net)
Systems and Network Administrator, Internet Canada Corp.
"Though this be madness, yet there is method in't"
Re: Sluggish INND response?
Author: Alan Brown
Date: Fri, 07 Jun 1996 00:00
Date: Fri, 07 Jun 1996 00:00
24 lines
1542 bytes
1542 bytes
In article <31B4593A.2A14@gte.net>, Matthew Ward <mward@gte.net> wrote: >Matthew Ward wrote: >OK. I'm going to come right out and ask: > >Does anyone know why the following would not work? My objective is It works and it works well. It's best to do this *before* an expire run however. My personal preference is n = (wc -l history) * 1.5 :) The thing to bear in mind is that this only rebuilds the pag and dir files. If you've killed your history file and you're running symlinks you have a much more serious problem to deal with. AB -- "But you can't say they have arrived to classify your nervous lies What's right, what's not, what may not be. Don't try your tricky tests on me For I won't live in fear my friend - that every day could be my end"
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads