Re: userspace pagecache management tool

From: Eric St-Laurent
Date: Sat Mar 03 2007 - 20:04:26 EST


On Sat, 2007-03-03 at 12:29 -0800, Andrew Morton wrote:


> There is much more which could be done to make this code smarter, but I
> think the lesson here is that we can produce a far, far better result doing
> this work in userspace than we could ever hope to do with an in-kernel
> implementation. There are some enhancement suggestions in the
> documentation file.

While I think that more user space applications should use fadvise() to
avoid polluting the page cache with unneeded data, I still think the
kernel should be more fair in regard to page cache management.

Personally, I've experienced some sluggish performance after copying
large files around. Even more when using NFS. It's difficult to file a
bug report for "interactive feel", I don't know how to measure it. I
just feel it's a weak aspect of the OS.

Surely it's possible to make the kernel a little bit better to protect
the page cache from abuse, from simple or badly designed applications.

Why fairness is provided by the process scheduler with good results, yet
it somewhat easy for a process to cause slowdowns from page cache usage.

My personal opinion is that the VM seem tuned for database types
workloads. Of course, making the page cache more fair to prevent one
process to use most of it will most likely slowdown database type
applications.

Maybe the situation should be reversed, much like the process scheduler.
Fairness by default, and the possibility to request for more system
resources by asking for them with necessary privileges. Much like
SCHED_FIFO policy.


- Eric



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/