hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : VPS Hosting : VPS Tutorials : Quick VPS Apache and MySQL optimization guide
Reply

VPS Tutorials Tutorials related to VPS.
Forum Jump

Quick VPS Apache and MySQL optimization guide

Reply Post New Thread In VPS Tutorials Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 03-06-2007, 03:41 AM
agnivo007 agnivo007 is offline
Web Hosting Guru
 
Join Date: May 2006
Location: /home/India/Kolkata
Posts: 306

Quick VPS Apache and MySQL optimization guide


Well, most VPSs being bought are having 128 to 512 MB of dedicated memory and I've seen people complaining slow response and heavy memory usage.

To help VPS owners tune up their Apache and MySQL quickly, I've written a do-it-yourself guide and decided to share with you all.

You can read it here : Quick VPS Apache and MySQL optimization guide

If you find it useful, don't forget to give a Digg so that other people can find it easily.

Digg it HERE

If there's anything wrong with the guide or you have suggestions, feel free to reply. Mods, if anything is wrong, let me know too.


Last edited by agnivo007; 03-06-2007 at 03:44 AM.
Reply With Quote


Sponsored Links
  #2  
Old 03-06-2007, 10:15 PM
seankoons seankoons is offline
Premium Member
 
Join Date: Oct 2006
Location: New York, NY
Posts: 1,034
Well done! That is an excellent primer on getting your my.cnf and httpd.conf running at top speed with the smallest amount of resources. I'm sure it will help many users.

-Sean

Reply With Quote
  #3  
Old 04-02-2007, 04:28 PM
blazingdrag blazingdrag is offline
Newbie
 
Join Date: Jan 2007
Posts: 25
Doesnt work now

Reply With Quote
Sponsored Links
  #4  
Old 04-02-2007, 04:34 PM
That Guy That Guy is offline
Over there
 
Join Date: Oct 2004
Location: LA, CA
Posts: 1,058
Really? I can still access that website just fine.

Reply With Quote
  #5  
Old 04-02-2007, 04:38 PM
blazingdrag blazingdrag is offline
Newbie
 
Join Date: Jan 2007
Posts: 25
It wasnt working just now, now it works.

Reply With Quote
  #6  
Old 04-02-2007, 05:01 PM
layer0 layer0 is offline
Performance Specialist
 
Join Date: Dec 2004
Location: New York, NY
Posts: 10,338
One configuration does not fit all.

It's not that big of a deal if you use something like the above as a base, but you should be prepared to make changes (sometimes drastic) to fit the usage of the website(s) you host...

Reply With Quote
  #7  
Old 04-04-2007, 12:24 AM
agnivo007 agnivo007 is offline
Web Hosting Guru
 
Join Date: May 2006
Location: /home/India/Kolkata
Posts: 306
Thanks for your feedback, guys!

Yes, as suggested by layer0, I've already mentioned that fact in the concluding section of the howto.

BTW, I'm currently testing Apache 2.2, PHP 5.2.1 and MySQL 5.0.37 on the VPS.
Apache 2.2 seems to be very efficient in mem usage but a bit higher on CPU usage than 1.3.x branch.
Will publish the final outcomes soon...

Reply With Quote
  #8  
Old 04-04-2007, 09:29 PM
rdogg rdogg is offline
Web Hosting Guru
 
Join Date: Jul 2006
Posts: 266
Quote:
tmp_table_size = 16M
Nice tuto, imho 16MB for the tmp table size is kind of small, this will force the system to make more tmp disk tables, considering in vps the Disk I/O is a factor that tends to produce bottleneck , i will leave it at the default 32MB or even higher.

Quote:
table_cache = 1024
Also the table_cache to 1M ? , if you have mysql intensive sites this may be a problem , watch your table cache usage it should be something between 70% and 90% , also compare opened vs open table , if short after you restart mysql you see this value increasing you need to make table_cache bigger, i have it on 96M and i have a 384MB vps.

One last thing is that max_user_connections is not set, if you are using myisam tables, and sometimes the creation of tmp_tables takes a lot of time, then the table gets locked , the next mysql connections wait for it (the tmp table creation) to finish, so it will make 400 connections (max_connections) before it dies with the "unable to connect message" , this will force apache to handle the clients waiting for the results, more child servers will be needed, and this will make the entire server really slow :X,

Once again nice tutorial

Reply With Quote
  #9  
Old 04-08-2007, 11:10 AM
krystofo krystofo is offline
WHT Addict
 
Join Date: Jan 2004
Location: New England
Posts: 100
VPS MySQL and Apache Optimization Guide

A "must bookmark" for me. Agnivo has gone to some effort to make instructions that even a non-techy like I might follow. I do not actually "own" a VPS and--with internet equipment so various and constantly changing--would not dare to do this type of thing myself. But, certainly something to show to friends who will understand, and to discuss with my primary webhost.

Reply With Quote
  #10  
Old 04-09-2007, 06:46 AM
agnivo007 agnivo007 is offline
Web Hosting Guru
 
Join Date: May 2006
Location: /home/India/Kolkata
Posts: 306
Wow...it feels good to see some words of encouragement from krystofo...

Thanks rdogg for your feedback...I've been waiting to see some of these.

Can you please post some alternative and revised config here or post it as a comment to the original blog post?

Cheers

Reply With Quote
  #11  
Old 04-20-2007, 11:25 PM
rdogg rdogg is offline
Web Hosting Guru
 
Join Date: Jul 2006
Posts: 266
Hello agnivo i wanted to correct myself i dont have the table_cache on 96M i have it on 512 , i got confused and tought it was about MB or KB but it is about the tables to keep in cache.

I was looking at my config today and noticed this.

regards

Reply With Quote
  #12  
Old 04-20-2007, 11:40 PM
agnivo007 agnivo007 is offline
Web Hosting Guru
 
Join Date: May 2006
Location: /home/India/Kolkata
Posts: 306
OK rdogg... Do you have any good apache2.2 mysql5 config ?

As I see, apache 2.2.4 is a great piece of software and with a little tweaking, it performs even better.

Reply With Quote
  #13  
Old 04-23-2007, 02:17 PM
agnivo007 agnivo007 is offline
Web Hosting Guru
 
Join Date: May 2006
Location: /home/India/Kolkata
Posts: 306
What doesn't work ?

Reply With Quote
  #14  
Old 05-30-2007, 08:52 PM
Victoria_jambi Victoria_jambi is offline
Junior Guru Wannabe
 
Join Date: Jan 2006
Posts: 52
how can I copy files using putty to my own computer ? what would be the command for linux ?

Reply With Quote
  #15  
Old 05-31-2007, 03:05 AM
[kaze] [kaze] is offline
Newbie
 
Join Date: May 2007
Posts: 22
Victoria_jambi,

As far as copying and transferring files from your VPS to your PC, I would suggest you use an FTP client. Filezilla (which I reccomend) has a gui and ssh support built in, so you can connect the same way you do with Putty to do all your transfers to and from your VPS and PC. Much easier than transferring from command line, unless you are transferring files from one server to another.

Reply With Quote
Reply

Related posts from TheWhir.com
Title Type Date Posted
Researchers Urge System Admins to Check for New Apache Web Server Backdoor Malware Web Hosting News 2013-05-01 11:35:53
Google Launches Open Source Apache HTTP Server Module mod_pagespeed Web Hosting News 2012-10-12 12:01:56
Apache Web Server Adds Cloud Capabilities with First Major Update in 5 Years Web Hosting News 2012-02-21 16:05:02
The Apache Software Foundation Launches Hadoop v1.0 Web Hosting News 2012-01-05 18:29:16
Oracle is the Latest Vendor to Apply Patch for Apache Killer Flaw Web Hosting News 2011-09-19 14:43:58


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?