Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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

Discussion in 'General Discussion' started by BeNE.WS, Nov 25, 2004.

  1. BeNE.WS

    BeNE.WS Well-Known Member

    Joined:
    May 14, 2003
    Messages:
    49
    Likes Received:
    0
    Trophy Points:
    156
    Location:
    Belgium
    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
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. Blue|Fusion

    Blue|Fusion Well-Known Member

    Joined:
    Sep 12, 2004
    Messages:
    378
    Likes Received:
    0
    Trophy Points:
    166
    Location:
    Cleveland, Ohio
    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. patchwork

    patchwork Well-Known Member

    Joined:
    Nov 2, 2001
    Messages:
    93
    Likes Received:
    0
    Trophy Points:
    316
  4. djmerlyn

    djmerlyn Well-Known Member

    Joined:
    Aug 31, 2004
    Messages:
    201
    Likes Received:
    1
    Trophy Points:
    168
    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. 3amp

    3amp Member

    Joined:
    Jun 9, 2003
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    151

    GREAT config - along with mmcache it solved my issues :)
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice