0

I have a small webserver running a couple of Django python apps, MySQL, and a wordpress multisite instance. It all runs on Apache with mpm worker, fastcgi and mod_wsgi + memcached

The server is reaching is small memory limit of 256meg. I have the choice of either upgrading the machine to 512meg OR getting a new machine and separating out the services - MySQL on one, everything else on the other (?).

Or just move memcached over?

Or split the server - one for the Wordpress PHP stuff, and the other for the Django stuff.

I'm using cloudfiles CDN to serve all media content.

guybowden
  • 101

3 Answers3

1

I expect at the level you're looking it will probably come down to price breaks - scaling out gives more potential in the long term but you've got so much ability to scale up at this point just upgrading the server isn't going to hamstring you.

You may want to look at your architecture though, currently you're running memcached on the same box as the MySQL server, so they're competing for the same memory (ignoring the web server for the moment). I can't really see the value of having memcached on that server, as any caching it is doing is just using RAM that MySQL could be using for it's own internal caches.

If I were you I'd drop memcached (unless you have some major requirement for it) and scale out for now (move MySQL onto a dedicated server, tune Apache to use the extra freed RAM) - add memcached back in when you start to get issues with database performance capacity.

James Yale
  • 5,042
  • 1
  • 16
  • 20
  • I know this is a bit of a theoretical thing right now - we're right at the bottom of the chain on the servers for sure. However, I wouldn't want memcached to go - it significantly speeds things up right now - I am using it to cache the end HTML output of the Django apps, not just caching db queries. – guybowden Oct 20 '11 at 12:26
  • That sounds like a valid reason to keep it. In that case I'd probably put it on the MySQL box, depending where you think you'll need more RAM - usually you need more web servers before you need more DB servers. – James Yale Oct 20 '11 at 12:33
  • yeah - apache is using up most ram at the moment. So makes sense to allow that to use more and have memcached + mysql on the other box. Cheers – guybowden Oct 20 '11 at 12:37
0

Scale out. You'll be able to get a better handle on the performance characteristics of each component and make adjustments from there.

I'd even suggest going through the work of setting up a second web node and setting up load balancing (RS's managed load balancers work reasonably well) in the not too distant future as you'll buy yourself redundancy and performance and I always like to get these things set up in the early days so you aren't trying to do this work once the site is really starting to gather momentum.

CoreyH
  • 192
  • 6
0

Scale up. Until you reach 1-2GB, you can get huge performance gains out of your server by increasing the RAM, and avoid the complexity of running and maintaining multiple machines.

True, you won't get the high-availability benefits of running two machines, but you also won't have the pain of writing a scalable app, deploying to multiple machines, securing/patching and upgrading multiple machines, etc.

Mike
  • 166
  • 3