In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces how to create memory swap space swap, the article is very detailed, has a certain reference value, interested friends must read it!
First of all, let's introduce the role of swap. In general, when we have installed the linux operating system, the system will create swap partitions by default. Let's take a look at the use of swap partitions on the server
# free-h total used free shared buff/cache availableMem: 992M 630M 68M 264K 293M 198MSwap: 1.0G 96m 927m
The swap partition size of the server is 1G. This swap partition is created by default. We will increase the capacity of the swap partition on this basis.
Swap partition is called swap partition. As a special hard disk space, it acts as memory. When the system memory is not enough, the system will store some of the data in memory that will not be used temporarily in the swap partition. The advantage of using swap partitions is that hard drives are much cheaper than memory, so this is a very cost-effective way to increase system memory. However, if you use swap frequently, it will greatly affect the running speed of the system. Therefore, the good use strategy for swap partitions is to "prepare but not use".
Next, let's look at how to create a swap partition.
Build swap partitions through physical partitions
First of all, you need to partition.
Next, format.
Mkswap / dev/sda5
Then open a new swap partition
At this point, the construction of the swap partition is complete, unlike the general partition, building the swap partition does not need to be mounted, you only need to use the command swapon partition name.
Build swap partitions from files
The above method is suitable for leaving unused space on the disk. But if all the disk space is partitioned, how do you create a swap partition? We can build the swap partition by making a large file. Although all the disk space has been allocated, this method can be used as long as there is space left in any of the partitions.
Let's create a large file.
Next, format
Finally, open the swap partition.
Today and you introduced two ways to build swap partition, the general swap partition size is recommended in 2G, remember that the role of swap partition is when there is not enough memory, with hard disk space 00:00 as memory use oh.
The above is all about how to create a memory swap space swap, thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.