Optimization will become more important in the next few years
July 8, 2008
I was looking at hosting provider mosso.com this morning. No particular reason - just saw an ad and clicked on it to poke around. The pricing seemed reasonable, but because mosso is a ‘cloud computing’ sort of provider, I dug a bit further. You’re charge $100/month for “10,000 compute cycles”. Seemed a bit nebulous, so I dug in the the FAQ.
For example 10,000 compute cycles would power:
- about 2.1 million page views using a database-driven content management system
- about 11 million page views of mosso.com
- about 25 million requests for a static 15KB image
and then:
What goes in to calculating a compute cycle?
Mostly, CPU processing time. However, compute cycles also account for the disk I/O your application’s operations consume. For example, a page with heavy database queries will consume more compute cycles in part due to the larger volume of disk I/O it requires.
So, for people who are used to “just get it done” coding (a valid approach, I might add), a move to cloud computing may ultimately end up costing more than being faced with CPU limits on one initial box.
Obviously, more traffic will increase your site usage, and you’ll eventually need more boxes (if you’re using a traditional server approach). But by watching the stat usage on that single box, you’re more likely able to determine where some bottlenecks may be. You’ll likely get a better idea of what’s *causing* the box to use CPU time - is it user code or database calls? Working at that level first, and optimizing there, might be a better approach before moving systems to cloud computing systems.
Because a system like mosso transparently expands to whatever your needs are, you may just get hit with a bigger bill than you bargained for without necessarily being aware of it beforehand. It does seem they offer a ‘used compute cycles’ counter on their dashboard though, which would help monitor the situation.
This isn’t to pick on mosso.com - I like the look of their offerings. It’s more to point out that optimizations, both code and database, will likely become ‘in fashion’ again as people move to cloud computing systems with an eye towards keeping the costs down. Database optimizations in particular will probably become key for many projects.
Related story: back many years ago I was working with a company who was growing ASP projects like gangbusters. Scaling up meant throwing more servers in to a farm. Everything was built with MS Commerce Server. Well, one day MS comes knocking and says “oh, you can’t use the dev versions of Commerce Server for production”. We were paying for the ‘developer program’ where you get copies of everything for a yearly license fee. I’m not sure if we all knew we couldn’t use them in production or not at the time or not, or just assumed that because they weren’t crippled, they were fine to use. Either way it was something like $8k per server we needed to pay per server running a production copy of Commerce Server. We had about 150 servers running at that point. Next day the owner came in to the engineering meeting and said “we need to focus on optimization!”. I’m not sure how many optimizations were done, but it became a big priority for a few weeks - even a 10% reduction in servers would have saved $120,000 at that point.
Perhaps most people won’t be dealing with projects on such a large scale to start with, but part of the attraction of cloud computing is that you can scale up to those levels while leaving the infrastructure headache to someone else. They’ll gladly provide it to you, for a fee. Just make sure you really need what you’re being charged for, or if easy optimizations would be able to save you a bunch.
Did you like this post? Buy me a hot chocolate!
Posted in




July 8th, 2008 at 7:45 am
> “just get it done” coding (a valid approach, I might add)
This would go along with the idea of implementing first, and optimising later (or second). It is also necessary where time to market is important.
July 8th, 2008 at 8:26 am
Right Richard. I’ve just rarely been involved in projects that ever get out of the ‘get it done fast’ and ‘time to market’ mode and focus on ‘let’s clean up, optimize, etc’. It’s almost *never* seen as cost effective, even when you can ‘prove’ that a cleaner code base would make future changes easier and faster (and therefore cheaper). Maybe others out there have had that luxury, but it’s not one I’ve experienced.
July 8th, 2008 at 11:44 pm
I belive you are wrong. There are 2 important variables. First is amount of visitiors/spiders and second one is performance of the hardware. I think the second one will improve faster and become cheaper so it wont be a problem to keep in touch with “bigger stats”, you just buy additional CPU or additonal server, which is cheaper then making the programer sweat for couple of hours. I think the reason for optimization should be “now” and not the “future”.
July 9th, 2008 at 5:08 am
That really depends on how much you get charged for the CPU time, which was my primary point. Someone hosting on mosso twittered me yesterday:
Theres a lot of fuss right now within Mosso forums about CCycles. R supposed to be providing file level optimization/usage tools.