• <output id="aynwq"><form id="aynwq"><code id="aynwq"></code></form></output>

    <mark id="aynwq"><option id="aynwq"></option></mark>
  • <mark id="aynwq"><option id="aynwq"></option></mark><label id="aynwq"><dl id="aynwq"></dl></label>
  • 學(xué)習(xí)啦 > 學(xué)習(xí)電腦 > 操作系統(tǒng) > Linux教程 > Linux系統(tǒng)中如何調(diào)整swap大小

    Linux系統(tǒng)中如何調(diào)整swap大小

    時(shí)間: 曉斌668 分享

    Linux系統(tǒng)中如何調(diào)整swap大小

      這里學(xué)習(xí)啦小編要跟大家介紹的是Linux系統(tǒng)中調(diào)整swap大小的方法。歡迎大家閱讀。

      Linux系統(tǒng)中調(diào)整swap大小的方法

      1、使用free命令帶上m參數(shù),查看swap文件大小,官方建議在RAM是2到4.5G時(shí),swap是RAM的2倍;如果RAM大于等于4G則swap等于RAM即可

      2、也可用cat 查看etc目錄下的swaps文件,如下圖

      3、創(chuàng)建一個(gè)swap文件

      復(fù)制內(nèi)容到剪貼板

      ########

      dd if=/dev/zero of=/tmp/swap bs=1MB count=1024

      ########

      以下僅供參考:不用看

      Creating a swap file

      First of, make sure the file system the disk you wish to swap on is properly mounted. For the purposes of this tutorial we will assume the disk is mounted as /mnt and we want to use the file /mnt/myswap.swp for swapping.

      使用下面的命令創(chuàng)建一個(gè)1G的swap文件

      復(fù)制內(nèi)容到剪貼板

      Use the following command to create a 1024MB file that we will use for swapping

      ########

      dd if=/dev/zero of=/mnt/myswap.swp bs=1024MB count=1

      ########

      4、制作一個(gè)swap文件,如果覺得繁瑣,可以將mkswap文件掛載到tmp目錄下,例如:

      復(fù)制內(nèi)容到剪貼板

      ########

      mkswap /tmp/swap

      ########

      以下僅供參考:不用看

      Preparing the swap file

      Before we enable the swap file we must first set it up. The following command accomplishes just that:

      ########

      mkswap /mnt/myswap.swp

      ########

      5、使用swapon 啟動(dòng)/tmp/swap

      復(fù)制內(nèi)容到剪貼板

      ########

      swapon /tmp/swap

      ########

      使用一個(gè)swap分區(qū),如果已經(jīng)有一個(gè)swap分區(qū),該步驟可以省略

      以下僅供參考:不用看

      Using a swap partition

      Setting up a swap partition is a bit more difficult, as the partition must be first created then formatted using the linux-swap file system. Once that is done, assuming the swap partition is at/dev/scsi/host0/bus0/target0/lun0/part5 (common for v24 USB drives with mutiple partitions), the only command that needs be issued is:

      6、再次使用free查看增加后的swap大小

      7、如果只想增加swap大小,請(qǐng)忽略以下的操作,重要!!如果不使用剛才增加的1G的swap文件,使用下面的swapoff命令,可以關(guān)閉,這樣swap文件就縮小了1G

      使用swapoff關(guān)閉swap文件

      復(fù)制內(nèi)容到剪貼板

      ########

      swapoff /tmp/swap

      ########

      注意事項(xiàng):如果只想增加swap大小,請(qǐng)忽略第7步的所有操作。

    404159 主站蜘蛛池模板: 又污又爽又黄的网站| 玉蒲团之偷情宝鉴电影| 美团外卖猛男男同38分钟| 美女网站免费福利视频| 精品日韩欧美一区二区在线播放 | 亚洲色图欧美在线| 伊人久久久久久久久久| 亚洲精品国精品久久99热| 亚洲婷婷综合色高清在线| 亚洲va无码va在线va天堂| 久久青草精品38国产| 久久久精品日本一区二区三区 | 巨胸动漫美女被爆羞羞视频| 女人扒开屁股桶爽30分钟| 国产黄在线观看免费观看不卡| 国产精品狼人久久久久影院| 国产成人av乱码在线观看| 国产一区二区三区免费在线视频| 免费人成黄页在线观看国产 | 狼色视频在线观免费观看| 精品一区二区久久久久久久网站| 蜜桃麻豆www久久国产精品| 美女扒开内裤羞羞网站| 波多野结衣护士系列播放| 精品一区二区久久| 欧美综合自拍亚洲综合图| 日韩大片高清播放器| 宝宝你里面好烫很软不想出来| 国内不卡一二三四区| 国产免费小视频| 亚洲黄色在线观看网站| 乱人伦中文字幕在线| а天堂中文地址在线| 午夜激情小视频| 精品视频vs精品视频| 欧美人与动zozo| 成人国产午夜在线视频| 国产精品无码素人福利免费| 国产区综合另类亚洲欧美| 交换美妇94系列部分| 久久国产精品免费一区二区三区 |