1b.app
Link copied -

SWAP on the server

Answers:

In simple terms, SWAP is an extension of random access memory (RAM).
When some program asks to place data in RAM, it makes a request to allocate "virtual memory" to the operating system, then the operating system itself looks to see if there is free RAM or not. If there is, it allocates it, if not, it allocates space on the disk (this is swap).
That is, if there is not enough physical RAM, then only then does SWAP begin to be used.
As long as there is free RAM (RAM), swap is not touched in 99% of cases (there are nuances, but on average it is).
If there was no RAM, swap was used, and then a free one appeared - the operating system will gradually (not instantly) transfer the data to the RAM if they are needed.
The speed of the DDR4 RAM is roughly 20 gigabits / second.
The speed of the SSD drive is roughly 5 gigabits / s.
That is, SWAP is 4 times slower than operatives.
If something gets into SWAP - it will start to work more slowly.
Why is there something in swap, while there is a lot of free RAM?
So there was a situation when there was not enough RAM, some data was transferred to swap, then no one asked for this data, so they lie there for now.
In general, the SWAP mechanism is just made to level out peak loads on the RAM.
In your case, judging by the screenshot, there is still a lot of free operatives, therefore, it’s worth worrying about.
If you want, you can simply reboot the server (downtime 5 minutes) - and swap will automatically "clean up".
Problems start when RAM is 100% full and SWAP is 100% full, that's all, everything needs to be intervened.
23.09.2020, 11:18
Как со мной связаться - никак :)
Задавайте вопросы на форуме публично - и я отвечу.
Подробнее - https://1b.app/ru/user/11/
Original comment available on version: ru

Dyakuyu everything is available and zrozumilo explained.
23.09.2020, 13:23
Original comment available on version: ru

Куприян Владислав Валерьевич
Baza.cn.ua / Integrator (FOP Kupriyan)

Miroshnichenko Maxim Alexandrovich
OneBox CEO wrote:
Problems start when RAM is 100% full and SWAP is 100% full, that's all, everything needs to be intervened.

And if RAM is 90% full and SWAP is 50% full - can it work like that or can it still lead to sad consequences?
02.12.2020, 22:11
Original comment available on version: ru


And if RAM is 90% full and SWAP is 50% full - can it work like that or can it still lead to sad consequences?

Most likely this will lead to something like this - https://crm-onebox.com/ru/support/server-installation/3760-kritichno-tormozit-bo...
see last 2-3 comments
02.12.2020, 23:48
Как со мной связаться - никак :)
Задавайте вопросы на форуме публично - и я отвечу.
Подробнее - https://1b.app/ru/user/11/
Original comment available on version: ru

Куприян Владислав Валерьевич
Baza.cn.ua / Integrator (FOP Kupriyan)

Miroshnichenko Maxim Alexandrovich
OneBox CEO wrote:

And if RAM is 90% full and SWAP is 50% full - can it work like that or can it still lead to sad consequences?

Most likely this will lead to something like this - https://crm-onebox.com/ru/support/server-installation/3760-kritichno-tormozit-bo...
see last 2-3 comments

Thank you, I understand
Tasun you still have that comedian "We do not have the ability to travel in time" (it feels like he wrote in all seriousness, without humor) :)
03.12.2020, 00:14
Original comment available on version: ru

Please join the conversation. If you have something to say - please write a comment. You will need a mobile phone and an SMS code for identification to enter. Log in and comment