Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My hosting provider offers me to increase my server's memory from 8gb to 24gb, at the same monthly cost of 3x 120gb SSD.

SSD choice seems more reasonable to me; but im curious if my web application will need in-memory caching after it's running on SSD.


share|improve this question
up vote 4 down vote accepted

The question you should ask when choosing between RAM and SSD is, "How much does my application really need to use the disk?"

If you have an application that is mostly scripts doing computation and sending custom versions of pages to users and handling the same kind of requests over not very much data over and over again, then RAM is what you need.

If, however, you are running a file server, streaming media, or thrashing random files that won't fit in RAM, the extra speed given by an SSD will help you a lot. Another place you'll see a good payoff for SSDs is if the application does a lot of writes. SSDs typically have much better read than write performance, but they are still much faster than platter drives.

Where I work, we have an application that writes several GB of data over tens of thousands of RRDs every few minutes. Upgrading the server to one with a fast SSD improved performance dramatically. The same probably could not be said for the server that handles, say, the authentication database. Although that database is large, queries on it are frequently similar (same people logging into the same apps over and over), so caching in RAM is much more beneficial.

Basically, if you're serving the same requests over and over, go for RAM. The OS will cache the data you use frequently and you'll see good performance. If you're application does a lot of IO to "random" files, you'll be thrashing the cache and will see more benefit from a fast SSD.

share|improve this answer

Flash SSD's (which I take it we're talking about here) are fast but they are no substitute for RAM. Typical server RAM bandwidth is measured in many-gigabytes/sec and latencies for read and and write are in the low nanosecond range - the sort of flash based SSD's you are looking at have bandwidth in the hundreds of megabyte/sec range at best and latencies in the microsecond range.

It may make no difference for your app if there are other factors involved but any data access from SSD's will still be a couple of orders of magnitude slower than reading it directly from RAM.

share|improve this answer

It may still need caching. You will be running 24GB of memory how much storage? If your having performance issues memory helps but it might also be the volume or location that your applications caching is storing its space.

share|improve this answer

You need to do performance measuring of your existing system to find out where the bottlenecks are.

Let's assume you don't have any significant bottlenecks (bad assumption, by the way). The question is, do you want 24G of blazing fast reads, disk speed writes, or 120G of pretty fast reads and writes. If you have more than 24G of data to serve, or it changes frequently, then you want the SSDs.

On the other hand, if you only have 10G of static data to serve, and your server process takes only 2G of RAM, then you can put your document root on a RAM disk with 24G of RAM and walk away.

If there are bottlenecks (swap, disk I/O reading bandwidth, disk I/O writing bandwidth, I/O operations per second) then you need to address those specifically. Both options can help, but which is better depends on the situation.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.