linux 增加swap大小!
[root@localhost ~]# free
total used free shared buffers cached
Mem: 499304 488388 10916 0 10220 208400
-/+ buffers/cache: 269768 229536
Swap: 0 0 0
[root@localhost ~]# pwd
/root
[root@localhost ~]# mkdir swap
[root@localhost ~]# cd swap
[root@localhost swap]# dd if=/dev/zero f=swapfile bs=1024 count=10000
10000+0 records in
10000+0 records out
10240000 bytes (10 MB) copied, 0.0885569 seconds, 116 MB/s
[root@localhost swap]# ls -al
總計 10036
drwxr-xr-x 2 root root 4096 02-26 22:12 .
drwxr-x--- 19 root root 4096 02-26 22:12 ..
-rw-r--r-- 1 root root 10240000 02-26 22:12 swapfile
[root@localhost swap]# mkswap swapfile
Setting up swapspace version 1, size = 10235 kB
[root@localhost swap]# swapon swapfile
[root@localhost swap]# ls -l
總計 10020
-rw-r--r-- 1 root root 10240000 02-26 22:13 swapfile
[root@localhost swap]# free
total used free shared buffers cached
Mem: 499304 490336 8968 0 10672 209964
-/+ buffers/cache: 269700 229604
Swap: 9992 0 9992
total used free shared buffers cached
Mem: 499304 488388 10916 0 10220 208400
-/+ buffers/cache: 269768 229536
Swap: 0 0 0
[root@localhost ~]# pwd
/root
[root@localhost ~]# mkdir swap
[root@localhost ~]# cd swap
[root@localhost swap]# dd if=/dev/zero f=swapfile bs=1024 count=10000
10000+0 records in
10000+0 records out
10240000 bytes (10 MB) copied, 0.0885569 seconds, 116 MB/s
[root@localhost swap]# ls -al
總計 10036
drwxr-xr-x 2 root root 4096 02-26 22:12 .
drwxr-x--- 19 root root 4096 02-26 22:12 ..
-rw-r--r-- 1 root root 10240000 02-26 22:12 swapfile
[root@localhost swap]# mkswap swapfile
Setting up swapspace version 1, size = 10235 kB
[root@localhost swap]# swapon swapfile
[root@localhost swap]# ls -l
總計 10020
-rw-r--r-- 1 root root 10240000 02-26 22:13 swapfile
[root@localhost swap]# free
total used free shared buffers cached
Mem: 499304 490336 8968 0 10672 209964
-/+ buffers/cache: 269700 229604
Swap: 9992 0 9992
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/12778571/viewspace-195885/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Linux系統中增加Swap分割槽大小Linux
- Linux增加swap空間Linux
- Linux 增加 swap 分割槽Linux
- Linux之 增加swap空間Linux
- linux下增加swap分割槽Linux
- linux 增加 刪除swap方法Linux
- 手工為Linux新增swap大小Linux
- 在Linux中增加swap空間Linux
- 增加、刪除、修改LINUX SWAP區Linux
- (轉) linux下增加swap分割槽Linux
- Linux系統調整swap大小Linux
- Linux 增加swap 的最簡單方法Linux
- Linux系統中增加Swap分割槽檔案步驟方法Linux
- linux中增加swap分割槽或檔案的步驟方法Linux
- 阿里雲伺服器增加SWAP阿里伺服器
- Linux可以增加分割槽大小嗎?有哪些好處?Linux
- Linux新增SWAPLinux
- linux swap(交換)Linux
- HP下增加swap的步驟(HP-UX)UX
- linux 禁止swap交換Linux
- Linux Swap擴容Linux
- linux下新增SWAPLinux
- LINUX 建立swap空間Linux
- linux 修改swap空間Linux
- Linux 建立swap分割槽Linux
- linux新增swap分割槽Linux
- 在裝完Linux系統之後自己去修改Swap分割槽的大小(兩種方法)Linux
- MySQL 增加InnoDB系統表空間大小MySql
- 擴充linux swap空間Linux
- 轉:Linux check mem,cpu,SwapLinux
- 使用磁碟為Linux新增swapLinux
- Centos 7 建立一個swap檔案增加虛擬記憶體CentOS記憶體
- 虛擬機器增加磁碟分割槽的大小虛擬機
- Linux增加磁碟Linux
- Linux交換空間swap講解Linux
- Linux記憶體、Swap、Cache、BufferLinux記憶體
- Linux swap 佔用分析指令碼Linux指令碼
- Linux環境下Swap配置方法Linux