Re: dynamic allocation of swap disk space

From: Ray Bryant
Date: Tue May 11 2004 - 11:27:50 EST


Hi John,

John Bradford wrote:


Not necessarily. Increasing swap can allow more physical RAM to be used for
caching data from disk.

Imagine a system with limited physical RAM, and limited swap space, running a
process which causes a lot of filesystem activity on the same physical disk
as is being used for swap. If the total RAM, both physical and swap is almost
completely full, increasing the swap space may allow some data from physical
RAM to be swapped out, in favour of caching filesystem data from the disk.

Hmmm... Lets see, we have a program (or set of programs) in memory that is thrashing, i. e. it is page faulting at a rate that is higher than the vm system can supply pages, so it is spending its time waiting for pages and the disk subsystem is busy. Now, if we increase the amount of data cached from disk, without increasing main memory, we've decreased the amount of memory available to the thrashing program, perhaps making its problems worse?

Well, I guess all this shows is that with the vm subsystem, speculation is often useless, one has to fire up the box with a carefully constructed workload and see what happens.


Without knowing more details of the original poster's machine, it's difficult
to give specific advice about how to solve the problem.


I certainly agree with that. Time for this thread to die, I think. :-)

Cheers.

John.


--
Best Regards,
Ray
-----------------------------------------------
Ray Bryant
512-453-9679 (work) 512-507-7807 (cell)
raybry@xxxxxxx raybry@xxxxxxxxxxxxx
The box said: "Requires Windows 98 or better",
so I installed Linux.
-----------------------------------------------

-
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/