Ad Widget

Collapse

Tuning Zabbix and PostgreSQL

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Colttt
    Senior Member
    Zabbix Certified Specialist
    • Mar 2009
    • 878

    #1

    Tuning Zabbix and PostgreSQL

    Hello,

    here some facts:
    CPU: Intel Xeon 3,4GHz with HyperThreading
    RAM: 2GB
    OS: Debian Squeeze
    DB: PostgreSQL 8.4.7 Size: 12,80GB
    Zabbix 1.8.2
    Filesystem: ext4
    and i think i´ve a high CPU load (look at the picture) but i´ve only 50VPS..
    but i dont know why.. i think i have enough power..

    here some config files:
    zabbix-server.conf:
    Code:
    StartPollers=6
    StartIPMIPollers=15
    StartPollersUnreachable=5
    StartTrappers=10
    StartPingers=10
    StartDiscoverers=5
    StartHTTPPollers=5
    SenderFrequency=30
    DebugLevel=2
    Timeout=30
    PidFile=/var/run/zabbix-server/zabbix_server.pid
    LogFile=/var/log/zabbix-server/zabbix_server.log
    AlertScriptsPath=/etc/zabbix/alert.d/
    ExternalScripts=/etc/zabbix/externalscripts
    FpingLocation=/usr/sbin/fping
    Fping6Location=/usr/sbin/fping6
    DBHost=localhost
    DBName=zabbix
    DBUser=zabbix
    DBPassword=zabbix
    zabbix-agent.conf
    Code:
    Server=192.168.200.25
    Hostname=csfzabbix
    StartAgents=6
    DebugLevel=2
    PidFile=/var/run/zabbix-agent/zabbix_agentd.pid
    LogFile=/var/log/zabbix-agent/zabbix_agentd.log
    Timeout=30
    UserParameter=raid.status,cciss_vol_status -p  /dev/cciss/c0d* |grep OK |wc -l
    UserParameter=db.size,psql -t -c "select pg_database_size('zabbix')"
    UserParameter=API[*],/etc/zabbix/externalscripts/zabbix_perl_api_vmware.pl $1 $2 $3
    UserParameter=Volume.Capacity[*],egrep -i "Volume.Capacity_$2:" /tmp/vmware_api_$1.txt|sed 's/.*\t//'
    UserParameter=Volume.Free[*],egrep -i "Volume.Free_$2:" /tmp/vmware_api_$1.txt|sed 's/.*\t//'
    UserParameter=CpuTotal[*],egrep -i "CpuTotal:" /tmp/vmware_api_$1.txt|sed 's/.*\t//'
    UserParameter=CpuUsed[*],egrep -i "CpuUsed:" /tmp/vmware_api_$1.txt|sed 's/.*\t//'
    UserParameter=MemSize[*],egrep -i "MemSize:" /tmp/vmware_api_$1.txt|sed 's/.*\t//'
    UserParameter=MemUsage[*],egrep -i "MemUsage:" /tmp/vmware_api_$1.txt|sed 's/.*\t//'
    UserParameter=MaintenanceMode[*],egrep -i "MaintenanceMode:" /tmp/vmware_api_$1.txt|sed 's/.*\t//'
    UserParameter=MEM[*],egrep -i "MEM_$2:" /tmp/vmware_api_$1.txt|sed 's/.*\t//'
    UserParameter=Array_stat[*],egrep -i "Array_$2.$3:" /tmp/vmware_api_$1.txt|sed 's/.*\t//'
    UserParameter=NET[*],egrep -i "vmnic$2.$3:" /tmp/vmware_api_$1.txt|sed 's/.*\t//'
    UserParameter=Uptime[*],egrep -i "Uptime:" /tmp/vmware_api_$1.txt|sed 's/.*\t//'
    psql.conf
    Code:
    data_directory = '/var/lib/postgresql/8.4/main' 
    hba_file = '/etc/postgresql/8.4/main/pg_hba.conf'   
    ident_file = '/etc/postgresql/8.4/main/pg_ident.conf'  
    external_pid_file = '/var/run/postgresql/8.4-main.pid'   
    port = 5432                            
    max_connections = 100                  
    unix_socket_directory = '/var/run/postgresql'   
    ssl = true                             
    shared_buffers = 16MB                  
    log_line_prefix = '%t '                
    datestyle = 'iso, dmy'
    lc_messages = 'de_DE.UTF-8' 
    lc_monetary = 'de_DE.UTF-8'                    
    lc_numeric = 'de_DE.UTF-8'                     
    lc_time = 'de_DE.UTF-8'                        
    default_text_search_config = 'pg_catalog.german'
    has anybody performance-tunings-tips for me? thanks!


    Debian-User

    Sorry for my bad english
  • Bennie
    Member
    Zabbix Certified Specialist
    • Feb 2010
    • 73

    #2
    Could you also add your disk system information please (your raid setup, quantity of disks and type (rpm and connection)) so others can get a better impression.

    Disk system is important when working with databases and could already be a problem.

    Comment

    • Colttt
      Senior Member
      Zabbix Certified Specialist
      • Mar 2009
      • 878

      #3
      its an "old" HP G4 DL380
      RAID5
      10.000rpm
      146,8GB
      on ULTRA320 SCSI

      and i save data 180days

      i hope it helps
      Last edited by Colttt; 20-05-2011, 10:48.
      Debian-User

      Sorry for my bad english

      Comment

      • Colttt
        Senior Member
        Zabbix Certified Specialist
        • Mar 2009
        • 878

        #4
        has nobody an idea??
        Debian-User

        Sorry for my bad english

        Comment

        • sersad
          Senior Member
          • May 2009
          • 518

          #5
          shared_buffers = 16MB is small
          need 1/4 memory
          Smoke it http://wiki.postgresql.org/wiki/Tuni...tgreSQL_Server $)

          Comment

          • Colttt
            Senior Member
            Zabbix Certified Specialist
            • Mar 2009
            • 878

            #6
            ok thanks.. now i used 128MB and i hope it will be better
            Debian-User

            Sorry for my bad english

            Comment

            • untergeek
              Senior Member
              Zabbix Certified Specialist
              • Jun 2009
              • 512

              #7
              You should also upgrade to 1.8.5. There were some performance issues with databases which were improved in 1.8.3 (which you should also see in 1.8.5).

              Comment

              • Colttt
                Senior Member
                Zabbix Certified Specialist
                • Mar 2009
                • 878

                #8
                at the moment its solved.. look at here: http://www.zabbix.com/forum/showthre...5113#post85113
                Debian-User

                Sorry for my bad english

                Comment

                Working...