Thread View: news.software.nntp
5 messages
5 total messages
Started by Thomas Neumann
Tue, 13 Oct 1998 00:00
getblk() dominated process
Author: Thomas Neumann
Date: Tue, 13 Oct 1998 00:00
Date: Tue, 13 Oct 1998 00:00
48 lines
2136 bytes
2136 bytes
Hi everybody, on a newsserver machine (INN) running FreeBSD 2.2.7 I'm seeing "expire" running very, very long (several hours). The machine is nowhere near using all of it's RAM (swap is virtually unused at that time, see below) and it's stuffed to the hilt with fast SCSI disks, so I/O bandwith should also not be an issue. Nevertheless expire takes forever. "top" reveals that expire spends most of it's time in "getblk" or "ufslk2" state, and the system feels extremely sluggish (30 seconds between logging in and getting a shell prompt for the first time, for example), though the load avg is way down. Here's the first few lines of top output: last pid: 7594; load averages: 0.01, 0.02, 0.00 20:08:45 37 processes: 1 running, 36 sleeping Mem: 184M Active, 63M Inact, 32M Wired, 98M Cache, 8346K Buf, 952K Free Swap: 800M Total, 4292K Used, 796M Free, 1% Inuse PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND 7110 admin -5 0 260K 628K getblk 4:28 1.75% 1.75% expire 5322 admin -6 0 29584K 29344K biowai 4:27 0.72% 0.72% innd 7594 admin 28 0 612K 856K RUN 0:00 0.78% 0.04% top 256 root 2 0 876K 636K select 12:02 0.00% 0.00% gated 223 root 2 0 544K 424K accept 9:32 0.00% 0.00% cfd 93 root 2 0 208K 328K select 1:16 0.00% 0.00% syslogd [...] Is there a kernel parameter that I'd need to adjust to avoid this, i.e. to speed up getblk processing? Any hints appreciated! -t
Re: getblk() dominated process
Author: Thomas Neumann
Date: Tue, 13 Oct 1998 00:00
Date: Tue, 13 Oct 1998 00:00
22 lines
1347 bytes
1347 bytes
XOXO Fluffy <bofh@newsmangler.inet.tele.dk> writes: > On 13 Oct 1998, Thomas Neumann wrote: > > > on a newsserver machine (INN) running FreeBSD 2.2.7 I'm > > seeing "expire" running very, very long (several hours). > > Nevertheless expire takes forever. "top" reveals that > > expire spends most of it's time in "getblk" or "ufslk2" > > That means it's reading and writing the file, rather than doing everything > in memory as it should to make things zippy. This happen when you don't > have enough memory, or in your case, where your limits are set so that you > can't make use of all the memory. I raised the limits like you suggested and that fixed it. Thanks! -t
Re: getblk() dominated process
Author: XOXO Fluffy
Date: Tue, 13 Oct 1998 00:00
Date: Tue, 13 Oct 1998 00:00
52 lines
2841 bytes
2841 bytes
On 13 Oct 1998, Matt Dillon wrote: > :> Nevertheless expire takes forever. "top" reveals that > :>expire spends most of it's time in "getblk" or "ufslk2" > > Figure out what it's waiting on. ktrace the expire process for > a bit while it's running and doing the getblk/ufslk2 wait thingy. > There are several possibilities but two more likely ones: > * The expire script may be failing to sort the expiration list, which But in that case, the programs which would be taking forever to run would not be `expire' itself, but `expireover' or `fastrm' one hopes. That's the problem when people say that ``expire'' takes forever, they don't always mean expire itself, but often some related part of the news.daily process. However, the output of `top' that was quoted showed it was indeed expire itself, and with very small resource usage. Normally expire runs first, followed by expireover and then fastrm working from the file created by expire somewhere like /news/log/expire.rm, and finally a renumber to complete the process anywhere from a few minutes to a few weeks later. > can occur if there is insufficient /tmp space for the sort command. A good idea to use TMPDIR pointing to somewhere big. > * Your news spool may contain directories with too many articles in them Again, this would cause problems for the `fastrm' process, not expire itself. > While FreeBSD-2.2.7 does use available memory for caching, certain > parts of it wind up being inefficient in regards to directory scanning > due to FreeBSD-2.2.x not dynamically sizing the NBUF parameter. Try > increasing the number of NBUFs in the kernel config. Don't make it > too big, though. But how big is Too Big? Or will this degenerate into another NBUF DSW? Anyway, I'll show you mine in a minute Good advice in general for people to consider, though. Add `nospam' to my e-mail address to write me arry bouwsma
Re: getblk() dominated process
Author: XOXO Fluffy
Date: Tue, 13 Oct 1998 00:00
Date: Tue, 13 Oct 1998 00:00
35 lines
2266 bytes
2266 bytes
[ignoring specified follow-up groups. This problem is often seen by people running INN and would be of benefit to readers of both original newsfroups. So there. Don't like it? Mnyaah.] On 13 Oct 1998, Thomas Neumann wrote: > on a newsserver machine (INN) running FreeBSD 2.2.7 I'm > seeing "expire" running very, very long (several hours). > Nevertheless expire takes forever. "top" reveals that > expire spends most of it's time in "getblk" or "ufslk2" That means it's reading and writing the file, rather than doing everything in memory as it should to make things zippy. This happen when you don't have enough memory, or in your case, where your limits are set so that you can't make use of all the memory. > Is there a kernel parameter that I'd need to Not a kernel parameter, but a limit set in the /etc/login.conf file under FreeBSD. You should be able to log in as news and run expire manually and have it complete quickly. If not, then you need to up the limits for your news login as well. However, as expire is typically run from cron, the limits inherited there are those of class daemon, I believe. You can check what your actual limits are when running expire by adding a line to your crontab before news.daily to write the output of the `ulimit -a' command to a file. Compare that with the sizes of your history database file(s) and the available memory on your machine. barry bouwsma
Re: getblk() dominated process
Author: Matt Dillon
Date: Tue, 13 Oct 1998 00:00
Date: Tue, 13 Oct 1998 00:00
70 lines
3434 bytes
3434 bytes
:In article <87ww648h0k.fsf@smart.ruhr.de>,
:Thomas Neumann <tom@smart.ruhr.de> wrote:
:>
:>Hi everybody,
:>
:>on a newsserver machine (INN) running FreeBSD 2.2.7 I'm
:>seeing "expire" running very, very long (several hours).
:>
:...
:>The machine is nowhere near using all of it's RAM
:>
:...
:> Nevertheless expire takes forever. "top" reveals that
:>expire spends most of it's time in "getblk" or "ufslk2"
Figure out what it's waiting on. ktrace the expire process for
a bit while it's running and doing the getblk/ufslk2 wait thingy.
ktrace -p pid_of_expire_process
(wait 30 seconds)
ktrace -C
(don't forget to ktrace -C)
kdump -R | less
There are several possibilities but two more likely ones:
* The expire script may be failing to sort the expiration list, which
can occur if there is insufficient /tmp space for the sort command.
This results in expire trying to run completely unsorted output, which
can be extremely time consuming verses the sorted output.
* Your news spool may contain directories with too many articles in them
for UFS to handle efficiently. Typically, if a spool directory gets
larger then the system's buffer cache, operations on the spool directory
(such as remove()) can take insane amounts of time.
There are several directories such as control/cancel and ba.jobs (and
other jobs groups) that can cause the problem.
While FreeBSD-2.2.7 does use available memory for caching, certain
parts of it wind up being inefficient in regards to directory scanning
due to FreeBSD-2.2.x not dynamically sizing the NBUF parameter. Try
increasing the number of NBUFs in the kernel config. Don't make it
too big, though.
(Personally, I'd install FreeBSD-current + softupdates instead of
FreeBSD-2.2.x, which fixes a lot of these problems, but this may not
be easy for you to do).
You may wind up in a situation where nothing you do will fix the UFS file
lookup inefficiencies. For example, if you have configured a huge spool,
article directories may wind up being too big in general terms for INN-1.x
to operate efficiently on filesystems with non-hashed directory lookups.
In that case, I would definitely consider upgrading to a later INN release
which implements the newer spool storage mechnaisms or even upgrade to
different news feeder/reader software.
-Matt
--
Matthew Dillon Engineering, HiWay Technologies, Inc. & BEST Internet
Communications
<dillon@best.net> (Please include original email in any response)
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