Question

If I quote a paragraph from Wikipedia about Optimization:

In computer science, program optimization or software optimization is the process of modifying a software system to make some aspect of it work more efficiently or use fewer resources. In general, a computer program may be optimized so that it executes more rapidly, or is capable of operating with less memory storage or other resources, or draw less power.

And about Scalabilty:

Application scalability refers to the improved performance of running applications on a scaled-up version of the system.

What's the difference? They both end up improving the performance of the system. Are they the same, if so, why are their names different?

Was it helpful?

Solution

Optimization is the process of making existing something more efficient, while doing the same operations. This can mean take less processing time for the same operation. It could mean taking less memory. It could mean taking less disk space. Optimization sometimes involves making trade-offs, like using more memory in exchange for faster processing.

Making things scalable means doing more of the same things. Further, it means doing more of the same things in an efficient manner. Searching for some item in your pocket is quick and easy. Searching for that same item in your house is harder. Searching for that same item when it could be anywhere in the world is super hard. Scalability is how drastically that sort of thing gets harder. "More" or better scalability means that searching all over the world is relatively only a little harder than searching in your pocket.

Like optimization, scalability can have a variety of targets. Sometimes the scalability target is processing time, like the search example. Sometimes it is database size. Sometimes it is memory consumption. Sometimes it's as simple as being able to show more stuff on the screen without driving your users nuts.

So in short, optimization is the act of making a single operation more efficient. Making things scalable is making that operation capable of doing more in a more efficient way.

Or if you could think of how an operation behaves for a series of inputs as a curve: optimization is lowering one point of the curve; making something scalable is lowering the slope of the curve.

OTHER TIPS

They are different.

Scalability, generally, refers to when the expected throughput is several orders of magnitude larger.

For example, if I write the a website which keeps track of my finances, and I want to optimize it for speed, I might decide to keep ALL the data in memory. This means my website can respond more quickly - it does not have to get the data off disk (let's forget, for the moment, what happens when my server is rebooted).

For one user, this might be highly optimized. However, it lacks scalability; when my website reaches 1,000,000 users, keeping all that data in memory is no longer an option.

Most scalability issues come up when a system is divided over several servers.

Things behave differently in large volumes: databases may no longer fit onto a single server; do you shard your database, or do you replicate it? If you split your website over several servers, do you use several identical servers, do you separate static data from dynamic data, do you keep specific large assets on a content distribution network (CDN)? How will that effect your website? Do you use load balancing switches, or load balancing DNS?

What happens if a server goes down? If you have one server, no matter how optimized it is, it means an outage; this is fine for 1 or 5 or 10 users, but for Google? Google, at any given time, WILL have servers down. It is no longer a matter of "a drive has failed, page a sysadmin to fix it", but "add it to the list; the failed drive replacement engineer will trundle his cart around in a few minutes". It might not be worth for Google to use RAID, since they have an "redundant array of inexpensive servers".

Optimization is an Internal factor, where Scalability is an External factor.

Think about it like if you learn a new skill about doing a certain thing that makes you X times faster than before, then you've optimized yourself in doing that specific action; However if you ask your friend to join and help you about that thing instead -- in order to speed up the process, then that's scaling-up.

So basically optimization increases the efficiency of the process to finish more tasks while using the exact same resources as were available before, but scalability simply increases the resources in order to get more things done.

Licensed under: CC-BY-SA with attribution
scroll top