The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Optimize server load

Discussion in 'Workarounds and Optimization' started by drabeski, Jul 6, 2011.

  1. drabeski

    drabeski Registered

    Joined:
    Jun 21, 2011
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Hello

    Recently my server load has increased. It has produced many high peaks, what should I do?
    Ouvir

    /etc/my.cnf
    Code:
    [mysqld]
    interactive_timeout=300
    max_connections=500
    query_cache_limit=1M
    query_cache_size=10M
    query_cache_type=1
    table_cache=120
    thread_cache_size=4
    wait_timeout=300
    
    /usr/local/cpanel/3rdparty/mysqltuner/mysqltuner.pl
    Code:
     >>  MySQLTuner 1.1.2 - Major Hayden <major@mhtx.net>
     >>  Bug reports, feature requests, and downloads at http://mysqltuner.com/
     >>  Run with '--help' for additional options and output filtering
    
    -------- General Statistics --------------------------------------------------
    [--] Skipped version check for MySQLTuner script
    [OK] Currently running supported MySQL version 5.1.56
    [OK] Operating on 32-bit architecture with less than 2GB RAM
    
    -------- Storage Engine Statistics -------------------------------------------
    [--] Status: -Archive -BDB -Federated +InnoDB -ISAM -NDBCluster
    [--] Data in MyISAM tables: 300M (Tables: 5540)
    [--] Data in InnoDB tables: 120M (Tables: 1035)
    [--] Data in MEMORY tables: 0B (Tables: 17)
    [!!] Total fragmented tables: 1060
    
    -------- Performance Metrics -------------------------------------------------
    [--] Up for: 7m 31s (6K q [13.370 qps], 205 conn, TX: 16M, RX: 728K)
    [--] Reads / Writes: 78% / 22%
    [--] Total buffers: 44.0M global + 2.7M per thread (500 max threads)
    [OK] Maximum possible memory usage: 1.4G (67% of installed RAM)
    [OK] Slow queries: 0% (6/6K)
    [OK] Highest usage of available connections: 1% (6/500)
    [OK] Key buffer size / total MyISAM indexes: 8.0M/91.3M
    [OK] Key buffer hit rate: 98.7% (155K cached / 1K reads)
    [OK] Query cache efficiency: 68.3% (3K cached / 4K selects)
    [OK] Query cache prunes per day: 0
    [OK] Sorts requiring temporary tables: 0% (0 temp sorts / 455 sorts)
    [!!] Joins performed without indexes: 2
    [!!] Temporary tables created on disk: 38% (148 on disk / 385 total)
    [OK] Thread cache hit rate: 96% (7 created / 205 connections)
    [OK] Table cache hit rate: 44% (120 open / 269 opened)
    [OK] Open file limit used: 7% (182/2K)
    [OK] Table locks acquired immediately: 100% (2K immediate / 2K locks)
    [!!] InnoDB data size / buffer pool: 120.2M/8.0M
    
    -------- Recommendations -----------------------------------------------------
    General recommendations:
        Run OPTIMIZE TABLE to defragment tables for better performance
        MySQL started within last 24 hours - recommendations may be inaccurate
        Enable the slow query log to troubleshoot bad queries
        Adjust your join queries to always utilize indexes
        When making adjustments, make tmp_table_size/max_heap_table_size equal
        Reduce your SELECT DISTINCT queries without LIMIT clauses
    Variables to adjust:
        join_buffer_size (> 128.0K, or always use indexes with joins)
        tmp_table_size (> 16M)
        max_heap_table_size (> 16M)
        innodb_buffer_pool_size (>= 120M)
    
    top
    Code:
    top - 01:30:42 up 13 min,  1 user,  load average: 3.91, 2.69, 1.48
    Tasks:  64 total,   2 running,  61 sleeping,   0 stopped,   1 zombie
    Cpu(s):  7.1%us,  1.9%sy,  0.0%ni, 76.9%id, 14.2%wa,  0.0%hi,  0.0%si,  0.0%st
    Mem:   2097152k total,   872460k used,  1224692k free,        0k buffers
    Swap:        0k total,        0k used,        0k free,        0k cached
    
      PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
    14231 pindoba   17   0     0    0    0 Z  1.3  0.0   0:00.04 [php] <defunct>
    14233 pindoba   18   0 43608  10m 4900 D  1.0  0.5   0:00.03 /usr/bin/php /home/pindoba/public_html/home/thumbs.php
    16253 nobody    15   0 17496  11m  808 S  0.7  0.6   0:01.01 nginx: worker process
    17455 mysql     15   0  166m  58m 5252 S  0.3  2.9   0:09.26 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --log-error=/var/lib/mysql/se
    21727 nobody    15   0 21744 9144 1680 D  0.3  0.4   0:00.15 /usr/local/apache/bin/httpd -k start -DSSL
    24216 nobody    17   0 21744 9128 1756 S  0.3  0.4   0:00.07 /usr/local/apache/bin/httpd -k start -DSSL
        1 root      15   0  2156  660  572 S  0.0  0.0   0:00.26 init [3]
     1882 root      18   0 10192 2924 2352 R  0.0  0.1   0:00.06 sshd: root@pts/0
     3735 root      15   0  3832 1556 1276 S  0.0  0.1   0:00.10 -bash
     5369 nobody    18   0 21748 9100 1676 S  0.0  0.4   0:00.01 /usr/local/apache/bin/httpd -k start -DSSL
     6020 nobody    16   0 21612 8924 1600 S  0.0  0.4   0:00.02 /usr/local/apache/bin/httpd -k start -DSSL
     9385 root      17   0  5048 1516  872 S  0.0  0.1   0:00.00 crond
     9399 root      17   0  5048 1516  872 S  0.0  0.1   0:00.00 crond
     9411 dtdesign  16   0  5048 1516  872 S  0.0  0.1   0:00.00 crond
     9418 dtdesign  16   0  5044  864  216 S  0.0  0.0   0:00.00 crond
     9419 root      16   0  5048 1516  872 S  0.0  0.1   0:00.00 crond
     9425 root      16   0  5044  864  216 S  0.0  0.0   0:00.00 crond
     9430 root      17   0  5044  864  216 S  0.0  0.0   0:00.00 crond
     9959 root      17   0  5044  864  216 S  0.0  0.0   0:00.00 crond
    14006 imagens   18   0  8200 4556  668 S  0.0  0.2   0:00.00 /usr/bin/perl /usr/local/cpanel/bin/rormgr --startboot
    14010 root      19   0  1784  604  452 S  0.0  0.0   0:00.00 /usr/local/cpanel/bin/railswrap
    14086 nerdvisi  15   0 60184  39m  16m S  0.0  1.9   0:00.52 /usr/bin/php /home/nerdvisi/public_html/blogdopaulof/index.php
    14105 eski      15   0 42724  13m 8304 S  0.0  0.6   0:00.05 /usr/bin/php /home/eski/public_html/chat/server.php
    14107 root      15   0  2288 1044  816 R  0.0  0.0   0:00.00 top -c
    14146 nobody    17   0 21612 8796 1508 S  0.0  0.4   0:00.00 /usr/local/apache/bin/httpd -k start -DSSL
    16251 root      22   0 15324  10m  276 S  0.0  0.5   0:00.00 nginx: master process /usr/local/sbin/nginx -c /etc/nginx/nginx.conf
    16252 nobody    15   0 18824  13m  808 S  0.0  0.6   0:01.46 nginx: worker process
    16263 root      18   0  7200 1064  660 S  0.0  0.1   0:00.00 /usr/sbin/sshd
    16289 root      15   0  2832  836  668 S  0.0  0.0   0:00.00 xinetd -stayalive -pidfile /var/run/xinetd.pid
    16312 root      19   0  3708 1316 1132 S  0.0  0.1   0:00.00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/server.eskihost.
    18234 root      18   0  129m  94m  928 S  0.0  4.6   0:00.00 /usr/sbin/clamd
    18242 mailnull  18   0 10360 1144  652 S  0.0  0.1   0:00.00 /usr/sbin/exim -bd -q60m
    18303 root      15   0 16880  13m 1356 S  0.0  0.6   0:00.34 lfd - sleeping
    18340 root      15   0  2152  700  536 S  0.0  0.0   0:00.00 /usr/sbin/dovecot
    18367 root      15   0  8200 4512  624 S  0.0  0.2   0:00.03 /usr/bin/perl /usr/local/cpanel/bin/rormgr --startboot
    18381 root      15   0  2628 1024  832 S  0.0  0.0   0:00.00 dovecot-auth
    18429 dovecot   15   0  5188 1964 1616 S  0.0  0.1   0:00.00 pop3-login
    18430 dovecot   15   0  5308 2008 1644 S  0.0  0.1   0:00.00 pop3-login
    18431 dovecot   18   0  5312 2016 1648 S  0.0  0.1   0:00.00 imap-login
    
    PHP
    Code:
    Default PHP Version (.php files)	5
    PHP 5 Handler	suphp
    PHP 4 Handler	none
     	 
    Apache suEXEC	on
    uptime
    Code:
    01:32:01 up 14 min,  1 user,  load average: 2.98, 2.73, 1.59
    
    sar
    Code:
    Linux 2.6.18-194.26.1.el5.028stab081.1 (server.eskihost.com.br)         07/07/2011
    
    12:00:01 AM       CPU     %user     %nice   %system   %iowait    %steal     %idle
    12:10:01 AM       all     22.41      0.74      6.88      4.86      0.00     65.11
    12:20:01 AM       all     11.81      0.01      2.82     20.37      0.00     64.99
    12:30:01 AM       all      3.80      0.01      0.87     11.33      0.00     83.99
    12:40:01 AM       all      4.96      0.00      0.81      1.87      0.00     92.36
    12:50:01 AM       all      2.81      0.00      0.60      2.50      0.00     94.09
    Average:          all      9.01      0.15      2.35      8.18      0.00     80.31
    
    12:52:04 AM       LINUX RESTART
    
    01:00:01 AM       CPU     %user     %nice   %system   %iowait    %steal     %idle
    01:10:01 AM       all      6.36      0.06      0.93     10.11      0.00     82.53
    Average:          all      6.36      0.06      0.93     10.11      0.00     82.53
    
    01:17:37 AM       LINUX RESTART
    
    Server Information
    Code:
    Total processors: 4
    Processor #1
    Vendor
    GenuineIntel
    Name
    Intel(R) Xeon(R) CPU E5520 @ 2.27GHz
    Speed
    1700.107 MHz
    Cache
    8192 KB
    Processor #2
    Vendor
    GenuineIntel
    Name
    Intel(R) Xeon(R) CPU E5520 @ 2.27GHz
    Speed
    1700.107 MHz
    Cache
    8192 KB
    Processor #3
    Vendor
    GenuineIntel
    Name
    Intel(R) Xeon(R) CPU E5520 @ 2.27GHz
    Speed
    1700.107 MHz
    Cache
    8192 KB
    Processor #4
    Vendor
    GenuineIntel
    Name
    Intel(R) Xeon(R) CPU E5520 @ 2.27GHz
    Speed
    1700.107 MHz
    Cache
    8192 KB

    What do I do?

    It started today, not long ago.

    thanks
     
  2. m3Rlin

    m3Rlin Member

    Joined:
    Mar 1, 2007
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Bartlett, IL, US
    What do you mean by high peaks? How often do they occur? Are they occurring at the same time each day? Have you added any new domains / scripts?
     
Loading...

Share This Page