You are not logged in.
Hi all,
Suppose I have a very slow hard drive (or even a CD) that has high seek times. In that scenario, it's important to keep only in RAM what matters for the responsiveness of the system.
Ideally, I would like to partition my memory. For instance 3/4 of my ram is for programs, and 1/4 for data. When the data cache runs out, if can push out old data, but it can never push out old programs. The same for the program cache, it can never push out old data. I think this way my machine stays more responsive.
Does such a thing exist?
Cheers,
Cedric
Offline
Ah, yeah, that's what the kernel does. It doesn't keep cache around if there is not space for it - but it also will not drop cached data for no reason.
Perhaps you are interested in swapiness settings if you are using swap (to ensure data isn't swapped until after all file caches have been dropped to make space), but even there I suspect the defaults will suit you well.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Thank you, the swappiness settings controls the flow of stuff in the memory to and from the swapfile.
But I was talking about a memory cache system that knows the difference between executable code, and data. Does the kernel know about this difference?
Offline
Of course it does, the kernel is what maintains the cache and loads and executes code.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
I know how you feel, here's my recipe:
I wrote gopreload years ago, it can help you because it maps and locks the programs you want into memory.
Kernel won't move them to swap partiton, so you've to think in advance to a restricted set of tools you really need to be responsive.
https://wiki.archlinux.org/index.php/Preload
Also, you can hibernate instead of powering off (with or without gopreload).
Doing that allows you to retain part of the buffers between runs so that your system is more reactive right after powering on subsequent times.
Using uswsusp from aur allows you to compress the hibernation image, i'd use it.
https://wiki.archlinux.org/index.php/Uswsusp
Next comes zswap, a way for the kernel to compress swap pages and keep them in ram.
It really helps when the system is low on free memory.
https://wiki.archlinux.org/index.php/Zswap
Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !
Offline