Example uses CT 118 (OpenVZ container ID 118) for example.
Login to your hardware node
vzctl stop 118
vzctl set 118 --kmemsize unlimited --save
vzctl set 118 --lockedpages unlimited --save
vzctl set 118 --privvmpages unlimited --save
vzctl set 118 --shmpages unlimited --save
vzctl set 118 --numproc unlimited --save
vzctl set 118 --numtcpsock unlimited --save
vzctl set 118 --numflock unlimited --save
vzctl set 118 --numpty unlimited --save
vzctl set 118 --numsiginfo unlimited --save
vzctl set 118 --tcpsndbuf unlimited --save
vzctl set 118 --tcprcvbuf unlimited --save
vzctl set 118 --othersockbuf unlimited --save
vzctl set 118 --dgramrcvbuf unlimited --save
vzctl set 118 --numothersock unlimited --save
vzctl set 118 --dcachesize unlimited --save
vzctl set 118 --numfile unlimited --save
vzctl set 118 --numiptent unlimited --save
(for elasticsearch... set memlock to unlimited by: vzctl set <CT_NUM> --memlock unlimited --save )
nano /etc/sysctl.conf
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default=262144
net.core.wmem_default=262144
net.core.rmem_max=262144
net.core.wmem_max=262144
/sbin/sysctl -p
vzctl start 118
vzctl enter 118
nano /etc/sysctl.conf
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
/sbin/sysctl -p
exit
vzctl stop 118
vzctl start 118
No comments:
Post a Comment