You (Probably) Don’t Need SSD Hosting!

Last updated on

Yes, SSDs are superior. Yes, they last longer.

And no, you probably don’t need them on your hosting service!

If you’ve been searching for web hosting, you’re surely familiar with SSD drives. Normal server hard disks (HDDs) are spinning disks that require the movement of a head to read and write data. They’ve been used for decades and are the workhorse of the computing world. SSD stands for “Solid State Drive”, and resemble the flash sticks that you plug into the USB port of your computer.

How are SSDs Different?

The differences between SSDs and HDDs simple to explain. SSDs don’t have moving parts. They don’t spin, and they don’t wear out. The lack of moving parts means that SSDs are faster than HDDs. Much, much faster! Their read/write speeds blow HDDs out of the water. There are so many reports and benchmarks out there, that it’s not worth even linking to the reports. The facts are clear – SSDs deliver superior performance.

But….?

The (Temporary) Con of SSDs?

Today, the main downsides with SSDs are cost, and storage capacity. Currently, SSDs offer a fraction of the storage space compared with HDDs for the same price. Take a look at the InMotion dedicated server page for example. The same server is offered with two options:

  1. 2×2 TB HDD or
  2. 1×500 GB SSD

That means you can get up to four times more storage with an HDD than an SSD. Conversely, if you want the same storage on an SSD that you get with an HDD, you’re going to have to pay a lot more.

But That’s Not the Real Issue!

Despite what it looks like, these are side issues. Technology can always catch up. SSDs will become cheaper, and they’ll increase in capacity. So these differences might not hold water for long.

The real question is: Does it make your website faster? And the answer is…probably not.

Why?

Caching – Minimizing the Use of the Disk

Disk access is slow – even when we’re talking about SSDs. Because it’s not just about raw data transfer speeds. There’s a bunch of overhead associated with each individual request. An extreme example is FTP. Have you ever tried to download or upload hundreds of files over FTP? It’ll take forever. Because even if you have an excellent connection and fast Internet, every file incurs an overhead that requires a sort of “handshake”.

Frequently Accessed Data

The same principle is true for regular disk access. While not as bad as with FTP, web servers generally try and avoid using the disk as much as possible. The pattern of data access is such that most of the time, we end up requesting the same data over and over. The same files, the same queries. Like when multiple visitors request a single web page. Web servers exploit this by speeding up the delivery of data that’s requested often.

They do this by storing as much information as possible in the “cache”. The cache is a special type of memory that’s blazing fast – but it’s greatly limited in space. It’s also “volatile” – meaning the data is lost when the power’s switched off.

So we don’t use cache for long term, permanent storage. Instead, we use it for frequently accessed information that we can serve quickly. The hard disk is queried a few times, then the important data is loaded into the cache and served from there the next time.

What Information Does a Disk Store?

A website stores two kinds of data on its storage systems:

  1. Files, images, and other static content
  2. Database information

CDNs for Files and Static Content

Most websites today use CDNs for delivery of static content like CSS, Javascript files etc. Even regular websites like yours and mine, use services like Cloudflare that distribute images etc across multiple servers across the world. WordPress’s “Jetpack” plugin allows you to store your static images on specialized servers for free. So your own site doesn’t really need to be bothered with delivering this stuff. Your local disks need to be queried once – that’s it. The rest of the time, your CDN takes over and doesn’t bother your site.

Which leaves the database

Database Cache for Database Content

Now your database can’t be handed off to a CDN. That’s dynamic and needs to remain local. But even here, your servers take the load off your hard disks without you even knowing it! Your database has a special cache that stores the results of frequently used queries, indexes, and other data that your disk would otherwise have to serve. Ideally, we would not want the database to be bothered at all! Not unless there’s some new data that needs updating.

But is the Database Cache Enough?

Now the only question remains – is the database cache large enough to hold almost the entire database?

And the answer for most websites, is yes!

MySQL is the database of choice for WordPress – the most popular CMS on the planet. MySQL uses the InnoDB storage engine, which has a variable called the “innodb_buffer_pool_size”. This is the size of the database cache. So before you think you need SSD hosting, look at your database cache first.

Comparing the InnoDB Cache to the Entire Database

To see whether our InnoDB cache is up to the task of keeping our entire database in memory, we need to compare the cache size with the database size. Basically, we’re good if:

InnoDB cache > Database size

So let’s find out.

Getting the InnoDB Database Cache Size

Here’s a tutorial I wrote earlier on how to determine the size of the InnoDB cache. Unfortunately, you can’t just get it from cPanel. Instead, you require SSH access to your site from cPanel. So first get SSH access to your site, then get the size of your InnoDB cache using the tutorials linked above.

Get the innodb_buffer_pool_size

As you can see here, my “innodb_buffer_pool_size” is 0.25 GB. Or 250 MB. You say that doesn’t sound like much? Perhaps. But keep in mind that your database is nothing but text. And text is very cheap to store on disk.

Getting your Database Size

One way to find your database size is to log into your cPanel, and navigate to phpMyAdmin like this:

Access phpMyAdmin from cPanel

 

Once you’ve logged into your phpMyAdmin interface, select the database of your site from the list on the left hand side. For WordPress, you can get the name of your database by peeking at your “wp-config.php” file in the root folder of your installation.

Once you select the correct database, Find the “Export” tab on the right hand side, choose “Quick Export”, and “SQL” from the drop down box. Then just click “Go”.

Export your Database

This will download your entire database in the form of a “.sql” file. It’s nothing but plain text. When it’s done downloading, just right click on the file on your computer and click “Properties”. This will give you the size of your database.

Here’s the database size for this website – wp-tweaks.com as of now:

Size of WP-Tweaks WordPress Database

 

It’s just 6.4 MB! My database cache is literally 40 times bigger than my database! Once it’s primed, my server need never access the database via the disk. It can just rely entirely on cache.

What  About Larger Sites?

Now I know what you’re thinking. “Bhagwad, your site is too insignificant and small. Larger sizes will have bigger databases, and will therefore need SSD hosting!”. And you’re right. For example, my other blog www.bhagwad.com/blog/ has been around for far longer, and here is the database size:

You don't need SSD hosting

 

35 MB. Larger than 6.4 MB for sure, but a hell of a lot more to go before it hits the cap of 250 MB, which is the InnoDB buffer size for my shared hosting.

Increasing the InnoDB Cache Size

On top of this, we can also increase the InnoDB buffer size if our database is approaching the limit. In most cases, increasing the RAM and the consequent cache size is a much more effective use of resources than switching to SSD drives.

Generally speaking, the database cache size should be around 80% of the total amount of RAM available to your system. Not many other applications make such frequent use of the disk, so it’s the database that drives everything.

So You Don’t Need SSD Hosting…Ever?

Does this mean that SSD drives are completely useless? Well like I said, I think it’s useless for the majority of websites. However, here are the conditions where I feel SSD disks can really benefit you:

  1. Your site database is huge. Far, far bigger than can fit into the InnoDB buffer size. And increasing the RAM or the buffer is no longer feasible.
  2. Your site has a ton of dynamic data that can’t be cached even for short periods of time. If the database data is constantly changing, then cache is of limited value. The server will be querying the disk over and over again to get the latest information.

Here is where I feel DreamHost really stands out amongst the other hosting providers. Their MySQL VPS plans put your database on a separate VPS server where it gets its own dedicated resources, not shared with anyone else. You can remain on your shared hosting plan, but ensure that only your database sits on a VPS. To my knowledge, there’s nothing else like it on the market.

So most of the time, you just need more RAM. But if you do want to improve database performance on disk, use a solution like a dedicated VPS for your database instead of switching to SSD drives.