Textpattern Forum

You are not logged in. Register | Login | Help

#1 2012-08-17 13:49:26

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 4,972
Website

how much RAM does an average txp site need?

I’m looking at alternative host plans since Joyent’s announcement. I currently manage 4 txp sites and a couple of sub-domains one of which runs a currently fairly inactive punBB and we are on the process of developing a 5th txp one, all with slimstat2 databases.

I’m looking at Dreamhost’s VPS plans, their basic offer is for 300Mbs RAM @ $15/month. It is affordable to us but will it be enough RAM?

How can I check how much RAM we are currently using?


Yiannis
——————————
neme.org | neme-imca.org | hblack.net | LABS

Online

#2 2012-08-17 14:21:03

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 493
Website

Re: how much RAM does an average txp site need?

Good question

I have 30 sites. Txp and EE powered


…. texted postive

Offline

#3 2012-08-17 16:16:39

zero
Member
From: Lancashire
Registered: 2004-04-19
Posts: 1,035
Website

Re: how much RAM does an average txp site need?

Check out Webfaction too. The notes on that page say “This is the actual memory available to your long-running processes (for instance, your Rails or Django processes). Unlike on a VPS, the memory used by the operating system, the main web server and the database servers doesn’t count towards your memory usage”. I don’t know the answer to your question, Yiannis, but I know that I have 5 sites on webfaction, and it is very fast and I never had a problem or downtime yet. joebaich was first to mention them on this forum I think and may know better.


TXPQ Examples and discussion of Textpattern CMS quality.

Offline

#4 2012-08-17 17:05:19

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 493
Website

Re: how much RAM does an average txp site need?

zero wrote:

Check out Webfaction too. The notes on that page say “This is the actual memory available to your long-running processes (for instance, your Rails or Django processes). Unlike on a VPS, the memory used by the operating system, the main web server and the database servers doesn’t count towards your memory usage”. I don’t know the answer to your question, Yiannis, but I know that I have 5 sites on webfaction, and it is very fast and I never had a problem or downtime yet. joebaich was first to mention them on this forum I think and may know better.

Yep .. .seems that webfaction.com is getting a lot of positive mention.


…. texted postive

Offline

#5 2012-08-17 17:46:20

springworks
Member
Registered: 2005-01-06
Posts: 161
Website

Re: how much RAM does an average txp site need?

I’m looking that way too.

Webfaction certainly seems to offer a lot of flexibility of a VPS without the headache of having to manage it yourself.

Offline

#6 2012-08-18 17:13:12

ruud
Developer emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 4,513
Website

Re: how much RAM does an average txp site need?

The amount of RAM you need varies with the complexity of your website (number of separate files loaded on each page visit, the size of your tag structure in pages/forms, amount of plugins installed), the amount of visitors/traffic you receive and they way you’ve set up your server. My home server has 128MB RAM and runs TXP just fine, but I’m the only one that visits the website (it could handle more).

Offline

#7 2012-08-19 07:38:09

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 4,972
Website

Re: how much RAM does an average txp site need?

Hi ruud, thanks for he reply. Is there a way for us to tell how much ram we are currently using?

> Edited to add: when I have the site in debug mode i see

<!-- Runtime:    0.1052 -->
<!-- Query time: 0.011646 -->
<!-- Queries: 30 -->
<!-- Memory: 4349Kb, <txp:if_section name="related-links"> -->
<!-- txp tag trace: 
...

would the RAM used be the 4349Kb?

Last edited by colak (2012-08-19 07:52:32)


Yiannis
——————————
neme.org | neme-imca.org | hblack.net | LABS

Online

#8 2012-08-19 10:01:44

ruud
Developer emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 4,513
Website

Re: how much RAM does an average txp site need?

^^ that’s probably just the RAM usage for the PHP process that serves that single request. Now consider multiple requests being served at the same time and the memory consumed by the webserver software itself, MySQL and all other software that typically runs on a server and you’ll get a higher number.

Total resident memory size of all running processes (Linux):

ps ax -o rss|perl -ne'$c+=$_;print $c."\n";'|tail -1

Or on a Joyent SmartMachine running Solaris:

ps -eo rss|perl -ne'$c+=$_;print $c."\n";'|tail -1

I’m getting 88812 (88MB) on my home server (128MB); 763MB on my desktop (4GB); 614MB for the TXP.com et al (2GB), almost half of which is taken up by MySQL; 319MB on a server (1GB) that hosts around 25 websites and generates around 50GB of traffic with mostly static webpages, but also a few TXP based sites, one of which gets around 200k page views per month… if I do a test with 100 requests (concurrency 5), that increases to 370MB.

If you want to do a similar test, execute the following line (assuming you have the Apache Bench (ab) program installed) and while it’s running, also issue the ‘ps’ command show above:

ab -n 100 -c 5 http://yourwebsite/page.php

Another thing that’s useful, try the command ‘free’ (Linux, not Solaris):

             total       used       free     shared    buffers     cached
Mem:       1024092     977504      46588          0      82564     570688
-/+ buffers/cache:     324252     699840
Swap:       262140      55512     206628

Here you see 324252 (324MB) the actual amount of RAM used by running processes, but since there’s 1GB of RAM available, 82MB is used for buffers and 570MB used for cache and that reduces the amount of reads/writes to the hard disk, which in turn increases performance, because you don’t want to be so tight on RAM that nothing gets cached resulting into non-stop read/write access to your hard disk. So, even though this server could run on 512MB RAM, the additional RAM (1GB total) makes it run smoother and gives it some head room if there’s a traffic peak.

Offline

#9 2012-08-19 10:56:25

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 4,972
Website

Re: how much RAM does an average txp site need?

Wow! Thanks ruud, this definitely puts things in perspective. I’m still not sure how I can use the commands but one of our sites does get about 20k page views/month, a fraction to your 200k so I guess that 300-500Mbs RAM should be just fine for a VPS… I’m still researching…


Yiannis
——————————
neme.org | neme-imca.org | hblack.net | LABS

Online

#10 2012-08-19 22:17:01

genjokoan
New Member
From: Suburban Atlanta
Registered: 2010-10-18
Posts: 5
Website

Re: how much RAM does an average txp site need?

Ruud posted some good information. I think it is fair to say that the resource killer is usually going to be MySQL. For instance, badly programmed Wordpress plugins may have brought down more shared servers than there are stars in the night sky. A little bad MySQL can ruin your days. Probably the best cure for that is to buy a couple of good books and run your code at home with lots of debugging so you can do proper forensics.


Some days even my lucky rocket ship underpants don’t help … Calvin

Offline

Board footer

Powered by FluxBB