A
A
Anton2016-10-22 14:05:25
linux
Anton, 2016-10-22 14:05:25

What happens if the SWAP file is full?

There is a SWAP file on the server.
It is now used to keep the server alive while the hard work of a Rails project is running.
The swap file quota is 4 Gb. Now it is almost 1 Gb full (it ranges from 800 Mb to 1 Gb).
Yes, and in the RAM hangs the same amount.
In principle, such a volume is clearly not used by the server. Now only one task is running, which cannot eat so much.
Hence the question arose - how to clear the swap file? What will happen if it overflows (purely theoretically, although fill 4 Gb...)?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
landergate, 2016-10-22
@hummingbird

When memory consumption is high, you need to increase the available memory, or optimize its consumption in the application itself.
The same as without a swap file: an application requesting more memory than is available will be terminated by the OOM killer so that the system can continue to function. Moreover, it can be forcibly completed either by itself or by any other actively consuming RAM.
The paging file is needed solely to avoid OOM when physical RAM consumption is exceeded.
No way. This cannot be done manually, as well as clearing RAM.
Only terminating applications that consume memory.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question