In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the knowledge about "what is the expansion and deletion method of Linux swap". In the actual case operation process, many people will encounter such difficulties. Next, let Xiaobian lead you to learn how to deal with these situations! I hope you can read carefully and learn something!
A wap space is an area on disk that can be a partition, a file, or a combination of them. Simply put, when the system physical memory is tight, Linux will save the infrequently accessed data in memory to swap, so that the system has more physical memory to serve each process, and when the system needs to access the contents stored on swap, then load the data on swap into memory, which is what we often call swap out and swap in.
Check how big your swap is before expanding [kino@hadoop102 ~]$ sudo free -m total used free shared buffers cachedMem: 1990 1242 747 0 19 175-/+ buffers/cache: 1047 943Swap: 199 0 199 Increase swap partition "file" and size [kino@hadoop102 ~]$ sudo dd if=/dev/zero of=/home/swap bs=1G count=2
where of=/home/swap: swap partition file, bs=1G: units, count=2: count equals the desired block size (here 2G)
2.3 Set up exchange files
[kino@hadoop102 ~]$ sudo mkswap /home/swap Enable swap partition file now [kino@hadoop102 ~]$ sudo swap/home/swap2.5 View partition again, successfully extended 2G[kino@hadoop102 ~]$ sudo free -m total used free shared buffers cachedMem: 1990 896 1094 0 4 288-/+ buffers/cache: 604 1386Swap: 2247 0 22471 Permanent mount [kino@hadoop102 ~]$ sudo vim /etc/fstab#Add/home/swap swap swap defaults 0 0 Delete added swap partition [kino@hadoop102 ~]$ sudo swapoff Added swap partition file "Linux swap extension and deletion method is what" content introduced here, thank you for reading. If you want to know more about industry-related knowledge, you can pay attention to the website. Xiaobian will output more high-quality practical articles for everyone!
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.