Answer the question
In order to leave comments, you need to log in
Should SWOP be used as a memory replacement in a server?
Fixed configuration in the cloud. CPU usage 6%, memory 100%, swap 100%, SSD screw. Is it worth increasing the SWOP in order to increase the running processes (to bring the processor load to at least 30%)?
I will answer possible questions in advance:
1. An increase in memory entails an increase in processor cores and prices (we are talking about the cloud)
2. SSD durability is not of interest for the same reason.
3. I know that SATA speed is ten times slower than DDR
Answer the question
In order to leave comments, you need to log in
No, it's not worth it! If the memory is actively used, then the processor, when adding a swap, will bump into the performance of the disk system and will also be idle. After all, the processor needs to get a page from the swap, replace it in real memory, and only then transfer control to the program.
I suspect that it is worth mongodb, which ate all the memory. If so, then run the mongo in a separate instance or in a container.
Also, in the above example with 100% memory usage and swap, it seems to me that I need to deal with the application that memory loves so much - this is not normal!
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question