CPU hog?

K

kevin.hekman

Ijust upgraded from Office v.x to 2004. Microst word now is ahuge CPU
hog. Running Word in the background without any documents open can
sometimes eat up 40% of all available CPU. I have features like "auto
word count" turned off - is there anything else I can do? Is Word
calculating the value of PI to the 1024th place when it gets bored?
 
J

John McGhie

Hi Kevin:

Ijust upgraded from Office v.x to 2004. Microst word now is ahuge CPU
hog. Running Word in the background without any documents open can
sometimes eat up 40% of all available CPU. I have features like "auto
word count" turned off - is there anything else I can do? Is Word
calculating the value of PI to the 1024th place when it gets bored?

Yes :)

Word 2004 does use a little more CPU than Word X (up to 20 per cent more,
depending on what it is doing). Actually, it's Apple Type Services for
Unicode (ATSUI) that's sucking the power. This is Apple's new mechanism for
displaying text, needed to bring Unicode display capability to Word. It's a
little more power-hungry than QuickDraw. But even that does not really
impact Word's ability to get work done, because most of ATSUI's time is
being used to draw the display: the rest is being used to achieve more
accurate text placement. Both of these tasks can "move out of the way" if
there are more important things to be done.

However what you are seeing in your question is a CPU figure which is
statistically correct but utterly meaningless :)

Top is showing you that Word is "being allocated" 40 per cent of the CPU
"time slices" that are currently being allocated to applications. Each of
those time slices is 20 milliseconds long. Say 100 million CPU cycles.

In each slice, the System asks Word "Have you anything to do?" and Word says
"Nup!". Maybe a thousand machine cycles all up. The rest of the time, they
are both sitting in an NOP (no operation) loop, waiting for something to
happen.

Try this: Start all of your other applications. Immediately, you should
notice that Word's so-called "CPU Busy" drops back top something like 10 per
cent. It's still getting the same number of slices of time allocated, but
that number is no longer 40 per cent of the slices that are being allocated
by the system, because the system is now allocating a whole lot more slices,
some to each of the running applications.

Now: Bring one of the other applications into the foreground, and give it
something to do. A good one is iTunes: set it to RIP a nice big CD of
music, something to put a solid load on the system. Make sure iTunes
remains in the foreground (the active application, the one that has
focus...) and look at your numbers again.

Word's number will drop back to around 1 per cent. It's in the background
now, and it has nothing to do, so it is requesting, and getting, far fewer
slices. And the system is allocating a much larger bundle of slices, most
of which will go to iTunes because it's sweating hard at this point.

Word is still doing nothing :) If any other application were to request
time at this point, the system would pre-emptively withhold time allocation
from Word and give it to the active task.

Now open a 2,500-page document (a book, with TOC and Index). Set it to
update its fields automatically when printing, then print it. Put Word in
the foreground.

Because Word is in the foreground, and it needs to completely repaginate
twice to regenerate the TOC and Index, it will then ask the system to
promote its priority, and ask the system to allocate it all the spare memory
there is. Now Word is really hauling, and its CPU count will flatline at
about 90 per cent.

This time, it's really using the CPU, and the count is actually meaningful.
If any other application requested time then, it wouldn't be given it,
because Word has been promoted to high priority; the system can break in
whenever it wants to, but the other applications can't get in unless they
come into the foreground.

The moral of the story is that TOP is showing you "what percentage of the
time slices currently being allocated is being allocated to Word." It is
not showing you "What percentage of the CPU "cycles" being devoted to useful
work are being used by Word."

Hope this helps

--

Please reply to the newsgroup to maintain the thread. Please do not email
me unless I ask you to.

John McGhie <[email protected]>
Consultant Technical Writer
Sydney, Australia +61 4 1209 1410
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top