Ad Widget

Collapse

Help tuning mysql and Zabbix.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ro_yoshioka
    Member
    • May 2011
    • 33

    #1

    Help tuning mysql and Zabbix.

    Hi,

    I need some help changing configurations of zabbix_server.conf. I found a lot of changes to make at the conf file, in order to optimize zabbix performance, but I've already done those and it is not working for me, so if someone can help, it would be great. Follow information about my server.

    Distribution:
    Linux Debian Lenny 2.6.26-2-amd64 #1 SMP Tue Jan 25 05:59:43 UTC 2011 x86_64 GNU/Linux

    Hardware
    Intel(R) Xeon(R) CPU X3430 @ 2.40GHz
    2Gb ram memory.

    Parameter Value Details
    Zabbix server is running Yes localhost:10051
    Number of hosts (monitored/not monitored/templates) 174 159 / 4 / 11
    Number of items (monitored/disabled/not supported) 2434 676/1336 / 422
    Number of triggers (enabled/disabled)[problem/unknown/ok] 179 179 / 0 [1 / 0 / 178]
    Number of users (online) 6 1
    Required server performance, new values per second 43.07 -

    I'm coping part of my conf as follows, the commented lines are default.
    Code:
    StartPollers=100
    #StartIPMIPollers=5
    StartTrappers=100
    StartPingers=150
    # StartDiscoverers=1
    # StartHTTPPollers=1
    # ListenIP=0.0.0.0
    # HousekeepingFrequency=1
    # MaxHousekeeperDelete=500
    # DisableHousekeeping=0
    # SenderFrequency=30
    CacheSize=32M
    # CacheUpdateFrequency=60
    StartDBSyncers=32
    HistoryCacheSize=16M
    # TrendCacheSize=4M
    # HistoryTextCacheSize=16M
    # NodeNoEvents=0
    # NodeNoHistory=0
    # Timeout=3
    # TrapperTimeout=300
    # UnreachablePeriod=45
    UnavailableDelay=30
    UnreachableDelay=5
    # AlertScriptsPath=/home/zabbix/bin/
    # ExternalScripts=/etc/zabbix/externalscripts
    FpingLocation=/usr/sbin/fping
    # Fping6Location=/usr/sbin/fping6
    # SSHKeyLocation=
    # TmpDir=/tmp
    # Include=
    # StartProxyPollers=1
    # ProxyConfigFrequency=3600
    # ProxyDataFrequency=1
    my my.conf is like this.....
    Code:
    #
    [client]
    port		        = 3306
    socket		= /var/run/mysqld/mysqld.sock
    [mysqld_safe]
    socket		= /var/run/mysqld/mysqld.sock
    nice		         = 0
    
    [mysqld]
    user		= mysql
    pid-file	= /var/run/mysqld/mysqld.pid
    socket		= /var/run/mysqld/mysqld.sock
    port		= 3306
    basedir		= /usr
    datadir		= /var/lib/mysql
    tmpdir		= /tmp
    language	= /usr/share/mysql/english
    skip-external-locking
    bind-address		= 127.0.0.1
    key_buffer		= 64M
    max_allowed_packet	= 64M
    thread_stack		= 256K
    thread_cache_size       = 16
    myisam-recover         = BACKUP
    max_connections        = 800
    table_cache            = 256
    thread_concurrency     = 60
    query_cache_limit	= 10M
    query_cache_size        = 32M
    mysqld_safe_syslog.cnf.
    expire_logs_days	= 10
    max_binlog_size         = 100M
    
    [mysqldump]
    quick
    quote-names
    max_allowed_packet	= 16M
    
    [isamchk]
    key_buffer		= 16M
    !includedir /etc/mysql/conf.d/

    Any help will be great.


    thanks
  • Rudd
    Member
    • Mar 2011
    • 69

    #2
    Hi,

    There are many people on the forum much more qualified than I am, but here is my $0.02

    You should not need that many processes, they will just eat your valuable cpu and db resources.

    I would suggest to start with the following values. They work well for me on one of my installations with a similar nvps. If you believe they are insufficient, try increasing them by small amounts. Like 2 at the time. You are probably more interested in pollers than trappers and pingers.

    StartPollers=8
    StartTrappers=3
    StartPingers=3
    CacheSize=8M
    StartDBSyncers=4
    HistoryCacheSize=8M


    First thing you want to find out is which storage engine the zabbix database is using. (You can check that using this query: "SELECT ENGINE FROM information_schema.TABLES WHERE TABLE_SCHEMA = 'zabbix';") Depending on the storage engine there are different parameters to tune. By default zabbix will use InnoDB (when installed from source). However if InnoDB is disabled at the time of install, MySQL will default back to MyISAM.

    Database tuning is an art, not a science So no straight answers and you will have to do some research. If you are using InnoDB I am happy to share my config as a starting point.

    For a handy tool, to get you started, check out http://mysqltuner.com/ (pay close attention to the warning in the readme)

    hth

    Comment

    • ro_yoshioka
      Member
      • May 2011
      • 33

      #3
      Originally posted by Rudd
      Hi,

      There are many people on the forum much more qualified than I am, but here is my $0.02

      You should not need that many processes, they will just eat your valuable cpu and db resources.

      I would suggest to start with the following values. They work well for me on one of my installations with a similar nvps. If you believe they are insufficient, try increasing them by small amounts. Like 2 at the time. You are probably more interested in pollers than trappers and pingers.

      StartPollers=8
      StartTrappers=3
      StartPingers=3
      CacheSize=8M
      StartDBSyncers=4
      HistoryCacheSize=8M


      First thing you want to find out is which storage engine the zabbix database is using. (You can check that using this query: "SELECT ENGINE FROM information_schema.TABLES WHERE TABLE_SCHEMA = 'zabbix';") Depending on the storage engine there are different parameters to tune. By default zabbix will use InnoDB (when installed from source). However if InnoDB is disabled at the time of install, MySQL will default back to MyISAM.

      Database tuning is an art, not a science So no straight answers and you will have to do some research. If you are using InnoDB I am happy to share my config as a starting point.

      For a handy tool, to get you started, check out http://mysqltuner.com/ (pay close attention to the warning in the readme)

      hth
      Hi,

      Thanks for your help, I will try the values you said to check... but you said that you have almost the same nvps, in my case, I use icmppingsec to check all of my devices, 30% of them with 2sec interval, and 70% with 5sec interval.... thats why I increase the number of pingers, I understood that as I have almost 100 pings per second, it should be the value to increase... is it what I thought or I'm wrong....


      Thanks again... and after I'll post what happens with the changes...

      Comment

      • ro_yoshioka
        Member
        • May 2011
        • 33

        #4
        Originally posted by Rudd
        First thing you want to find out is which storage engine the zabbix database is using. (You can check that using this query: "SELECT ENGINE FROM information_schema.TABLES WHERE TABLE_SCHEMA = 'zabbix';") Depending on the storage engine there are different parameters to tune. By default zabbix will use InnoDB (when installed from source). However if InnoDB is disabled at the time of install, MySQL will default back to MyISAM.

        Database tuning is an art, not a science So no straight answers and you will have to do some research. If you are using InnoDB I am happy to share my config as a starting point.
        Hi again....

        I've checked the engine used to zabbix database, and its innoDB....

        Comment

        • ro_yoshioka
          Member
          • May 2011
          • 33

          #5
          Finally.....

          Hi, I found what was my problem....

          Code:
          # Frequency of ICMP pings. Defauls is 30 second.
          PingerFrequency=1
          It seems that I had just to put this in my zabbix_server.conf, and all my problems solved.....


          thanks a lot for you help Rudd

          Comment

          Working...