Home   Help Login Register  
Welcome, Guest. Please login or register.

Login with username, password and session length

Search
Pages: [1]
Print
Topic: VPS Performance tuning and scaling  (Read 646 times)
0 Members and 1 Guest are viewing this topic.
« on: January 17, 2010, 05:38:56 AM »
Scott
Jr. Member

View Profile Email
**
Posts: 51



Below are few tips and tricks for you to help keep your VPS ticking over.

Adjusting the number of web based clients your VPS can handle from 1 second to the other.

   1. First you should backup the file with the following command

          cp /etc/httpd/conf.d/swtune.conf /etc/httpd/conf.d/swtune.backup.`date  +%F-%H-%M`

   2. The following command opens swtune.conf

          vi /etc/httpd/conf.d/swtune.conf (this command requires that you have some knowledge of using vi, the command nano may be easier to use)

      you should see the following section marked "prefork MPM".

Note: The file on a Debian VPS is located at /etc/apache2/apache2.conf

   3. Edit the section that reads:

          <IfModule prefork.c>
          StartServers       2
          MinSpareServers    1
          MaxSpareServers    5
          MaxClients         10
          MaxRequestsPerChild  1000
          </IfModule>

      to something more like this (changes marked in bold):
          * For VPS Stater:

            <IfModule prefork.c>
            StartServers       1
            MinSpareServers    1
            MaxSpareServers    3
            MaxClients         50
            MaxRequestsPerChild  1000
            </IfModule>

    4. Save this file by first hitting the Esc key and then typing :wq [hit enter]

    5. Restart apache

     /etc/init.d/httpd restart [hit enter]

The timeout settings in Apache can sometimes cause problems and keep your visitors waiting for content.

   1. First you should backup the file with the following command

          cp /etc/httpd/conf.d/swtune.conf /etc/httpd/conf.d/swtune.backup.`date  +%F-%H-%M` [hit enter]

   2. The following command opens swtune.conf

          vi /etc/httpd/conf.d/swtune.conf [hit enter] [this command requires that you have some knowledge of using vi, the command nano may be easier to use)

   3. Use the following keystrokes to find "Timeout"

      /Timeout [hit enter]

   4. Edit the section that reads:

    Timeout 120
       
    to a more reasonable value like the following (changes marked in bold):

    Timeout 20   

   5. Save this file

   6. Restart Apache to apply the changes:

    /etc/init.d/httpd restart [hit enter]

A note from the author:

To find out if the MaxClients setting is causing you grief, it's easiest to login to your VPS and run:

    grep -i maxclient /var/log/httpd/error_log

This command should give you some details if this setting has been reached.
Logged
Pages: [1]
Print
Jump to:  

� 2006 VPS forum, VPS hosting forums, VPS discussions, VPS web hosting solutions, issues, providers, virtual web hosting questions, VPS hosting
Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC | Forum style designed by PixelSlot
| Sitemap - XML Sitemap