Adding swapsize in linux
Adding 2GB of swapsize
[root@dgprim ~]# dd if=/dev/zero of=/u05/swapfile1 count=1M bs=2048
1048576+0 records in
1048576+0 records out
2147483648 bytes (2.1 GB) copied, 4.00654 s, 536 MB/s
[root@dgprim ~]# mkswap -c /u05/swapfile1
Setting up swapspace version 1, size = 2097148 KiB
no label, UUID=f4094cb1-136b-4491-b13c-074d8b77e323
[root@dgprim ~]# swapon /u05/swapfile1
[root@dgprim ~]# swapon -s
Filename Type Size Used Priority
/u05/swapfile1 file 2097148 0 -1
1048576+0 records in
1048576+0 records out
2147483648 bytes (2.1 GB) copied, 4.00654 s, 536 MB/s
[root@dgprim ~]# mkswap -c /u05/swapfile1
Setting up swapspace version 1, size = 2097148 KiB
no label, UUID=f4094cb1-136b-4491-b13c-074d8b77e323
[root@dgprim ~]# swapon /u05/swapfile1
[root@dgprim ~]# swapon -s
Filename Type Size Used Priority
/u05/swapfile1 file 2097148 0 -1
vi /etc/fstab
Add these lines:
/u05/swapfile1 swap swap defaults 0 0
Add these lines:
/u05/swapfile1 swap swap defaults 0 0
Check for swap size [root@dgprim ~]# free -m
total used free shared buffers cached
Mem: 11667 3725 7941 1 135 2811
-/+ buffers/cache: 778 10889
Swap: 2047 0 2047
Note : Now the swap size is increased.
total used free shared buffers cached
Mem: 11667 3725 7941 1 135 2811
-/+ buffers/cache: 778 10889
Swap: 2047 0 2047
Note : Now the swap size is increased.
Subscribe to:
Post Comments
(
Atom
)
No comments :
Post a Comment