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.

[ask]Apache and mySQL tweak tunning

Discussion in 'Workarounds and Optimization' started by nixell, Jan 8, 2010.

  1. nixell

    nixell Active Member

    Joined:
    Sep 24, 2007
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    1
    Hello,

    Anyone have suggestion how best apache and mysql tweak for shared hosting provide

    thank you
     
  2. serversignature

    serversignature Well-Known Member

    Joined:
    Nov 26, 2007
    Messages:
    107
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Bangalore
    For Apache : Using KeepAlive can increase speed for both you and the client.
    I think it's best to have KeepAlive on, and KeepAliveTimeout very low (like 1-2 seconds).

    If you serve 100% static files with Apache, each httpd process will use around 2-3 megs of RAM. If you serve 99% static files & 1% dynamic files with Apache, each httpd process will use from 3-20 megs of RAM

    For mysql see how it is performing: mytop - display MySQL server performance info like `top'

    The latest version of mytop is available from mytop - a top clone for MySQL.

    Thanks,
    Kiran
     
  3. nixell

    nixell Active Member

    Joined:
    Sep 24, 2007
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    1
    i using this for mysql

    Code:
    [mysqld]
    skip-bdb
    
    max_connections = 100
    key_buffer = 16M
    myisam_sort_buffer_size = 32M
    join_buffer_size = 1M
    read_buffer_size = 1M
    sort_buffer_size = 2M
    table_cache = 1024
    thread_cache_size = 286
    interactive_timeout = 10
    wait_timeout = 10
    connect_timeout = 10
    max_allowed_packet = 1M
    max_connect_errors = 10
    query_cache_limit = 1M
    query_cache_size = 10M
    query_cache_type = 1
    tmp_table_size = 16M
    
    [mysqld_safe]
    open_files_limit = 8192
    
    [mysqldump]
    quick
    max_allowed_packet = 16M
    
    [myisamchk]
    key_buffer = 32M
    sort_buffer = 32M
    read_buffer = 16M
    write_buffer = 16M
    
    [mysqlhotcopy]
    interactive-timeout
    
    
    and this for apache

    Code:
    KeepAlive On
    MaxKeepAliveRequests 100
    KeepAliveTimeout 1
    MinSpareServers 5
    MaxSpareServers 10
    StartServers 15
    MaxClients 250
    MaxRequestsPerChild 1000
    HostnameLookups Off
    
    that tweak is correct??
     
  4. webcave

    webcave Member

    Joined:
    Jun 17, 2009
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    I tried those and they seem to work great :) thanks!
     
  5. zitro

    zitro Registered

    Joined:
    Jan 13, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    how?

    hi there, i a newbie just wanted to ask how can i add this tweak, (what specific file will i open to do this) thanks in advance. :D
     
Loading...

Share This Page