Home
Help
Login
Register
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search
Advanced Search
VPS forum, VPS hosting forums, VPS discussions, VPS web hosting solutions, issues, providers, virtual web hosting questions, VPS hosting
VPS General Discussions
Linux VPS servers
VPS Performance tuning and scaling
Pages: [
1
]
« previous
next »
Topic: VPS Performance tuning and scaling (Read 646 times)
0 Members and 1 Guest are viewing this topic.
VPS Performance tuning and scaling
« on: January 17, 2010, 05:38:56 AM »
Scott
Jr. Member
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
]
« previous
next »
Jump to:
Please select a destination:
-----------------------------
NEWS, Alert and Entertainment!!!
-----------------------------
=> Suggestions
-----------------------------
Virtualization technologies
-----------------------------
=> Virtuozzo & OpenVZ
=> HyperV
=> Xen Server
-----------------------------
VPS General Discussions
-----------------------------
=> Windows VPS Servers
=> Linux VPS servers
-----------------------------
VPS providers
-----------------------------
=> Review Windows VPS provider
=> Review Linux VPS provider
-----------------------------
System Administration
-----------------------------
=> Site and Server security
=> Server Administration
=> Apache
=> Microsoft IIS
-----------------------------
Web Hosting
-----------------------------
=> Windows Hosting
=> Linux Hosting
-----------------------------
Databases
-----------------------------
=> MSSQL server
=> MySQL
-----------------------------
How to's
-----------------------------
=> WHM/cPanel
=> IIS
=> Smartermail
=> Virtuozzo
=> HyperVM
=> VDSmanager