lhotari commented on PR #626:
URL: 
https://github.com/apache/pulsar-helm-chart/pull/626#issuecomment-3259324975

   To get the best performance in Linux with ZGC, it's necessary to also tune 
the Linux kernel with these settings recommended in a Netflix blog post:
   ```
   echo madvise | sudo tee /sys/kernel/mm/transparent_hugepage/enabled
   echo advise | sudo tee /sys/kernel/mm/transparent_hugepage/shmem_enabled
   echo defer | sudo tee /sys/kernel/mm/transparent_hugepage/defrag
   echo 1 | sudo tee /sys/kernel/mm/transparent_hugepage/khugepaged/defrag
   ```
   
   For example in Ubuntu, you can make these settings permanent in this way:
   ```
   sudo apt-get -y install sysfsutils
   # Tune Linux Transparent HugePages (THP) for Java processes in a persistent 
way with sysfsutils
   cat <<EOF | sudo tee /etc/sysfs.d/transparent_hugepage.conf
   # Based on Netflix instructions from 
https://netflixtechblog.com/bending-pause-times-to-your-will-with-generational-zgc-256629c9386b
   # ZGC won't be able to make use of THP with -XX:+UseTransparentHugePages 
unless these settings are used
   kernel/mm/transparent_hugepage/enabled=madvise
   kernel/mm/transparent_hugepage/shmem_enabled=advise
   kernel/mm/transparent_hugepage/defrag=defer
   kernel/mm/transparent_hugepage/khugepaged/defrag=1
   EOF
   sudo systemctl enable sysfsutils.service
   sudo systemctl restart sysfsutils.service
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to