Hallo,
es ist ja so, daß Linux den gesamten Hauptspeicher nutzt (den freien zum Cachen von Dateien). Der Hauptspeicher ist also fast immer zu 100% gefüllt.
Gibt es einen Parameter, mit dem man die Größe des Cache beschränken kann, so daß bei Bedarf nicht erst Hauptspeicher freigemacht werden muß?
Größe des Cache im RAM beschränken
- mistersixt
- Beiträge: 6601
- Registriert: 24.09.2003 14:33:25
- Lizenz eigener Beiträge: GNU Free Documentation License
Es müsste sein:
"Since 2.6, there has been a way to tune how much Linux favors swapping out to disk compared to shrinking the caches when memory gets full.
Swappiness takes a value between 0 and 100 to change a rough heuristic about when to swap out processes and when to release pages from cache. At 100, the kernel will always prefer to find inactive pages and swap them out; in other cases, whether a swapout occurs depends on how much application memory is in use and how poorly the cache is doing at finding and releasing inactive items.
The default swappiness is 60. A value of 0 gives something close to the old behavior where applications that wanted memory could shrink the cache to a tiny fraction of RAM. For laptops which would prefer to let their disk spin down, a value of 20 or less is recommended."
Gruss, mistersixt.
Code: Alles auswählen
/proc/sys/vm/swappiness
Swappiness takes a value between 0 and 100 to change a rough heuristic about when to swap out processes and when to release pages from cache. At 100, the kernel will always prefer to find inactive pages and swap them out; in other cases, whether a swapout occurs depends on how much application memory is in use and how poorly the cache is doing at finding and releasing inactive items.
The default swappiness is 60. A value of 0 gives something close to the old behavior where applications that wanted memory could shrink the cache to a tiny fraction of RAM. For laptops which would prefer to let their disk spin down, a value of 20 or less is recommended."
Gruss, mistersixt.
--
System: Debian Bookworm, 6.11.x.-x-amd64, ext4, AMD Ryzen 7 3700X, 8 x 3.8 Ghz., Radeon RX 5700 XT, 32 GB Ram, XFCE
System: Debian Bookworm, 6.11.x.-x-amd64, ext4, AMD Ryzen 7 3700X, 8 x 3.8 Ghz., Radeon RX 5700 XT, 32 GB Ram, XFCE