Jump to content

swappiness = 100 or why he start so fast to swap


snakekick

Recommended Posts

hello, 
while i am copy files on my server and start 1 or 2 torrent i see that my memory gett less. 

Yes thats only buffer and caches but he eat faster then he get free so that he starts swapping (what cost cpu and speed)

a litte search and i see that 

cat > /proc/sys/vm/swappiness  is 100 and look on my other systems it is set to 60

now woth change this value he dont start swapping and free up faster the memory.

can someone explane me why this here is set to 100?

thank you

Link to comment
Share on other sites

If you do swapon you will notice that the used swap is zram. By default halt of the available memory is compressed via zram as swap and the system shall use it.

Link to comment
Share on other sites

@snakekick, having the kernel swappiness set to 100 on systems where the swap is implemented as compresses RAM is normal.

You want the pages that have been swapped out to be compressed and stored in RAM to make the swap-in operation as fast as possible (decompressing the page is faster than reading it first from disk). Since the storage for some of these devices is on the slow side (microSD, eMMC) - having the swap on RAM tends to speed up the memory operations (swap-in & swap-out), while at the same time helping to avoid unnecessary wear on your flash storage.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines