In this article you’ll will learn how to check if your EC2 instance uses SSD and compare the speed of SSD SSD-based instance storage to EBS volumes on Windows and Linux. I will also show you how to add SSDs to instances for the M3 type to which Amazon added SSDs just a few days ago.
Latest posts by Michael Pietroforte (see all)

My instance type is m3.xlarge, however, all M3 instance types now offer SSD-based instance storage. The size of the SDD depends on the type. You can find out more about EC2 the different SDD sizes of the M3 instance types here.

How to add an SSD to an M3 instance ^

Whenever you launch a new M3 instance, the SSDs are automatically available. Make sure that you add the instance store devices in the EC2 launch wizard in the AWS Management console (see screenshot below). You can use your old AMIs that you created without the SSDs.

Add ephemeral instance store volumes

Add ephemeral instance store volumes

If you want to launch the instance from the command line, you have to add the SSD with the --block-device-mapping parameter:

ec2-run-instances ami-xxxxxxxxx -t m3.xlarge --key your-keypair ---group your-security-group --availability-zone us-east-1a --block-device-mapping "/dev/sdb=ephemeral0" --block-device-mapping "/dev/sdc=ephemeral1"

To add the SSD to a running instance, you have to stop the instance and then launch it again with one of the options above. Of course, this only works with EBS-based instances. If you want to add the SSDs to an instance-store instance, you have to create an AMI from the instance first and then re-launch it.

To use the SSDs you have to mount them on your Linux box. In Ubuntu this would look like this:

mount /dev/xvdb /ssd1
mount /dev/xvdc /ssd2

Of course, you have to create the folders ssd1 and ssd2 first. If you use another Linux distro, the device names might be different.

On a Windows machine the SSDs should be already assigned to the drive letters Y and Z.

Windows Server on EC2 with SSDs

Windows Server on EC2 with SSDs

SSDs on EBS instances and instance-store instances ^

Notice that as instance-store devices, the SSDs are ephemeral which means that whenever you stop the instance all data on the device will be deleted. However, you can reboot the instance without losing your data.

You should also know that on an EBS instance, the instance will not use one of the SSDs as root device. The SSDs are in the instance store and your EBS instance will continue to use an EBS volume as root device.

However, on an instance-store instance, you can boot up from one of the SSDs. You have to decide, if the performance gains outweigh the downside that you can only terminate but not stop the instance.

Verify if an EC2 instance has SSDs installed ^

If you want to verify that the storage devices you added are really on SSDs, things get a bit tricky. On a physical Ubuntu machine if you run cat /sys/block/xvdb/queue/rotational you would get 0 as result if xvdb is an SSD and 1 if it is an HDD.

However, if you run the command on an EC2 instance, you will always get 0 regardless of the storage type. We are in a virtualized environment and not all physical properties are passed through to the virtual machine.

Smartctl doesn’t work either. If you run sudo smartctl -a /dev/xvdb, you will only get /dev/xvdb: Unable to detect device type. If you want to try it yourself, on Ubuntu you can install smartctl with sudo apt-get install smartmontools.

Measure the speed of SSD and EBS volumes ^

The only way to verify that you really have SSDs in your EC2 instance is to measure the speed. The simplest way is with the ioping tool. On Ubuntu you can install ioping with:

sudo apt-get install ioping

Now you can compare the speeds of an EBS volume with your SSDs. To get a list of your devices on your Linux instance type:

sudo fdisk –l

Find SSDs on Ubuntu

Find SSDs on Ubuntu

On an Ubuntu EBS instance you can measure the speed of your root device which is an EBS volume with this command:

sudo ioping -R /dev/xvda1 -c 1000

To measure the speed of an SSD type:

sudo ioping -R /dev/xvdb -c 1000

Measure SSD and EBS volume speed on EC2

Measure SSD and EBS volume speed on EC2

As you can see in the screenshot the speed differences are huge.

Ioping is also available as standalone tool for Windows.

You can measure the speed of the root drive on the EBS volume with this command:

ioping -R -c 1000 c:\

And the SSD accordingly:

ioping -R -c 1000 y:\

Measure SSD speed on Windows

Measure SSD speed on Windows

As you can see in the screenshot, the difference is not as big as on Ubuntu. However, this can be an issue with ioping under Windows. The measured speed can also vary with the instance type and depend on the load on the EBS network.


Leave a reply

Please enclose code in pre tags

Your email address will not be published. Required fields are marked *


© 4sysops 2006 - 2021


Please ask IT administration questions in the forums. Any other messages are welcome.


Log in with your credentials


Forgot your details?

Create Account