Performance enhancements

Tim Wunder tim
Mon May 17 11:42:19 PDT 2004


On 12/30/2002 2:30 PM, someone claiming to be Net Llama! wrote:
> On Mon, 30 Dec 2002, Marvin P. Dickens wrote:
> 
>>On Mon, 30 Dec 2002 13:44:09 -0500
>>Tim Wunder <tim at thewunders.org> wrote:
>>
>>
>>>But, what could possibly be *gained*, performance-wise, by turning swap off?
>>>If swap isn't needed, it won't be used...
>>
>>
>>
>>Linux kernel code and data are not swappable and are never moved to
>>swap.  User code never needs to be written to swap space because it
>>already exists on disk and can be read in from there if it is required
>>again. User data is the only data that is written to swap space. Once user
>>data is in swap, it is read back in when it is needed. If your application
>>is dependent on swap performance, you need more RAM.  This is where you
>>gain performance. Swap should be viewed as a lightweight background
>>optimization to make unused pages available for other work, rather
>>than as a cure for an underprovisioned machine (Which is what swap
>>has become).

So, the question remains, how does *disabling* swap aid in system performance. Without swap, how does the kernel "make unused pages available for other work"?

>> ...The point was and still is that memory is dirt cheap (For
>>the price of a crappy usb webcam, you can purchase 256MB of RAM).
> 

I'll agree with you here. So what you're *really* saying is that you should have as much RAM as necessary to render Swap unecessary. But, how does the act of *disabling swap* accomplish this?

> 
> THis may all be well & true, however it still doesnt' address the fact
> that disabling swap is not a performance enhancement, but rather a
> performance degradation.
> 

Which (I thought) was my point...
Enabling or disabling swap seems irrelevant to enhancing system performance. Having enough RAM so that Swap is unneeded, *that's* the performance enhancement, not disabling swap. If a user has slow performance because he's running KDE 3.0.5 with 64 MB RAM, removing his swap space won't help him any.

Tim



More information about the Linux-users mailing list