1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

apache2 optimization help

Discussion in 'Apache' started by stdio, Jun 11, 2006.

  1. #1
    Hello.

    I run 2 file hosting services and 1 image hosting service on my server. Unfortunately this server is a plesk server (wasn't my choice - I don't like plesk). As you know plesk comes with Apache2. Can anyone help me optimize httpd.conf so my server can handle all this (high) traffic?

    This server:

    P4 3.2 Ghz
    1 GB RAM
    160 GB SATA hdd

    How do I know I get a lot of traffic? Well, for a few days now my sites have started to load very slowly. Plus, here is the output of "netstat -nat |grep :80 |wc -l":

    [root@monster ~]# netstat -nat |grep :80 |wc -l
    2471
    Code (markup):
    I've talked with my host and no, i am not being DoS'ed.

    Here are my current httpd.conf settings:

    Timeout 15
    KeepAlive Off
    MaxKeepAliveRequests 200
    KeepAliveTimeout 8
    <IfModule prefork.c>
    StartServers 8
    MinSpareServers 32
    MaxSpareServers 64
    ServerLimit 400
    MaxClients 400
    ListenBacklog 2000
    MaxRequestsPerChild 300
    </IfModule>

    Can I adjust anything here to make sites load faster? Please advise.

    Thanks!
     
    stdio, Jun 11, 2006 IP
  2. wheel

    wheel Peon

    Messages:
    477
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    0
    #2
    My suggestion is that apache isn't the place to start. Out of the box apache tends to be able to handle huge traffic without flinching.

    Instead, your problem is most likely going to be an application running on the server - and without knowing anything about it it's likely to be either mysql, or an application that is being a mysql resource hog.

    If you can bring up a command prompt, enter the command 'top'. That will show you how much of your cpu and ram is being used - and more importantly which processes are hogging resources. (you'll likely find that even if you've got a ton of apache threads open that they're not using much in the way of resources).

    Busy forums and applications that make a lot of mysql calls tend to be the most common cause of server bloat - not apache.
     
    wheel, Jun 11, 2006 IP