heavy load with xcaverot
Cooper, Ben
Ben.Cooper@sbs.siemens.co.uk
Tue, 2 May 2000 09:33:27 +0100
Roger's question raises a common misunderstanding of CPU statistics. While
I agree with Mark's interpretation, I would add the following:
When a CPU has a job to process it will run at 100%. When there is nothing
to do, it is Idle (0%). By convention, a CPU speed of 100% is reported as
99%. It will not run at, say 60%, if there is work it can do. This is of
course, exactly what people want: i.e. for the processor to run as fast as
possible to process outstanding work.
It appears to run at less than 99% only because during the averaging period
there are both busy periods (100%) and idle periods (0%). So, a utilisation
of 97% indicates that in the one second period of measurement, the CPU was
idle for 30ms, and busy for 970ms. Typically, the idle period occurs
because the CPU is waiting for IO. Thus, the only thing that such
utilisation figures tell you, is the relative usage of CPU versus IO, etc.
In other words, a process that runs for more than a few seconds, and
consumes 97% for much of that time, is called CPU-intensive. A different
process might run for the same period, with low CPU utilisation, but high IO
utilisation, and would be called IO-intensive. (In my experience, most
general purpose computers are designed so that the CPU utilisation for an
"average" process is about 66%.)
CPU percentages are really only meaningful for performance analysis when
looking at large systems processing many jobs at once. Although here too,
instantaneous CPU utilisation will also be 99%, performance analysts will
look at, say ten-minute or one-hour averages. Most operators would start to
plan upgrades when the CPU utilistation regularly exceeds about 60% in any
given period.
Regards,
- Ben Cooper
-----Original Message-----
From: Mark Shinwell [mailto:mrs30@cam.ac.uk]
Sent: 01 May 2000 23:16
To: Roger Schuster
Cc: Survex
Subject: Re: heavy load with xcaverot
On Mon, May 01, 2000 at 10:37:35PM +0200, Roger Schuster wrote:
> Hi folks,
>
> I just tested the new xcaverot from survex 0.93 on a Linux machine and I
> am wondring about the very heavy load this produces on my box. If the
> automatical "rotate" menu item is selected the system load goes up to
> 97 %! The mouse pointer is jumping across the screen and also the
> rotation of the cave is very jerking.
>
> "Top" shows that most of the system load isn't caused by xcaverot
> itself but by X11.
>
> If the rotation item is not selected the load is low at around 2 %.
>
> The machine is a 450 MHz K6-III with an accelerated X-Server.
>
> What's going wrong?
Nothing. Linux scheduling is based on a system which results in the CPU
being
distributed among the processes ready to run, and Xcaverot is written in
such a
way that it will produce high load when rotating the cave. The high CPU
usage
for the X server is due to the fact that the server is being hammered with
requests. On a single processor machine you will have an enormous amount of
context switches between the X server and Xcaverot, which will also slow
things
down.
Xcaverot is unfortunately useless at drawing surveys efficiently.
If you upgrade to XFree86 v4.0 you will see significantly improved graphics
performance and correspondingly lower loads.
The aven package operates much faster (although ideally still needs XFree86
4.0, as previous releases of that are slow), although will still at the
moment
cause high loads when rotating. I intend to work on this when I finish my
exams in June.
Mark
--
Mark Shinwell -- President, Cambridge University Caving Club
Queens' College, Cambridge, UK
Mail: mrs30@cam.ac.uk Web: http://mrs30.quns.cam.ac.uk
--
Survex http://lists.tartarus.org/mailman/listinfo/survex