Painfully slow exec() on 2.0.35/36?

Ion Badulescu (ionut@moisil.cs.columbia.edu)
Fri, 18 Sep 1998 04:41:56 -0400 (EDT)


Hello,

I'm having a problem on a news server and I'm not sure what to blame,
since quite a few things have change in its configuration. I *think* it's
not a problem with the latest 2.0.36pre snapshots, as I tried 2.0.35 and
didn't make any difference. It's most probably inn-2.1's fault, but I
think the issue is worth investigating a little further.

This is what happens: the server is getting a pretty fat feed, so its load
average hovers usually around 2-3. Even so, it is pretty snappy. However,
a news *reader* connection is established only after a very annoying
delay, during which innd fork()'s and then exec()'s nnrpd.

strace output shows that it's the exec() syscall itself that's taking an
unusual amount of time -- between 10 and 50 seconds! While this is
happening, ps -axl shows the process doing the exec() as

100040 6 15998 30053 7 4 0 0 wait_on_buf DWN ? 0:00 \_/usr/local/news/bin/innd -p7

and, what's more weird, vmstat 1 shows "lots" of blocks being written to
the disk, a lot more than usual:

procs memory swap io system cpu
r b w swpd free buff cache si so bi bo in cs us sy id
0 2 4 5432 2164 43368 50568 0 0 348 3052 849 359 11 37 51
0 3 4 5432 2216 43472 50596 0 0 246 2000 564 279 4 24 72
0 2 4 5432 2076 43476 50640 0 0 388 3000 886 315 5 31 64
1 1 4 5432 2016 43476 50672 0 0 281 2500 655 293 1 23 76
1 2 4 5432 1868 43476 50808 0 0 450 2500 827 738 8 28 63
2 1 4 5432 1128 43224 50500 8 0 324 3020 723 273 9 37 54

whereas the usual output is more like:

procs memory swap io system cpu
r b w swpd free buff cache si so bi bo in cs us sy id
1 1 0 5432 2188 47992 52356 0 0 303 0 766 239 9 8 84
0 2 0 5432 2128 47948 52352 0 0 192 1260 1012 590 4 16 80
1 0 0 5432 1592 47864 52344 0 0 78 289 1289 380 11 15 75
0 1 0 5432 1704 47776 52480 0 0 395 0 671 268 5 9 87
1 0 0 5432 1752 47716 52480 0 0 329 0 553 341 7 5 88

The machine has 128MB of RAM and is barely using any swap at all, around
5MB. The system also has the news stuff spread across 7 or so disk
spindles, so it's not an issue of slowly reading nnrpd from the disk.

I'm really puzzled. Anybody has a good explanation for this?

Thanks,
Ion

-- 
  It is better to keep your mouth shut and be thought a fool,
            than to open it and remove all doubt.

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/