Configuring disk cache

Jing Su jingsu-26n5VD7DAF2Tm46uYYfjYg at public.gmane.org
Sun Jun 20 19:18:49 UTC 2004


there's a file inside your /proc tree that you can set to determine how
aggressively your kernel will swap out applications for buffers and
caches.

/proc/sys/vm/swappiness

The file takes a value between 0 and 100.  100 means aggressively swap out
applications for buffers, 0 means never swap out applications for buffers.
The default, I think, is 60.  I have mine set to 30, which is a good
compromise betwen buffers and keeping idle applications responsive.



On Sun, 20 Jun 2004, Anton Markov wrote:

> Date: Sun, 20 Jun 2004 14:28:05 -0400
> From: Anton Markov <anton-F0u+EriZ6ihBDgjK7y7TUQ at public.gmane.org>
> Reply-To: tlug-lxSQFCZeNF4 at public.gmane.org
> To: tlug-lxSQFCZeNF4 at public.gmane.org
> Subject: [TLUG]: Configuring disk cache
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hello everyone,
>
> Often when I am using my computer for a long time, I find that the
> system starts swapping out pages, even though I still have 200 or so MB
> or RAM free. I understand that the system is trying to make for the
> system cache, but since I keep most of the applications I need open, I
> would like Linux to not use the swap until absolutely necessary. I have
> 512MB RAM, and I am not running a server, so I see no need to have a
> 200MB disk cache.
>
> Right now I am using a crude hack: I start with no swap and have a
> script activate it when RAM is low, then deactivates swap when the RAM
> usage drops to force data back into RAM.
>
>
> So my question: how can I tell the kernel to give more priority to
> application data in RAM, rather than the disk cache. Is there some /proc
> variable I can tune for this?
>
>
> Is there a better solution (besides more RAM and faster drives)?
> Something I am not seeing?
>
>
> Thanks!
>
> - --
> Anton Markov <("anton" + "@" + "truxtar" + "." + "com")>
>
> GnuPG Key fingerprint =
> 5546 A6E2 1FFB 9BB8 15C3  CE34 46B7 8D93 3AD1 44B4
>
> *** LINUX - MAY THE SOURCE BE WITH YOU! ***
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.4 (GNU/Linux)
> Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
>
> iD8DBQFA1dc0RreNkzrRRLQRAl51AJkBGFiJohTb7oCNm89WgGiWxAjS6ACaA+Xh
> 7mGhLz6NoKYjFm9wbV9unFI=
> =fs6g
> -----END PGP SIGNATURE-----
> --
> The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
> TLUG requests: Linux topics, No HTML, wrap text below 80 columns
> How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml
>
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list