cache 초기화 및 swap 초기화 - swappoff swapon
ㅁ cache drop(초기화)
[root@web01 ~]# cat /proc/sys/vm/drop_caches0[root@web01 ~]# echo 3 > /proc/sys/vm/drop_caches[root@web01 ~]# cat /proc/sys/vm/drop_caches3 |
ㅁ swapoff -a : 스왑 비활성화(끄기)
[root@web01 ~]# free -mt total used free shared buff/cache availableMem: 987 162 381 7 443 632Swap: 2047 0 2047Total: 3035 162 2429[root@web01 ~]# swapoff -a [root@web01 ~]# free -mt total used free shared buff/cache availableMem: 987 161 382 7 443 633Swap: 0 0 0Total: 987 161 382 [root@web01 ~]# swapoff -hUsage: swapoff [options] [<spec>] Options: -a, –all disable all swaps from /proc/swaps -v, –verbose verbose mode -h, –help display this help and exit -V, –version output version information and exit The <spec> parameter: -L <label> LABEL of device to be used -U <uuid> UUID of device to be used LABEL=<label> LABEL of device to be used UUID=<uuid> UUID of device to be used <device> name of device to be used <file> name of file to be used For more details see swapoff(8). |
ㅁ swapon -a : 스왑 활성화(켜기)
[[root@web01 ~]# swapon -a[root@web01 ~]# free -mt total used free shared buff/cache availableMem: 987 162 382 7 443 632Swap: 2047 0 2047Total: 3035 162 2430 [root@web01 ~]# swapon -h Usage: swapon [options] [<spec>] Options: -a, –all enable all swaps from /etc/fstab -d, –discard[=<policy>] enable swap discards, if supported by device -e, –ifexists silently skip devices that do not exist -f, –fixpgsz reinitialize the swap space if necessary -p, –priority <prio> specify the priority of the swap device -s, –summary display summary about used swap devices –show[=<columns>] display summary in definable table –noheadings don’t print headings, use with –show –raw use the raw output format, use with –show –bytes display swap size in bytes in –show output -v, –verbose verbose mode -h, –help display this help and exit -V, –version output version information and exit The <spec> parameter: -L <label> synonym for LABEL=<label> -U <uuid> synonym for UUID=<uuid> LABEL=<label> specifies device by swap area label UUID=<uuid> specifies device by swap area UUID PARTLABEL=<label> specifies device by partition label PARTUUID=<uuid> specifies device by partition UUID <device> name of device to be used <file> name of file to be used Available discard policy types (for –discard): once : only single-time area discards are issued. (swapon) pages : discard freed pages before they are reused. * if no policy is selected both discard types are enabled. (default) Available columns (for –show): NAME device file or partition path TYPE type of the device SIZE size of the swap area USED bytes in use PRIO swap priority For more details see swapon(8). |
[출처][hana] cache 초기화 및 swap 초기화 – swappoff swapon|작성자하나자바
이 게시글이 문제가 될 시, 삭제하겠습니다
댓글 없음:
참고: 블로그의 회원만 댓글을 작성할 수 있습니다.