WordPress on Amazon EC2 – Part 10 – Benchmarks
Yesterday we tuned our server to perform better with the limited memory space of our micro instance.Today I decided to put my server where my mouth is -- I spun up a new server and followed my directions and got myself a new working server. I did have to tweak a few things since I was transferring from a different server, but that'll be the next post on backups and restores.The upshot is that if you're reading this, you're seeing the blog served up from the free micro instance!Let's see how we're doing on memory:
$ freetotal used free shared buffers cachedMem: 613320 574784 38536 0 25396 303720-/+ buffers/cache: 245668 367652Swap: 1048572 4884 1043688
This shows us we're in pretty good shape. There's little free, but that's a good thing. Memory that's "free" isn't doing anything -- it's wasted memory. In this case we're using around 303MB of memory for cache, which is a great use of the memory.We're using a few meg of swap, but that's nothing to get concern with. If we were using hundreds of meg I would want to take a lot closer look.Let's take a closer look.
$ top -u apache
This fires up the top program which looks at running processes. In this case we're just looking at the Apache web server and the PHP processors.
Compare that to the old server (the m1.small) with a bunch of huge apache processes...
This is exactly why we did yesterday's work to make this a lot more slimmed down! :-)Not only that, but let's take a look a the overall speed of the server. This is going to be a somewhat contrived test since we're only going to be hitting the home page, but that's OK for now.The old server (the m1.small that costs more than twice as much):
New new server (the free t1.micro instance):
This was a pretty hard test of the servers -- a thousand requests in under 20 seconds. That's a day's worth of load for the home page for my blog.Next up, backing up the server so we can ensure service even if something bad happens.