Archived community.zenoss.org | full text search
Skip navigation
70191 Views 7 Replies Latest reply: Dec 2, 2010 3:57 PM by skypegeek RSS
Andreas Trawoeger Rank: Green Belt 109 posts since
Apr 10, 2008
Currently Being Moderated

Jun 26, 2008 7:42 AM

Zenoss Performance and Latency tuning

I did some testing over the last couple of days on how to tune the Zenoss Web Gui experience. Our Zenoss Core server is currently running on a recycled 1U server that was never designed for high I/O loads. Especially zenperfsnmp can be very I/O bound and easily saturates our internal raid controller which only provides disk mirroring and doesn't have any write cache.

In the original configuration this lead to a situation where the Zenoss Web Gui became practically unusable (wait times of up to 1 minute or more) every 5 minutes. Because zenperfsnmp starved the rest of the system to dead. The suggested modification didn't improve overall performance. But they managed to push the maximum Zenoss page load time into a much more enjoyable time range of 5-10 seconds.

Latency tuning involves a loot of Voodoo and can be very hardware dependent. So please take this advice with a big grain of salt:

Use Firefox 3.0:
Firefox 3.0 has a greatly improved caching and javascript engine. Using Firefox 3 speeds up Zenoss a lot without having to do any low level kernel stuff.

Use a battery buffered write cache:
Much has been said about Zenoss CPU + Memory requirements. But if you can don't forget to either buy a storage controller that supports a battery buffered write cache or use a high performance storage systems. If you don't you easily end spending a lot of CPU cycles in I/O wait state.

Use the Linux Deadline I/O scheduler:
This can be done by adding "elevator=deadline" as a kernel parameter in your grub bootloader configuration. The Deadline scheduler can hurt your overall performance, but improves latency for processes that mainly read.

Tune your Virtual Memory configuration:
Buffer and Virtual Memory tuning is an area of much debate and wild guessing, but the following parameters in /etc/syctl.conf improved latency on our system:
ProxyPass / http://localhost:8080/ retry=5
ProxyPassReverse / http://localhost:8080/

Use Apache mod_proxy and mod_cache:
Using mod_proxy can be nice, because it allows you to easily redirect request to Zenoss:
CacheEnable mem / 

But mod_proxy alone doesn't add any performance gains and the same functionality could be gained using Apache rewrite rules. What can improve latency is using mod_proxy in combination with mod_cache and memory web caching:
vm.vfs_cache_pressure = 5
vm.swappiness = 5
vm.overcommit_memory = 2
vm.dirty_background_ratio = 5
vm.dirty_ratio = 80
vm.dirty_writeback_centisecs = 3000
vm.dirty_expire_centisecs = 9000 

net.core.rmem_max=16777216
net.core.wmem_max=16777216
net.ipv4.tcp_rmem=4096 87380 16777216
net.ipv4.tcp_wmem=4096 65536 16777216
net.ipv4.tcp_no_metrics_save=1
net.ipv4.tcp_congestion_control=bic

This list is far from complete and different hardware probably will lead to different results. So feel free to comment.
  • Chet Luther ZenossEmployee 1,302 posts since
    May 22, 2007
    Currently Being Moderated
    1. Jun 26, 2008 8:15 AM (in response to Andreas Trawoeger)
    Zenoss Performance and Latency tuning
    On Jun 26, 2008, at 7:42 AM, atrawog wrote:

     

     

    But mod_proxy alone doesn't add any performance gains and the same
    functionality could be gained using Apache rewrite rules. What can
    improve latency is using mod_proxy in combination with mod_cache and
    memory web caching:

    Code:
    CacheEnable mem /


    Lost of good suggestions, but I just wanted to warn people about a
    potential gotcha with mod_cache. Don't try to use mod_cache on an
    Apache reverse proxy to Zenoss unless you have httpd-2.2+. Earlier
    versions do not play nicely with Zope and will cause very strange
    behavior.
    _______________________________________________
    zenoss-users mailing list
    zenoss-users@zenoss.org
    http://lists.zenoss.org/mailman/listinfo/zenoss-users
  • jmp242 ZenossMaster 4,060 posts since
    Mar 7, 2007
    Currently Being Moderated
    2. Jun 26, 2008 8:45 AM (in response to Chet Luther)
    Zenoss Performance and Latency tuning
    I'm also enjoying better performance with Opera 9.5 vs 9.2x - just
    getting an up to date browser I'm sure will improve your web experience,
    including the Zenoss dashboard.
    --
    James Pulver
    Information Technology Area Supervisor
    LEPP Computer Group
    Cornell University
    _______________________________________________
    zenoss-users mailing list
    zenoss-users@zenoss.org
    http://lists.zenoss.org/mailman/listinfo/zenoss-users
  • Wouter DHaeseleer ZenossMaster 204 posts since
    Jun 22, 2007
    Currently Being Moderated
    3. Jan 29, 2009 8:04 AM (in response to jmp242)
    RE: Zenoss Performance and Latency tuning
    Cool tips.

    I do seem to have a benefit thanks to the caching of apache.

    But I have a question.

    On my apache I have also

    http://myserver/phpmyadmin

    Enabling reverse proxy in the way explained here will cause that /phpmyadmin is proxyed to zenoss on port 8080 making an URL of:
    http://myserver:8080/phpmyadmin

    any idea how I can disable that?
    So that the proxy ony acts on the /

    thanks
  • fdeckert Rank: Green Belt 110 posts since
    Jul 2, 2008
    Currently Being Moderated
    4. Feb 26, 2009 2:41 AM (in response to Wouter DHaeseleer)
    RE: Zenoss Performance and Latency tuning
    I had the same issue with port 8080 being displayed in the javascript code.

    but with help of thread http://forums.zenoss.com/viewtopic.php?t=8835&highlight=apache+8080 I fixed it :-)

    The trick lies in
    ProxyPreserveHost On

    --
    Florian Deckert
    SopraGroup - France
  • ericgearhart Newbie 2 posts since
    Jan 2, 2010
    I'm suprised no one has pointed this out yet... basically each block of example config in the original post is backwards... i.e. put the ProxyPass and cache config lines in Apache's config, not in /etc/sysctl.conf, and vice versa....
  • Apachez Rank: White Belt 17 posts since
    Jan 3, 2010

    I guess people want to be polite in the christmas spirit ;-)

     

    But I had the same experience while reading the text "uhh... wtf?" :-)

     

    Regarding performance I have been playing with the mysql settings in zenoss...

     

    Edited /usr/local/zenoss/mysql/my.cnf and added (below [mysqld]):

     

    bind-address = 127.0.0.1
    key_buffer_size = 32M
    sort_buffer_size = 1M
    read_buffer_size = 1M
    read_rnd_buffer_size = 1M
    join_buffer_size = 1M
    myisam_sort_buffer_size = 1M
    max_allowed_packet = 16M
    net_buffer_length = 8K
    table_cache = 2048
    thread_stack = 192K
    thread_cache_size = 8
    thread_concurrency = 8
    query_cache_size = 32M
    query_cache_limit = 1M
    query_cache_type = 1
    ft_min_word_len = 2
    ft_stopword_file =
    skip-external-locking
    skip-name-resolve

     

    default-storage_engine = innodb

    transaction-isolation = READ-COMMITTED
    innodb_locks_unsafe_for_binlog = 1
    innodb_additional_mem_pool_size = 16M
    innodb_buffer_pool_size = 256M
    innodb_doublewrite = 0
    innodb_flush_log_at_trx_commit = 2
    innodb_flush_method = O_DIRECT
    innodb_log_buffer_size = 8M
    innodb_log_file_size = 128M
    innodb_log_files_in_group = 2
    innodb_rollback_on_timeout = 1
    innodb_thread_concurrency = 8

     

    and added (below [mysqld_safe]):

     

    nice = -5
    open-files-limit = 8192

     

     

    Perhaps someone with a bit of sparetime who wish to confirm the above settings?

     

     

    Afterwards restart the mysql service:

     

    /etc/init.d/zenoss-stack restart mysql

     

     

    If error occurs during startup you might need to delete the innodb logfiles (ib_logfile0 and ib_logfile1) located in /usr/local/zenoss/mysql/data (due to changed innodb_log_file_size) and then:

     

    /etc/init.d/zenoss-stack start mysql

     

     

    In order to access mysql from cli you can do this (to login as root, otherwise change the -u):

     

    /usr/local/zenoss/mysql/bin/mysql -S /usr/local/zenoss/mysql/tmp/mysql.sock -u root -p

     

    The default password is "zenoss" unless you have changed it to something else during install.

     

     

    Regarding the scheduler I prefer "noop" for servers and this can be changed during runtime:

     

    echo "noop" > /sys/block/sda/queue/scheduler

     

    current setting (and options) can be disabled by:

     

    cat /sys/block/sda/queue/scheduler

  • skypegeek Rank: White Belt 11 posts since
    Nov 23, 2010

    Our Zenoss installation was unusable. We've added an additional collector at the data center, but that didn't help much. Today I've increased the ZODB cache, which increased the performance significantly.

     

    First, you will need to check the number of entries that you have in your catalog, by simply going to the link below :

     

    http://yourdomain:8080/zport/global_catalog/manage_catalogView?submitted=true

     

    Round it up to the nearest 100,000. 

     

    Edit your zope.conf

     

    locate the section below and increase the cache to the rounded number

     

    <zodb_db main>
      mount-point /
      # ZODB cache, in number of objects
      cache-size 100000
      <zeoclient>

     

    then Restart your zenoss-stack, and you will see a huge performance increase.

More Like This

  • Retrieving data ...