-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Friday, 2017-12-15 at 18:21 -0500, Anton Aylward wrote:
On 15/12/17 04:22 PM, Richard Brown wrote:
The more swap space you allocate, the more the kernel will try to use it
Experimentally, I see no evidence for that. What is there about the algorithms that would make it so? As far as I can tell, propensity to page out is a function of available memory and kernel parameters, such a swappiness, the degree of overcommit allowed, the freepages high, low and min setting. And how much gets used emerges from the kswapd parameters.
All these are measures of the memory and its use by processes.
Perhaps you are getting confused with the algorithm that determines if swap space is recovered. At first it is not; it is only when there is 'pressure' on the finding of swap space that the recovery algorithms are triggered.
if so, then your wording is very misleading.
If you have a 2G swap compression it will be triggered when you have consumed, perhaps 1.5G. Not that you have 1.5G swapped out right now, but over the lifetime of the machine running there have been that many pages swapped out at some time. Unlike real swap systems such as V7 UNIX there is not a 1:1 correspondence between the system/process memory and the page-out space, it is a first-come/first/served type of thing. (It is irrelevant in this example of the 'gap' is 3/4 or 0.5G) So it you have a 6G swap space the kernel will keep using it until the higher threshold. You can view this as a better situation since there isn't the pressure on the kernel so earnestly.
There is nothing about the increased size of the swap that ENCOURAGES the kernel to use it. The extra size just means that the kernel doesn't have to run the swap space recovery/compression algorithm so often.
Of course if you have adequate memory and never page-out, then the size of the swap is irrelevant. Which means that if you have additional REAL MEMORY you *DO* encourage the kernel to use it -- the *memory* that is.
Right. I see the 2 gig recommendation as the strategy when in fact you do not want swap to be used. Just as a escape valve "just in case". As the minimal size to set to make the kernel not complain. So create a minimal swap, and if it ever gets used, buy more ram. In a business server scenario, I see needing swap as a bad thing. Get more ram instead, there is money involved. The link is not a recommendation for openSUSE, but for SLE. For business servers. Not the case for people on a budget. And nowdays, with the speed of NVMe "disks", I envision more swap. - -- Cheers, Carlos E. R. (from openSUSE 42.2 x86_64 "Malachite" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlo1DD0ACgkQtTMYHG2NR9XDwwCfcK4j2n3M9GJJ3AZn7MhNFvBI L/wAn0VNk0IV2VyUHaaEzkmCxhPURwb5 =8jp+ -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org