Some explanations and solutions about the low memory of the VPS _linux

Source: Internet
Author: User
Tags vps
A few notes on swap
1,swap is generally called "swap Space", which acts as "virtual memory" on Windows.
2,swap is actually a piece of space on your hard disk.
The data stored in the 3,swap is not directly available to the CPU directly. If the CPU wants to use the data in swap, it needs to transfer the data from the hard disk to the memory before handing it over to the CPU.
4,swap is stored in a temporary unused or low frequency data.
5, the data from swap to memory faster than from memory to CPU speed, to hundreds of times times or even hundreds of thousand.

Second, about low memory
The significance of 1,swap exists in storing infrequently used data, not in physical memory.
2, if the frequently used data is not stored in physical memory, the kernel will be forced to allocate some of the data to swap.
3, if the 2nd article has been written, a large number of hard disk read and write IO will be generated, as shown in section 2nd of the notes on swap.
4, the following article, a large number of hard disk read and write IO will have the consequences:
(1) CPU in processing operations will have a lot of time waiting for hard disk IO, seriously affecting the response speed of the server.
(2) Other VPS on the same server will be affected (unless the same hard drive is used).
5,* Note that you distinguish between "use swap" and "swap":
(1) Using swap, means that the data is stored in swap, is a fixed state, does not occupy hard disk IO.
The following figure, although the system occupies 13M of swap, but no swap swap.

(2) Swap is the process by which data is transferred from swap to physical memory or transferred from physical memory to swap.
As shown in the diagram below, the system is doing a lot of memory swapping operations every second.

Iii. Low-memory recommendations
(1) If there is not enough memory, the VPS memory should be upgraded in time. Otherwise it will not only affect its own VPS system, but will also affect other VPS.
(2) Do not try to add swap to solve the problem of low memory, the problem is due to lack of physical memory, more swap is not helpful.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.