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

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




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.

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 of RAM, nice has to swap the task back in to run it.

- You start moving the mouse. Now your foreground process needs the CPU again, and nice lets it have it -- but it's been swapped out, so nothing can happen until the virtual memory manager swaps it all back in from disk.

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'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.



Reply to: