I'm getting this alarm on Cloudera, is there any way to increase the swap space capacity?
Asked
Active
Viewed 2,519 times
1

Mahmoud Odeh
- 942
- 1
- 7
- 19
-
1https://unix.stackexchange.com/questions/295833/increase-swap-space-in-linux-through-terminal, https://askubuntu.com/questions/178712/how-to-increase-swap-space, https://serverfault.com/questions/348052/how-to-increase-swap-size – tk421 Apr 12 '19 at 21:53
1 Answers
1
While you ask how to increase the swap space capacity, I think it save to assume that what you are really looking for is a way to solve the problem of full swap space.
Increasing the swap space is only one way of dealing with the issue - the other is simply to use less swap space. Cloudera recommends using minimal to no swap space because using swap degrades the performance substantially. The way of controlling this is by setting the 'swappiness' to 1, vs the default of 60. See documentation for instructions and more rational.
If the swappiness is already set to 1, than you can try clearing the swap by toggling swap off, then on.
swapoff -a
swapon -a
Before toggling swap you should make sure that
- the amount of swap space in use is less than the amount of free memory (as the contents of swap may be shifted to memory).
- currently running processes are not using swap (running vmstat produces on output with columns labeled 'si' and 'so' telling you the amount of memory swapped in and out per second. if these are both 0, then you should be safe).

Augustine Calvino
- 113
- 1
- 9