Do I have an SSD or Spinning Disk Drive?

August 13, 2019 447 views
Storage DigitalOcean Ubuntu 18.04 LAMP Stack

How can I check whether my droplet is using an SSD or regular spinning disk drive?

I had set up a swap space on the disk. I recently read that setting up swap space on SSD is bad because it degrades performance, so I want to check what kind of a drive I’m using.

2 Answers

Hi geochanto,

I think you are getting SSD and what a spinning disk drive is mixed up.

A spinning disk drive

A spinning disk is the mechanism within a hard disk drive to which memory is written. With rotating plates attached to an arm that writes the data, the spinning disk mechanism physically resembles a record player (although it is sealed within an enclosure). It’s the technology used behind writing data on your hard drive(SSD or HDD).

What I believe you are wondering is if you are using SSD or HDD.

These days, SCSI HDDs (Small Computer System Interface hard disk drives) are quickly being replaced by SDDs (solid state drives). Unlike the spinning disk of an HDD, a solid state drive involves no moving parts. Instead, data is stored on a series of connected flash memory chips

Your droplet is using SSD. Having said that, you’ve mentioned swap and how it’s slower on SSD. Yes, compared to RAM, swap no matter using SSD or HDD is slower. Despite this, compared to HDD, SSD is much better.

Kind regards,
Kalin D.

@Kdimitrov thank you. You are right, I just meant HDD vs SSD, and thanks for pointing out the droplets use SSD.

I was referring to this article: https://www.digitalocean.com/community/tutorials/how-to-add-swap-space-on-ubuntu-16-04, specifically this line: “using swap with SSDs can cause issues with hardware degradation over time. Due to this consideration, we do not recommend enabling swap on DigitalOcean or any other provider that utilizes SSD storage.”

So with that in mind, is it better to just bite the bullet and increase RAM to deal with peak RAM usage, instead of having the swap space? Because of course I don’t want swap space to cause hardware failures down the road.

  • @geochanto I’ve read the article and yes, it’s true considering all factors.

    Having said that, you need to have swap otherwise, if your RAM gets used up for any reason, your services will be killed by the server.

    Basically, swap is an emergency tool in your belt. If your server starts to use it - get ready to refactor your app or to upgrade your droplet soon. If swap is used all the time, 20% or more - you should upgrade your droplet immediately. Used swap means you’re running out of memory.

    My point on this is to have swap. If you notice it being filled up constantly, upgrade your droplet.

    Kind regards,
    Kalin D.

Have another answer? Share your knowledge.