Sign in
Migration Mapping Assistant Your Saved List Partners Sell in AWS Marketplace Amazon Web Services Home Help

Speed and performance with 1000 Simultaneous connections

  • By Joe Lucas
  • on 09/20/2014

After being asked by a client running his site on the Joomla CMS to up the performance of his current set up I decided to build an AWS instance.

Debian/Ubuntu is my poison so on to the meat :)

Debian Wheezy seems solid without any foibles that I could find.

I wanted to go with an SSD based setup in order to satisfy mysql's thirst for iops and chose to also run the test vps with 16GB+ of ram.

First things first, my client wanted to go with Nginx although I am at the moment a cherokee man through and through :)

Thank you Alvaro Lopez Ortega....

If you do not mind conf files and nano like me this is less painful then you can imagine. So onward with apt-get and in goes Nginx without any drama or any issue's popping up!

I am REALLY used to putting stuff in /var/www so having to work with /usr/share/nginx/www is kind of new. Saying that you can always change the web servers global root or even on a site by site basis via their individual conf files in sites-enabled.

PHP5-fpm + APC, you would think so would you not? On this occasion though I wanted to try out Zends built in opcache which is only available from 5.5 and as such had to do a manual install from source due to wheezy not yet having it available for install with apt-get.

Ahhhhh, MariaDB....

Stuff the official mysqlDB let me give MariaDB a shot at holding Joomla's data! In it went and then out it came :(

MASSIVE cpu usage when under load out of the box and also after tuning the config it was still eating cpu cycles like no mans business! So what to do? PerconaDB to the rescue!

PerconaDB does not even break a sweat :)

A focused PerconaDB admin could probably explain in greater detail the why's and how's of Percona's V8 as opposed to MariaDB's lawnmower engine... I am not saying that MariaDB cannot perform at the same levels as PerconaDB, what I am simply stating is that PerconaDB out of the box out performs MariaDB while consuming hardly any cpu time and I found Percona's my.conf generator easy to use which probably also contributed to it's solid performance out of the starting gate.

Now that you have read all of the above I can tell you with hand on heart that 1000 simultaneous connections pulling a 4MB Joomla page where hitting a sub 2000ms response/load time which the mainstream would be more then happy with.

Fortunately or unfortunately, I do not fit into that category so how do you squeeze blood out of a stone? You configure Nginx to microcache! Suddenly what was approaching 2000ms gets smashed down to sub 200ms and I take another swig of my Caipirinha as I wipe away the beads of sweat that have just started running down my forehead. I know it is 2am but can this really be happening? how the hell is this possible?

Nginx microcaching negates the need for any performance tweaking of anything behind it....

What a performance, I decided to really push Nginx and went for a 4000 connection load test which resulted in 2000ms load times and 50% 8 core usage all the way through.

Surprisingly another benefit of Nginx's micro caching is it's very low ram usage which never really went above 1GB. So your vps/server does not run with an SSD? no problem, just load Nginx micro cache into ram and your iops will go through the bloody roof!!!

As a final note on this quick review, I would say that cpu power and available ram supersedes the requirement for solid state storage until of course HP gets their arse into gear and starts releasing their "machine".

Peace and love to all.

There are no comments to display