Hi people,
I got Centos 4.3 on a 1GB Pentium IV machine. The output of free
------------------- $ free total used free shared buffers cached Mem: 1026896 573848 453048 0 2988 131712 -/+ buffers/cache: 439148 587748 Swap: 1052248 137568 914680 ------------------
There is plenty of free ram, but the kernel prefers to swap unused pages to disk. And later I have to wait for them to be unswapped, the Desktop looses its promptness - annoying.
In win2k and winXP there is a registry key property which prevents swapping while there is still RAM.
Do you know whether I can achieve the same in linux?
Best regards! alex
-----------------
There is plenty of free ram, but the kernel prefers to swap unused pages to disk. And later I have to wait for them to be unswapped, the Desktop looses its promptness - annoying.
This is a bug in the -34 and -34.0.1 kernels and possibly 1 or 2 before that. Systems under load swap prematurely. You can install the test kernel from the dev tree which will be in the upcoming 4.4 release. Your issue is fixed in that kernel.
You may also want to set 'vm.swappiness = 10' or so in /etc/sysctl.conf (reread without rebooting with sysctl -p)
The lower the number (0-100) you set for swappiness, the less willing your system will be to swap. No setting it to 0 will not keep your system from swapping at all.
In win2k and winXP there is a registry key property which prevents swapping while there is still RAM.
Do you know whether I can achieve the same in linux?
Alexander Georgiev wrote:
There is plenty of free ram, but the kernel prefers to swap unused pages to disk. And later I have to wait for them to be unswapped, the Desktop looses its promptness - annoying.
In win2k and winXP there is a registry key property which prevents swapping while there is still RAM.
Do you know whether I can achieve the same in linux?
There has been a huge thread concerning this -- maybe even in this list. Use google and look for "swappiness".
The place to make the change (temporarily) is:
/proc/sys/vm/swappiness
To make it permanent, change /etc/sysctl.conf
Barry
On Tue, 2006-06-20 at 13:51 -0400, Barry L. Kline wrote:
Alexander Georgiev wrote:
There is plenty of free ram, but the kernel prefers to swap unused pages to disk. And later I have to wait for them to be unswapped, the Desktop looses its promptness - annoying.
<snip>
Since we are talking desktops now, I'll mention that since I made the adjustments to my node that I mention in the thread Jim mentions, I have not seen more than 160k in swap used. And I did not futz with swappiness or any other parameter. Prior to those changes, under "heavy" load (e.g. multiple browsers for multiple users open, multiple mail sessions (evo and tbird),... I would see severe swap and degradation after a couple of days. Since the changes, in over a week of not rebooting, never more than 160k swapped.
I guess I ought to find what it is and get rid of it too, but seems unworthy of the effort.
HTH
I've set swappiness to 5 on three 4.3 servers with current kernel and which each have a lot of memory and I noticed an improvement. I'm pretty tempted to test with 1 as I'd really like the server to swap once it's getting really low on physical memory...but the boss is too cheap to buy another server to test on :P
On 6/20/06, William L. Maltby BillsCentOS@triad.rr.com wrote:
On Tue, 2006-06-20 at 13:51 -0400, Barry L. Kline wrote:
Alexander Georgiev wrote:
There is plenty of free ram, but the kernel prefers to swap unused pages to disk. And later I have to wait for them to be unswapped, the Desktop looses its promptness - annoying.
<snip>
Since we are talking desktops now, I'll mention that since I made the adjustments to my node that I mention in the thread Jim mentions, I have not seen more than 160k in swap used. And I did not futz with swappiness or any other parameter. Prior to those changes, under "heavy" load (e.g. multiple browsers for multiple users open, multiple mail sessions (evo and tbird),... I would see severe swap and degradation after a couple of days. Since the changes, in over a week of not rebooting, never more than 160k swapped.
I guess I ought to find what it is and get rid of it too, but seems unworthy of the effort.
HTH
Bill
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (GNU/Linux)
iD8DBQBEmDfd/1DcCJj5ZgkRApoNAKCWRjvzby4Fdiv6z2r38P+ck4qo1ACcDV/g TBVJ1c3xIVZo5Yudu66kLQQ= =xenh -----END PGP SIGNATURE-----
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos