Varnish 메모리 할당량 변경

Varnish 메모리 할당량 변경

1 확인[ | ]

Console
Copy
[root@zetaweb ~]# ps -ef | grep varnishd | grep -v grep
root      1869     1  0 05:00 ?        00:00:05 /usr/sbin/varnishd -P /var/run/varnish.pid -a :80 -f /etc/varnish/default.vcl -T 127.0.0.1:6082 -t 120 -p thread_pool_min=50 -p thread_pool_max=1000 -p thread_pool_timeout=120 -u varnish -g varnish -S /etc/varnish/secret -s malloc,256M
varnish   1879  1869  0 05:00 ?        00:05:59 /usr/sbin/varnishd -P /var/run/varnish.pid -a :80 -f /etc/varnish/default.vcl -T 127.0.0.1:6082 -t 120 -p thread_pool_min=50 -p thread_pool_max=1000 -p thread_pool_timeout=120 -u varnish -g varnish -S /etc/varnish/secret -s malloc,256M
Console
Copy
[root@zetaweb ~]# cat /etc/sysconfig/varnish | grep ^VARNISH_STORAGE
VARNISH_STORAGE_SIZE=256M
VARNISH_STORAGE="malloc,${VARNISH_STORAGE_SIZE}"

2 변경[ | ]

Console
Copy
[root@zetaweb ~]# vi /etc/sysconfig/varnish
aconf
Copy
#VARNISH_STORAGE_SIZE=256M
VARNISH_STORAGE_SIZE=1G
  • 변경사항 확인
Console
Copy
[root@zetaweb ~]# cat /etc/sysconfig/varnish | grep ^VARNISH_STORAGE
VARNISH_STORAGE_SIZE=1G
VARNISH_STORAGE="malloc,${VARNISH_STORAGE_SIZE}"
  • 적용을 위해 varnish 재시작
Console
Copy
[root@zetaweb ~]# /etc/init.d/varnish restart
Stopping Varnish Cache:                                    [  OK  ]
Starting Varnish Cache:                                    [  OK  ]

3 확인 2[ | ]

Console
Copy
[root@zetaweb ~]# ps -ef | grep varnishd | grep -v grep
root      7863     1  2 19:52 ?        00:00:00 /usr/sbin/varnishd -P /var/run/varnish.pid -a :80 -f /etc/varnish/default.vcl -T 127.0.0.1:6082 -t 120 -p thread_pool_min=50 -p thread_pool_max=1000 -p thread_pool_timeout=120 -u varnish -g varnish -S /etc/varnish/secret -s malloc,1G
varnish   7865  7863  1 19:52 ?        00:00:00 /usr/sbin/varnishd -P /var/run/varnish.pid -a :80 -f /etc/varnish/default.vcl -T 127.0.0.1:6082 -t 120 -p thread_pool_min=50 -p thread_pool_max=1000 -p thread_pool_timeout=120 -u varnish -g varnish -S /etc/varnish/secret -s malloc,1G

4 같이 보기[ | ]