Modify the Linux swap swap area size __linux

Source: Internet
Author: User
 
Swap swap area is the virtual memory technology of Linux, in order to effectively improve the utilization of physical memory, will open a space in the hard disk
Use to stack infrequently used memory data. Sometimes virtual memory is full and some programs die (although not the system crashes). )
 
# # How to modify the Swap area # #
Enter a file that modifies the size of the swap space

> The


swap area on the sudo vi/etc/dphys-swapfile raspberry pie default size:

> conf_swapsize=100

change him to "twice times the physical memory "If the physical memory is 512M, then he is 1024M:

> conf_swapsize=1024 Restart the

Swap Zone Management Service process:

> Sudo/etc/init.d/dphys-swapfile Stop
> Sudo/etc/init.d/dphys-swapfile start


View Linux memory:

> Free-m

expected display results: the

output Should look like:

total     used     free   shared  buffers   cached
Mem:           435       56      379        0        3
-/+ buffers/cache:      399
Swap:         1023        0     1023

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.