Results 1 to 14 of 14
  1. #1

    High Traffic Website Configuration Help Please!

    Hi Guys,

    Some people have complained about not being able to access my site and I believe it's probably to do with the configuration of Apache.

    Here are some details on the server:

    - Website utilizes WordPress and has various different plug-ins.

    - Daily traffic is around 12,000 uniques and 80,000 + page views with around 100-400 visitors trying to access the Website at any one time.

    - Heavy use of PHP/mySQL


    Below are my.cnf stats:

    [mysqld]
    skip-external-locking
    skip-slave-start
    skip-bdb
    skip-innodb
    skip-name-resolve

    # Global mem settings
    key_buffer = 24M

    max_connections = 200

    # Per client mem settings

    sort_buffer_size = 4M
    read_buffer_size = 4M
    binlog_cache_size = 2M

    max_allowed_packet = 12M
    thread_stack = 128K

    table_cache = 128
    thread_cache = 256
    thread_concurrency = 4

    myisam_sort_buffer_size = 1M
    tmp_table_size = 12M
    max_heap_table_size = 12M

    wait_timeout = 200
    interactive_timeout = 300
    max_connect_errors = 10000

    query_cache_type = 1
    query_cache_limit = 1M
    query_cache_size = 16M

    [mysqldump]
    quick
    quote-names
    max_allowed_packet = 16M



    Below are my http.conf stats:

    ErrorLog "logs/error_log"
    DefaultType text/plain
    KeepAlive On
    MaxKeepAliveRequests 100
    KeepAliveTimeout 2
    MinSpareServers 10
    MaxSpareServers 40
    MaxRequestsPerChild 100
    MaxClients 150
    StartServers 40




    Thanks guys, just looking for some advice as I really don't have any idea if these are optimum settings. Here are some real-time TOP statistics:

    top - 15:58:12 up 1 day, 7:04, 2 users, load average: 0.96, 0.99, 1.09
    Tasks: 179 total, 1 running, 160 sleeping, 18 stopped, 0 zombie
    Cpu(s): 18.5% us, 3.5% sy, 0.0% ni, 77.1% id, 0.9% wa, 0.0% hi, 0.0% si
    Mem: 4147160k total, 2849924k used, 1297236k free, 303488k buffers
    Swap: 2040212k total, 208k used, 2040004k free, 1811064k cached

    PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
    9338 nobody 16 0 47148 20m 12m S 19.9 0.5 0:02.98 httpd
    9375 nobody 16 0 47468 21m 12m S 16.3 0.5 0:02.23 httpd
    5771 mysql 15 0 73640 44m 2620 S 14.0 1.1 215:27.03 mysqld
    9297 nobody 15 0 47460 21m 12m S 8.6 0.5 0:03.80 httpd
    9372 nobody 17 0 47396 21m 11m S 7.6 0.5 0:00.62 httpd
    9346 nobody 16 0 47104 20m 12m S 4.7 0.5 0:03.55 httpd
    9317 nobody 15 0 47420 22m 13m S 4.0 0.6 0:02.83 httpd
    9306 nobody 16 0 47424 21m 12m S 3.0 0.5 0:04.44 httpd
    9319 nobody 16 0 47412 21m 12m S 3.0 0.5 0:04.79 httpd
    9295 nobody 16 0 47472 21m 12m S 2.3 0.5 0:03.45 httpd
    9301 nobody 15 0 47476 22m 13m S 1.0 0.6 0:05.86 httpd
    9322 nobody 15 0 47436 22m 13m S 1.0 0.6 0:04.41 httpd
    8372 root 16 0 3432 1080 772 R 0.7 0.0 0:13.71 top
    9327 nobody 15 0 47144 20m 12m S 0.7 0.5 0:02.02 httpd
    9384 nobody 15 0 45888 10m 3256 S 0.7 0.3 0:00.02 httpd
    9383 nobody 16 0 46428 18m 10m S 0.3 0.5 0:00.09 httpd

  2. #2
    Join Date
    Apr 2005
    Location
    Cochin
    Posts
    2,452
    I suggest enabling the suphp to distinctively identify who is abusing the resource and then you can take the optimization steps .

  3. #3
    How come you're assuming PHP is being abused? Also, how would I go about enabling suphp..

  4. #4
    Join Date
    Apr 2005
    Location
    Cochin
    Posts
    2,452
    Quote Originally Posted by AmishPatel View Post
    Hi Guys,

    Some people have complained about not being able to access my site[/b]
    I am "assuming" due to that statement. , but yes, it need'nt be true in your case

    To compile php with suphp follow th simple steps described in
    http://www.webhostingtalk.com/showthread.php?t=574101

  5. #5
    Quote Originally Posted by activelobby4u View Post
    I am "assuming" due to that statement. , but yes, it need'nt be true in your case

    To compile php with suphp follow th simple steps described in
    http://www.webhostingtalk.com/showthread.php?t=574101
    Ah right, I thought that may have been because of the maxclients set or something as the errors they get are about not being able to connect to the site. I will have a look at that link - thank you.

    Any suggestions on the other settings would be appreciated!

  6. #6
    Join Date
    Sep 2007
    Posts
    369

    *

    Please can you tell us?

    1. what is your current database size.
    2. How many total number tables you have?
    3. How much total RAM you have?
    4. what about your operating system ? Centos?
    Thanks,
    Noman
    noman@linuxonsupport.com
    O Canada, we stand on guard for thee

  7. #7
    Yes sure.

    1) 20MB
    2) 50 Tables
    3) Full Server Stats - Intel Dual Xeon 2.8GHz Processor, 4GB Ram, cPanel, Enterprise Linux - OS

  8. #8
    Join Date
    Sep 2007
    Posts
    369

    *

    I suggest you have to view below links.


    http://www.learn-mysql-tutorial.com/TuneMySQL.cfm
    http://2bits.com/articles/mysql-my-c...upal-site.html


    Also i suggest implement

    1. implement slow query so you can analyze more detail.
    2. Also try to implement indexing, that will give you speed up your database.
    3. block all incoming mysql request to 3306 only open for localhost.
    Thanks,
    Noman
    noman@linuxonsupport.com
    O Canada, we stand on guard for thee

  9. #9
    Join Date
    Jun 2008
    Posts
    1,471
    Are you using the WP-Supercache plugin with Wordpress? That dramatically reduces server (and MySQL) load.

    Grab a copy of Turning Primer:
    http://www.day32.com/MySQL/tuning-primer.sh
    That will give you some detailed information and recommendations on configuration values.

  10. #10
    yeh using wp-supercache//

  11. #11
    Join Date
    Apr 2003
    Posts
    454
    Is it possible that the delays are due to hard drive wait times? It might not be a bad idea to run iostat during peak usage times.

    http://linuxcommand.org/man_pages/iostat1.html

  12. #12
    Hey,

    I've run that and everything has looked ok during peak times. Based on my memory/swap, I think I had maxclients set quite low. Just been reading and changed settings to the following:


    Timeout 300
    KeepAlive On
    MaxKeepAliveRequests 2
    KeepAliveTimeout 10
    MinSpareServers 16
    MaxSpareServers 64
    StartServers 8
    MaxClients 600
    MaxRequestsPerChild 1000

    Anyone advise on this?

  13. #13
    Join Date
    Jun 2006
    Location
    NYC / Memphis, TN
    Posts
    1,454
    As mentioned above, implement suphp and that will help pinpoint the exact cause. Right now, you're going to have to dig through, tail logs, watch io/cpu... It's just easier to implement suphp and monitor usage by user.

    You could also use fcgi and easily implement user limits.
    PeakVPN.Com | Complete Privacy VPN | Cloud Hosting | Guaranteed Security | 1Gbps-10Gbps Unmetered
    PeakVPN | 31 VPN Servers | 17-Years Experience | Emergency 24/7 Support
    Visit us @ PeakVPN.Com (Coming SOON) | ASN: 3915

  14. #14
    I also have a Website It's news portal and it's have high traffic.
    My server configuration is

    WHM 11.28.87
    CENTOS 5.5 x86_64 standard
    8GB Ram.
    It's dedicated Server.

    SO what should be the good httpd/mysql configuration for it. It's only one High Traffic site.

    Thank you,
    Laxman

    Quote Originally Posted by AmishPatel View Post
    Hi Guys,

    Some people have complained about not being able to access my site and I believe it's probably to do with the configuration of Apache.

    Here are some details on the server:

    - Website utilizes WordPress and has various different plug-ins.

    - Daily traffic is around 12,000 uniques and 80,000 + page views with around 100-400 visitors trying to access the Website at any one time.

    - Heavy use of PHP/mySQL


    Below are my.cnf stats:

    [mysqld]
    skip-external-locking
    skip-slave-start
    skip-bdb
    skip-innodb
    skip-name-resolve

    # Global mem settings
    key_buffer = 24M

    max_connections = 200

    # Per client mem settings

    sort_buffer_size = 4M
    read_buffer_size = 4M
    binlog_cache_size = 2M

    max_allowed_packet = 12M
    thread_stack = 128K

    table_cache = 128
    thread_cache = 256
    thread_concurrency = 4

    myisam_sort_buffer_size = 1M
    tmp_table_size = 12M
    max_heap_table_size = 12M

    wait_timeout = 200
    interactive_timeout = 300
    max_connect_errors = 10000

    query_cache_type = 1
    query_cache_limit = 1M
    query_cache_size = 16M

    [mysqldump]
    quick
    quote-names
    max_allowed_packet = 16M



    Below are my http.conf stats:

    ErrorLog "logs/error_log"
    DefaultType text/plain
    KeepAlive On
    MaxKeepAliveRequests 100
    KeepAliveTimeout 2
    MinSpareServers 10
    MaxSpareServers 40
    MaxRequestsPerChild 100
    MaxClients 150
    StartServers 40




    Thanks guys, just looking for some advice as I really don't have any idea if these are optimum settings. Here are some real-time TOP statistics:

    top - 15:58:12 up 1 day, 7:04, 2 users, load average: 0.96, 0.99, 1.09
    Tasks: 179 total, 1 running, 160 sleeping, 18 stopped, 0 zombie
    Cpu(s): 18.5% us, 3.5% sy, 0.0% ni, 77.1% id, 0.9% wa, 0.0% hi, 0.0% si
    Mem: 4147160k total, 2849924k used, 1297236k free, 303488k buffers
    Swap: 2040212k total, 208k used, 2040004k free, 1811064k cached

    PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
    9338 nobody 16 0 47148 20m 12m S 19.9 0.5 0:02.98 httpd
    9375 nobody 16 0 47468 21m 12m S 16.3 0.5 0:02.23 httpd
    5771 mysql 15 0 73640 44m 2620 S 14.0 1.1 215:27.03 mysqld
    9297 nobody 15 0 47460 21m 12m S 8.6 0.5 0:03.80 httpd
    9372 nobody 17 0 47396 21m 11m S 7.6 0.5 0:00.62 httpd
    9346 nobody 16 0 47104 20m 12m S 4.7 0.5 0:03.55 httpd
    9317 nobody 15 0 47420 22m 13m S 4.0 0.6 0:02.83 httpd
    9306 nobody 16 0 47424 21m 12m S 3.0 0.5 0:04.44 httpd
    9319 nobody 16 0 47412 21m 12m S 3.0 0.5 0:04.79 httpd
    9295 nobody 16 0 47472 21m 12m S 2.3 0.5 0:03.45 httpd
    9301 nobody 15 0 47476 22m 13m S 1.0 0.6 0:05.86 httpd
    9322 nobody 15 0 47436 22m 13m S 1.0 0.6 0:04.41 httpd
    8372 root 16 0 3432 1080 772 R 0.7 0.0 0:13.71 top
    9327 nobody 15 0 47144 20m 12m S 0.7 0.5 0:02.02 httpd
    9384 nobody 15 0 45888 10m 3256 S 0.7 0.3 0:00.02 httpd
    9383 nobody 16 0 46428 18m 10m S 0.3 0.5 0:00.09 httpd

Similar Threads

  1. Server Configuration for High Traffic
    By dgessler in forum Dedicated Server
    Replies: 19
    Last Post: 05-11-2008, 01:45 PM
  2. Server for high traffic website
    By alexchat_gr in forum Dedicated Server
    Replies: 2
    Last Post: 12-05-2006, 04:58 PM
  3. free website hosting for high traffic website
    By rimhosting in forum Shared Hosting Offers
    Replies: 0
    Last Post: 11-12-2002, 08:46 PM
  4. High Traffic Website For Sale
    By lucasg in forum Other Offers & Requests
    Replies: 7
    Last Post: 09-06-2002, 02:18 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •