Xfce is very slow, part 2 [solved ?]

Maximilien Noal noal.maximilien at gmail.com
Sun Feb 16 11:21:25 CET 2014


Le 16/02/2014 11:17, Hartmut Haase a écrit :
> Hi,
> for me the problem has to do with swapping.
> cat  /proc/sys/vm/swappiness
> 60
> That means swapping starts about 60% use of RAM.
[snip]

Hi.

Well, no :
http://stackoverflow.com/questions/2029015/what-are-the-exact-conditions-based-on-which-linux-swaps-processs-memory-from
>
> I've seen a lot of people posting subjective explanations of what this 
> does. Here is hopefully a more full answer.
>
> In the split LRU on post 2.6.28 Linux swappiness is a multiplier used 
> to arbitrarily modify the fraction that is calculated determining the 
> pressure built up in both LRUs.
>
> So, for example on a system with no free memory left - the value of 
> the existing memory you have is measured based off of the rate of how 
> much memory is listed as 'Active' and the rate of how often pages are 
> promoted to active after falling into the inactive list.
>
> An LRU with many promotions/demotions of pages between active and 
> inactive is in a lot of use.
>
> Typically file backed storage is cheaper and safer to evict when your 
> running out of memory and automatically is given a modifier of 200 
> (this makes file backed memory 200 times more worthless than swap 
> backed memory (Which has a value of 0) when it multiplies this fraction.
>
> What swappiness does is modify this value by deducting the swappiness 
> number you gave (default 60) to file memory and adding the swappiness 
> value you gave as a multiplier to anon memory. Thus the default 
> swappiness leaves you with anonymous memory being 80 times more 
> valuable than file memory (200-60 for file, 0+60 for anon). Thus, on a 
> typical linux system that has used up all its memory, page cache would 
> have to be 80 TIMES more active than anonymous memory for anonymous 
> memory to be swapped out in favour of page cache.
>
> If you set swappiness to 100 this gives anon a modifier of 100 and 
> file memory a modifier of 100 (200 - 100) leaving both LRUs equally 
> weighted. Thus on a file heavy system that wants page cache providing 
> the anon memory is not as active as page cache then anon memory will 
> be swapped to disk to make space for extra page cache.
>



More information about the Xfce mailing list