Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Member BeNE.WS's Avatar
    Join Date
    May 2003
    Location
    Belgium
    Posts
    49

    Question High Load due to MySQl/PHP site - Expert needed !

    Hi,

    I have a PIV, 2.4Ghz server with 1Gb of RAM.

    On this server are a couple of sites PHP/MySQL with a lot of visitors.

    What can I do to optimize my server because from time to time I got high loads when there are a lot of visitors?
    MySQl: my.cnf
    PHP: php.ini
    httpd.conf
    ......


    Is there an expert who can advise me whitch config files I have to change into what.
    Can you give me an example ?

    I have apache 1.3.33, php 4.3.9, whm 9.9.7, cpanel 9.9.8 s6, mysql 4.0.22, ...

    The server is used for hosting.

    Thanks for your advice.

    Steven
    Regards,


    Steven Depuydt
    www.BeNe.WS

  2. #2
    Member
    Join Date
    Sep 2004
    Location
    Cleveland, Ohio
    Posts
    378

    Default

    Here is my my.cnf:

    Code:
    [mysqld]
    datadir=/var/lib/mysql
    skip-locking
    skip-innodb
    query_cache_limit=1M
    query_cache_size=32M
    query_cache_type=1
    max_connections=500
    interactive_timeout=100
    wait_timeout=100
    connect_timeout=10
    thread_cache_size=128
    key_buffer=16M
    join_buffer=1M
    max_allowed_packet=16M
    table_cache=1024
    record_buffer=1M
    sort_buffer_size=2M
    read_buffer_size=2M
    max_connect_errors=10
    # Try number of CPU's*2 for thread_concurrency
    thread_concurrency=2
    myisam_sort_buffer_size=64M
    #log-bin
    server-id=1
    
    [mysql.server]
    user=mysql
    basedir=/var/lib
    
    [safe_mysqld]
    err-log=/var/log/mysqld.log
    pid-file=/var/lib/mysql/mysql.pid
    open_files_limit=8192
    [mysqldump]
    quick
    max_allowed_packet=16M
    
    [mysql]
    no-auto-rehash
    #safe-updates
    
    [isamchk]
    key_buffer=64M
    sort_buffer=64M
    read_buffer=16M
    write_buffer=16M
    
    [myisamchk]
    key_buffer=64M
    sort_buffer=64M
    read_buffer=16M
    write_buffer=16M
    
    [mysqlhotcopy]
    interactive-timeout
    I also installed Zend Optimizer 2.5.5 www.zend.com

  3. #3
    Member
    Join Date
    Nov 2001
    Posts
    95

    Default

    You can always give Turck MMCache a try.

    Pete

  4. #4
    Member
    Join Date
    Aug 2004
    Posts
    200

    Default

    What can I do to optimize my server because from time to time I got high loads when there are a lot of visitors?
    I'm curious, how many is a lot of visitors? That might help determine exactly what to try first.

    I think if a lot of visitors is over 2000 concurrent connections, then a hardware upgrade is in order... Like a dual proc. would be a good start, then a ram upgrade. It also depends on what those visitors are doing though...just opening a 20k html or streaming a 6MB mp3...

  5. #5
    Member
    Join Date
    Jun 2003
    Posts
    18

    Default

    Quote Originally Posted by Blue|Fusion
    Here is my my.cnf:

    Code:
    [mysqld]
    datadir=/var/lib/mysql
    skip-locking
    skip-innodb
    query_cache_limit=1M
    query_cache_size=32M
    query_cache_type=1
    max_connections=500
    interactive_timeout=100
    wait_timeout=100
    connect_timeout=10
    thread_cache_size=128
    key_buffer=16M
    join_buffer=1M
    max_allowed_packet=16M
    table_cache=1024
    record_buffer=1M
    sort_buffer_size=2M
    read_buffer_size=2M
    max_connect_errors=10
    # Try number of CPU's*2 for thread_concurrency
    thread_concurrency=2
    myisam_sort_buffer_size=64M
    #log-bin
    server-id=1
    
    [mysql.server]
    user=mysql
    basedir=/var/lib
    
    [safe_mysqld]
    err-log=/var/log/mysqld.log
    pid-file=/var/lib/mysql/mysql.pid
    open_files_limit=8192
    [mysqldump]
    quick
    max_allowed_packet=16M
    
    [mysql]
    no-auto-rehash
    #safe-updates
    
    [isamchk]
    key_buffer=64M
    sort_buffer=64M
    read_buffer=16M
    write_buffer=16M
    
    [myisamchk]
    key_buffer=64M
    sort_buffer=64M
    read_buffer=16M
    write_buffer=16M
    
    [mysqlhotcopy]
    interactive-timeout
    I also installed Zend Optimizer 2.5.5 www.zend.com

    GREAT config - along with mmcache it solved my issues

Similar Threads & Tags
Similar threads

  1. Replies: 3
    Last Post: 03-21-2010, 09:24 AM
  2. high load due to a constant grep command
    By Ley in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 08-02-2006, 04:13 PM
  3. /scripts/cpbackup not running due to high cpu load..
    By StealthDesign in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 07-05-2005, 03:54 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube