...
Code Block |
---|
|
-Xlog:gc*:/usr/local/FlashphonerWebCallServer/logs/gc-core-:time |
5. Tune the wcsAdd the following setting to wcs-core.properties properties (for example, allocating 24G under memory heap):
Code Block |
---|
|
# ZGC
-XX:+UnlockExperimentalVMOptions -XX:+UseZGC -Xms24g -Xmx24g |
Code Block |
---|
|
# ZGC
-XX:+UseZGC -Xms24g -Xmx24g |
6. If hugepages is planning to use, add the following settings to wcs-core.properties:
Code Block |
---|
|
-XX:+UseLargePages -XX:ZPath=/hugepages |
Code Block |
---|
|
-XX:+UseLargePages -XX:AllocateHeapAt=/hugepages |
6. Сonfigure ZGC Then configure hugepages according to the recommendations (the number of memory pages (2048K each) with a margin to the memory for heap (1,125 * 24G * 1024 / 2M)) and add the required parameters in the server startup (Centos example):
Code Block |
---|
|
sudo mkdir /hugepages
sudo echo "echo 13824 >/sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages" >>/etc/rc.local
sudo echo "mount -t hugetlbfs -o uid=0,mode=0757 nodev /hugepages" >>/etc/rc.local
sudo chmod +x /etc/rc.d/rc.local
sudo systemctl enable rc-local.service
sudo systemctl restart rc-local.service
sudo chmod o+w /hugepages |
...
Code Block |
---|
|
sysctl -w vm.max_map_count=131072 |
and restart WCS.
Known issues
1. CPU load average is higher when ZGC is used, especially in JDK 15
Symptoms: CPU load average measured at system level (using htop for example) grows after update from JDK 12 or 14 to 15 if ZGC is used
Solution: use ZGC in JDK 12 or 14 only fro high loaded servers if GC pauses minimizing is required
2. ZGC logs may occupy a huge disk space with default output configuration
Symptoms: gc-core*.log
files occupy a huge disk space
Solution: limit log tags set to write to GC logs with the following parameter in wcs-core.properties
Code Block |
---|
|
-Xlog:gc,gc+start,gc+phases:/usr/local/FlashphonerWebCallServer/logs/gc-core-:time |