|
[iyunv@xxxx ~]# free -h
total used
free shared buffers cached
Mem:
1.8G 1.7G 63M 43M 9.7M 140M
-/+ buffers/cache: 1.6G 213M
Swap: 0B 0B 0B
[iyunv@xxxx
~]# mkdir /swapfile
[iyunv@xxxx
~]# cd /swapfile
[iyunv@xxxx swapfile]#
sudo dd if=/dev/zero of=swap bs=1024 count=2000000
2000000+0 records in
2000000+0 records out
2048000000 bytes (2.0 GB) copied, 39.1198 s, 52.4 MB/s
[iyunv@xxxx swapfile]# sudo mkswap -f swap
Setting up swapspace version 1,>
no label, UUID=75b00bde-7aed-48f3-b373-126a2054ad26
[iyunv@xxxx swapfile]# sudo swapon swap
swapon: /swapfile/swap: insecure permissions 0644, 0600 suggested.
[iyunv@xxxx swapfile]# free -h
total used free shared buffers cached
Mem: 1.8G 1.7G 93M 43M 1.2M 23M
-/+ buffers/cache: 1.7G 118M
Swap: 1.9G 0B 1.9G
[iyunv@xxx swapfile]# |
|
|