In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Remember to install the operating system, in the allocation of disk space, we allocated swap space. The default setting is that the swap space is twice the size of physical memory. So what is swap? The so-called swap is similar to the virtual memory of Windows, that is, when there is insufficient memory, a part of the hard disk space is virtualized into memory, and the data temporarily not used in memory is stored in the swap space of the hard disk, freeing up memory for other programs to run, thus solving the problem of insufficient memory capacity.
When we don't have enough server resources, we increase memory expansion performance. Can the swap space also be expanded? Of course you can. The method of capacity expansion will be given below.
1. Create a space
[root@server02] # dd if=/dev/zero of=/tmp/newdisk bs=1M count=100 recorded 100 du 0 read record 100 million write out 104857600 bytes (105 MB) replicated, 1.56131 seconds, 67.2 MB/ seconds [root@server02] # du-sh / tmp/newdisk100M / tmp/newdisk
2. Formatting
[root@server02 ~] # mkswap-f / tmp/newdisk is setting swap space version 1, size = 102396 KiB unlabeled, UUID=d97d85bc-5665-4f7d-a721-cc305b9425d3 [root@server02 ~] # free-m total used free shared buff/cache availableMem: 984113619 6251 701Swap: 2047 0 2047
3. Start
[root@server02 ~] # swapon / tmp/newdiskswapon: / tmp/newdisk: unsafe permission 0644. It is recommended to use 0600. [root@server02] # free-m total used free shared buff/cache availableMem: 984 113619 6 252 701Swap: 2147 0 2147 [root@server02] # chmod 0600 / tmp/newdisk
If you do not need this swap space, you can also release it.
[root@server02 ~] # swapoff / tmp/newdisk [root@server02 ~] # free-m total used free shared buff/cache availableMem: 984 113619 6 252 701Swap: 2047 2047 [root@server02] # rm-f / tmp/newdisk
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.