Jump to content

how to calculate server size?


bernhard
 Share

Recommended Posts

hi guys,

i'm working on a project where the goal is to have 1.7 million page impressions per month. that would be

57.000 PI per day

11.333 PI per hour (calculating with 5 hours per day)

189 PI per minute

3 PI per second

of course it will heavily depend on the websites setup. i'm planning to use procache and try to optimize everything as good as possible. i would like to get a rough idea of what i would need on server side. is this possible?

any server experts here?

thank you in advance :)

Link to comment
Share on other sites

It is certainly possible, I don't think it would be that big a deal. Note though that your usage would not be linear, would probably be something like a Gaussian curve so better measure peaks that way, and compound with days of the week. Storage is cheap so that's clearly not an issue, places like Digital Ocean provide you with good performance and you can upgrade/downgrade easily.

I would start with a prototype of the site, and test using Apache JMeter, top and whatnot. Launch an instance, install your prototype and start stress tests watching if your site is more CPU, storage or memory bound, then adjust accordingly by tweaking your server and application settings, and throwing more hardware if need be.

I am not an expert on infrastcture, but if I need it it's how I typically go at it. Hope it helps.

  • Like 2
Link to comment
Share on other sites

  • 3 weeks later...

I'm no expert, but adding to Pierre-Luc suggestions, I would do this (considering a budget as low as US$30/month):

  1. A Digital Ocean 2GB RAM VPS for the the PW installation (with a 2 or 4GB swap file);
  2. A 1GB VPS for the mysql db
  3. Procache to create static version of the website
  4. Nginx or other instead of Apache, for a small ram footprint
  5. Free plan on Cloudflare to have a CDN for static assets
  6. blitz.io to load tests (easier to use than jmeter IMHO)

You can always increase the VPS's specs easily on DO, but you will need to shutdown them before that, so it's better to do it before production.

  • Like 2
Link to comment
Share on other sites

hi sergio, seems you read the blog ;)

thank you for your suggestions. had a look at blitz.io - looks nice but 30$/month is quite expensive. maybe i'll try the free plan when my site is online. thank you :)

Link to comment
Share on other sites

hi sergio, seems you read the blog ;)

What blog? Ryan's? 

Blitz.io free plan is good enough for your scenario of testing 3 page impressions per second. You can try loader.io free plan as well. :)

  • Like 1
Link to comment
Share on other sites

  • 8 months later...

ok. got some news on this - i did some very basic tests :)

the tests were performed on my live server, so there are 2 things to mention:

1) if you test your server you may check back if your provider does allow that

2) i had some normal traffic an my vps, so that may has influenced the tests, but it is accurate enough for my purpose

 

test setup:

jmeter

VPS with 2GB ram and shared cpu

website: very basic website, actually just html with not much php/mysql requests

period: 60 seconds

regarding to my first post i was interested in the performance @ 200 page impressions per minute.

results:

200 users, cache OFF

post-2137-0-11304300-1459333070_thumb.pn

200 users, template cache ON

post-2137-0-86146300-1459333068_thumb.pn

### ProCache ON ###

200 users

post-2137-0-22125100-1459333068_thumb.pn

2000 users

post-2137-0-46500800-1459333067_thumb.pn

5000 users

post-2137-0-64654900-1459333066_thumb.pn

0% error rate in all tests

trying 10.000 users i got some problems (100% cpu load on my local machine, no response from jmeter...)

don't know why there is almost no difference between template cache ON/OFF but no time for further investigation on this for the time. i guess it is because it is defacto only a basic html page with no PW fields. as i should have almost only cached requests on my site there should be really no problems as long as i do not get much more than 2000 requests per minute and that is more than 10 times as much as i need :)

  • Like 2
Link to comment
Share on other sites

Template Cache does only improve performance considerably for template calculations with are resource intensive in themselves. Most templates in processwire aren't that and the bulk time needed is rather the php/processwire bootstrap time. 

  • Like 2
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...