New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set vm.swappiness=0 #1520

Closed
kirill9000 opened this Issue Dec 16, 2015 · 5 comments

Comments

Projects
None yet
4 participants
@kirill9000

I think it should be done for SysVMs at least. With default value (60) they start swapping way too early:

[root@sys-net ~]# free -m
                total        used        free      shared  buff/cache   available
Mem:            261          97           4           0         159         136
Swap:          1027          57         970
@pqg

This comment has been minimized.

Show comment
Hide comment
@pqg

pqg Dec 16, 2015

This is not my strong suite, so sorry if this is a silly question, but what's wrong with that example memory distribution? To push much of that swapped memory into RAM, the kernel would need to evict quite a bit of its buffers and caches. It's not clear to me, just from the output of free -m, that this would be an advantageous decision. Are you sure the kernel is getting it wrong and swapping out memory pages that are more heavily accessed than the cache?

pqg commented Dec 16, 2015

This is not my strong suite, so sorry if this is a silly question, but what's wrong with that example memory distribution? To push much of that swapped memory into RAM, the kernel would need to evict quite a bit of its buffers and caches. It's not clear to me, just from the output of free -m, that this would be an advantageous decision. Are you sure the kernel is getting it wrong and swapping out memory pages that are more heavily accessed than the cache?

@kirill9000

This comment has been minimized.

Show comment
Hide comment
@kirill9000

kirill9000 Dec 16, 2015

Hmm. I figured that SysVM which is used just for routing doesn't need that much cache anyway. But maybe you're right. Let's see what the developers will say about this suggestion.

Hmm. I figured that SysVM which is used just for routing doesn't need that much cache anyway. But maybe you're right. Let's see what the developers will say about this suggestion.

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Dec 16, 2015

Member

IMO using some swap is not bad, unless the system is heavily swapping.
For example every VM is running X server with a bunch of GUI services
(gnome keyring etc). If those services aren't used, there is nothing
wrong with having them in swap. Generally Linux is quite good on
deciding what should be in RAM and what can be swapped to disk.

Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

Member

marmarek commented Dec 16, 2015

IMO using some swap is not bad, unless the system is heavily swapping.
For example every VM is running X server with a bunch of GUI services
(gnome keyring etc). If those services aren't used, there is nothing
wrong with having them in swap. Generally Linux is quite good on
deciding what should be in RAM and what can be swapped to disk.

Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

@kirill9000

This comment has been minimized.

Show comment
Hide comment
@kirill9000

kirill9000 Dec 16, 2015

OK, I'll close it then.

OK, I'll close it then.

@kirill9000 kirill9000 closed this Dec 16, 2015

@adrelanos

This comment has been minimized.

Show comment
Hide comment
@adrelanos

adrelanos Dec 16, 2015

Member
Member

adrelanos commented Dec 16, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment