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

Re: [OT] Interview with Con Kolivas on Linux failures

David Brodbeck wrote:

On Jul 24, 2007, at 12:36 PM, Mike McCarty wrote:

I have tried running some long-term computations in the background
using my machine, and found that nice was unable to deal with it.
Exactly the points he brings up...

momentary freezes of the display (5-10 seconds)
lots of ghosting of moving mouse pointers and windows
momentary freezing of the keyboard (up to 30 seconds)
difficulty switching "workspaces" using GNOME (minutes delay)
very extended load times for apps (minutes to load acrobat, e.g.)

This is on a 2.7 GHz machine with 250Meg of memory. Some of this
is explainable as memory thrashing, as evidenced by disc activity,
and memory pressure reported by top and similar tools.

But, why is my disc running when I try to move my mouse?

This is actually a VM manager issue, not a scheduler issue, I think.

It's a little of both, actually. The scheduler sets policy for
allocation of CPU resources. The VM sets policy for allocation of
memory resources. An app which has high visibility to the scheduler
*should* have high visibility to the VM manager. If a process
has high priority, then that should be because it has latency
requirements. If it has latency requirements, then it should have
some priority in memory as well. Something which has explicitly
been marked as having low latency requirements should be more
"swappable". I've found Linux using up to about 60% of my memory
for "disc cache". This, I trow, is part of the problem.

I suspect what's happening is the following:

- You stop using the machine. The CPU goes idle, and nice decides to start running your background task. Since you only have 250 megabytes

The scheduler makes this decision, not nice. Nice simply informs the
scheduler what is considered to be fg vs bg.

of RAM, nice has to swap the task back in to run it.

Yes, true.


I'm not sure how a different scheduler implementation could fix this. A different VM implementation might. Linux tends to be a little too aggressive about what it swaps out, in my experience, often favoring disk cache over applications. The VMM was pretty disastrously bad for much of the 2.4 kernel series and parts of 2.6. You'd probably also be well served to use something lighter than GNOME on such a limited machine -- icewm, perhaps.

I agree with this assessment. However, if you read the article, you'll
find that part of the topics discussed include "swap prefetch" bundled
with pure scheduling topics.

I'm actually surprised you're able to get background tasks to run well on XP with such a small amount of RAM. My experience with XP is that with anything less than 512 megabytes of RAM, even the screen saver turning on can cause long periods of disk thrashing. I've drummed my fingers for minutes at a time on such machines waiting for XP to stop running the screen saver and give me my desktop back.

I haven't experience minutes of wait, but certainly seconds with XP.

Oppose globalization and One World Governments like the UN.
This message made from 100% recycled bits.
You have found the bank of Larn.
I can explain it for you, but I can't understand it for you.
I speak only for myself, and I am unanimous in that!

Reply to: