Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: LAMP Memory Usage
PostPosted: Mon Jul 19, 2010 8:25 pm 
Offline
Senior Newbie
User avatar

Joined: Mon Jun 28, 2010 11:04 pm
Posts: 14
Website: http://johnlevandowski.com/
Location: Salt Lake City, UT
I have been working on tuning my Linode for use as a LAMP server. As part of this process I created a small spreadsheet to help. I thought I would share this with the community in hopes it may help others and also to get feedback on where my assumptions may be wrong.

The spreadsheet is at http://dl.dropbox.com/u/4986351/LAMP.ods and in the spirit of open-source it is in ODF Spreadsheet format.

Here is a how-to guide for this spreadsheet:

The yellow boxes are values you need to enter. Next to each of these is a Linux command you can use to get the appropriate value. I am using PHP APC for opcode caching so that all PHP code is cached all the time, thus lowering the apache2 per process RAM.

After entering the values for the 1st 21 rows, you should enter your guess for apache2 max clients and then look in row 34 for the min free RAM to make sure it is not negative.


Top
   
 Post subject:
PostPosted: Tue Jul 20, 2010 10:50 am 
Offline
Senior Member
User avatar

Joined: Tue May 26, 2009 3:29 pm
Posts: 1691
Location: Montreal, QC
Well, I can't view your spreadsheet (Excel 2007 doesn't read ODS, Google Documents spits out server errors, ironically ODS has very little support while Excel documents are widely supported), but... 21 rows to figure out memory usage? Yikes!

If it's so complicated, I should suggest considering dropping Apache for something like nginx/lighttpd/litespeed/cherokee/etc that takes mots of the effort out of this...

Determining memory usage for lighttpd, for example, involves basically using the stock lighttpd config, deciding how many fcgi PHP processes you want (8 can probably handle anything most sites throw at it, at an estimated RAM usage of ~150MB), and then grab the MySQL sample config appropriate for your machine (probably my-medium.cnf?) and you're good to go.


Top
   
 Post subject:
PostPosted: Tue Jul 20, 2010 10:57 am 
Offline
Senior Member

Joined: Sat Mar 28, 2009 4:23 pm
Posts: 415
Website: http://jedsmith.org/
Location: Out of his depth and job-hopping without a clue about network security fundamentals
Looks pretty useful for a beginner - it looks at more than just Apache (looks like what, four numbers from Apache?).

Image

_________________
Disclaimer: I am no longer employed by Linode; opinions are my own alone.


Top
   
 Post subject:
PostPosted: Tue Jul 20, 2010 11:14 am 
Offline
Senior Newbie
User avatar

Joined: Mon Jun 28, 2010 11:04 pm
Posts: 14
Website: http://johnlevandowski.com/
Location: Salt Lake City, UT
Guspaz wrote:
Well, I can't view your spreadsheet (Excel 2007 doesn't read ODS, Google Documents spits out server errors, ironically ODS has very little support while Excel documents are widely supported)


Ok, I added an excel version.

http://dl.dropbox.com/u/4986351/LAMP.xls


Top
   
 Post subject:
PostPosted: Wed Jul 21, 2010 10:10 am 
Offline
Senior Member
User avatar

Joined: Tue May 26, 2009 3:29 pm
Posts: 1691
Location: Montreal, QC
Well, that does look like it could be useful, but I think it might confuse somebody figuring this stuff out for the first time. For them, it's probably easier (as I said earlier), for MySQL at least, to grab one of the pre-made config files (lest they disable something like query caching or starving MySQL some other way) and then concentrate on configuring Apache without worrying about tweaking MySQL.


Top
   
 Post subject: Nginx
PostPosted: Fri Jul 23, 2010 12:08 pm 
Offline
Senior Newbie

Joined: Thu Mar 11, 2010 10:42 am
Posts: 15
ICQ: 33922655
Location: Ireland
Do you have an option to use nginx or some other lighter alternative to apache? If you are going to have to worry about 40 connections you should have significantly less memory consumption worries.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group