Ad Widget

Collapse

PATCH: Enable HugePages use for high-performance zabbix_server

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • JRE
    Junior Member
    • Feb 2010
    • 16

    #1

    PATCH: Enable HugePages use for high-performance zabbix_server

    Hi. I've used the attached patch to enable use of HugePage in the shared memory segments that zabbix_server uses. This was specifically tested on a Linux x86_64 host.

    What this affect: Instead of using smaller, 4KB mempry pages, HugePages allows us to use 2MB or larger pagesizes (depending on architecture). What should specifically be allowed is tuning or autodetection of the hugepage size. I assumed a hugepage size of 2MB which is standard for all x86 hosts running PAE (x86_64 uses PAE implicitly). Newer AMD/Intel processors support 1GB page sizes, and the Linux kernel has a parameter to tune this.

    Huge pages has a three fold effect:
    1. Increases TLB efficiency (allows the TLB to cache a larger memory area), which in turn dramatically increase memory performance.
    2. Pins shared memory in RAM, will never get swapped to disk. Also takes a shorter memory path, never worries about swapping.
    3. Dramatically reduces the size of the pagetable. Smaller pagetable = less memory usage = more efficieny virtual memory.


    Anyway, here's the patch. I've tested it on my 64-bit Linux host and it works great. Again, needs to more configurable, just wanted to through this out there for anyone that needs more performance from their zabbix_server processes.

    This patch was generated off of 1.8.1.

    Decent background with lots of reference links on hugepage application: http://zzzoot.blogspot.com/2009/02/j...ance-with.html
    Attached Files
    Last edited by JRE; 17-02-2010, 18:48.
  • Alexei
    Founder, CEO
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2004
    • 5654

    #2
    We considered supports of the huge pages in 1.8.1, but discovered that it seems to be Linux specific feature. Anyway it will be included, thank you for your effort!

    Besides we plan to implement several very important performance-related improvements in 1.8.3, stay tuned!
    Alexei Vladishev
    Creator of Zabbix, Product manager
    New York | Tokyo | Riga
    My Twitter

    Comment

    • JRE
      Junior Member
      • Feb 2010
      • 16

      #3
      Originally posted by Alexei
      We considered supports of the huge pages in 1.8.1, but discovered that it seems to be Linux specific feature. Anyway it will be included, thank you for your effort!

      Besides we plan to implement several very important performance-related improvements in 1.8.3, stay tuned!
      Sweet.

      Yea large pages are supported differently on various platforms... My hack, err *cough*patch*cough* is definitely specific to x86 Linux.

      Comment

      Working...