Port-vax archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: hardclock overwhelming CPU - was Re: NetBSD/vax current



Toby Thain skrev 2014-04-20 06:37:
On 19/04/14 11:20 PM, Anders Magnusson wrote:
[about NetBSD slowniness on vax]

For someone who is curious; some time ago (about 15 years) I noticed
that NetBSD had become very slow on 11/750; unreasonable slow compared
to other machines.

I started searching and found that quite much time were spent in
hardclock.  This is an effective way to make a slow machine much more
sluggish.

Here is a simple explanation for someone not a low-level hacker:

Hardclock runs each 10ms.  We can say that it takes 500 instructions to
complete.  On a 1 MIPS machine we will spend 10000 instructions between
each hardclock interrupt, of which 9500 will be for user programs
(~95%).  On a 1GIPS machine we have 10000000 instructions, of which
9999500 will be used for processes (~99.9%).

Suddenly something is added that makes hardclock take 5000 instructions
instead.  On the 1MIPS machine we now only have 50% of the CPU left, but
on the newer machine we still have 99.9% of the CPU left (== not
noticeable).  Something like this can only be seen on a really slow
machine, it's most likely not possible to find it even with fine-grain
profiling on a modern PC.

Back then, it turned out to be some NTP and timekeeping using long long
calculations that did eat up hardclock.   Just commenting out this made
the machine just as slow as before :-)

-- Ragge


That's a really nice analysis, thanks.

As an 11/750 owner (and other let's say "stately" VAXes), I'm interested to know whether you found a solution? Seems like something that could be resolved by reducing the problematic workload (shutting off those daemons or reducing their run rate?)
I commented out a bunch of things and removed some options just to see that I found the problem.

But to find what is really eating CPU the hardclock codepath should be followed and understood, there may be things that could be handled in a different way on old slow hardware. And as written above, this is only a problem on old slow machines, on newer machines it is not noticed.

-- Ragge


Home | Main Index | Thread Index | Old Index