F
F
Flanker3812014-04-18 23:18:39
Debian
Flanker381, 2014-04-18 23:18:39

Debian server 7.3 freezes when swap file is over 60% full

I'm using a VPS with 512MB RAM and 20GB SSD.
SWAP partition on the disk specified during installation - 512 MB.
OS: Debian 7.3
Sometimes there is not enough RAM and swap partition, causing mysql to crash. Expanded the memory for SWAP by creating a swap file. The problem is that when it is filled with more than 60%, the server hangs tightly, only a power reboot helps.
I set different swap file sizes, from 128 megabytes to 2 gigabytes, created several small files, the result is the same.
Actually, the question before tormenting the support is why this happens, and is it a software or hardware problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Konstantin Kozhin, 2014-04-19
@kkzhn

It is good practice to set the SWAP size to be twice the size of RAM. If you have 512MB of RAM, then swap is better to do 1024MB.
On SSDs, I've seen several gigabyte swaps fill up very quickly, which doesn't really cause freezes, but makes the system "wildly dumb". Here, how many swap do not give, everything is shaved.
You need to deal with the root cause - look at the MySQL configuration.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question