linux swap file system management

In linux, we can use the free to view and swap memory usage

Generally divided two parts Memory

caching cached: means to read out the data stored in the memory which, when re-read, without directly reading the hard disk is read directly from the memory, the data read process to accelerate
new buffer: write data refers to , the operation of the first dispersion is stored in memory writing, when the concentration reaches a certain level and then written to the hard, hard and decrease fragmented repeatedly seek to accelerate the data writing process.

System expansion of swap space, first determine the hard disk space can be allocated there.
Distributed through the following ideas.
The hard disk space to create partitions
#fdisk / dev / sdx
above command add a partition, the partition ID of the partition view, and change the partition number is consistent with the swap area to maintain the command number, as a swap area assigned designated 82
in order through m fdisk or l View command prompt.
After completion of the partition needs to write w partition information.
After writing the partition, typically requires the use partprobe command to re-read the partition, or restart.
After the partition is created, you need to format the partition, swap partition formatted using the following command
# mkswap / dev / sdb6
mkswap command directly with the device partition.
The new partition is added swap partition
Finally, we need to set a partition to boot automatically mount
edit / etc / fstab file
note editing swap with the / directory partition under linux swap partition is part of a parallel file.

If you do not want to edit the file manually using command can also be mounted at boot time each partition
swapon / dev / sdb

Guess you like

Origin blog.csdn.net/tang3827738w/article/details/92402752