Instance Storage
Every instance includes a fixed amount of storage space on which you can store data. Within this document, it is referred to as the "ephemeral store" as it is not designed to be a permanent storage solution.
If an instance reboots (intentionally or unintentionally), the data on the ephemeral store will survive. If the underlying drive fails or the instance is terminated, the data will be lost.
We highly recommend backing up important data to Amazon S3.
Storage is exposed on the following instance types as follows:
Location | Description |
---|---|
/dev/sda1 | Formatted and mounted as root (/) on all instance types |
/dev/sda2 | Formatted and mounted as /mnt on small instances |
/dev/sda3 | Formatted and mounted as /swap on small instances |
/dev/sdb | Formatted and mounted as /mnt on large and extra large instances |
/dev/sdc | Available on large and extra large instances; not mounted |
/dev/sdd | Available on extra large instances; not mounted |
/dev/sde | Available on extra large instances; not mounted |
Due to how Amazon EC2 virtualizes disks, the first write to any location on an instance's drives will perform slower than subsequent writes. For most applications, amortizing this cost over the lifetime of the instance will be acceptable. However, if you require high disk performance, we recommend initializing drives by writing once to every drive location before production use.
To initialize the stores, use the following commands on the m1.large and m1.xlarge instance types:
dd if=/dev/zero of=/dev/sdb bs=1M dd if=/dev/zero of=/dev/sdc bs=1M dd if=/dev/zero of=/dev/sdd bs=1M (m1.xlarge only) dd if=/dev/zero of=/dev/sde bs=1M (m1.xlarge only)
To perform the initialization on all drives at the same time:
dd if=/dev/zero bs=1M|tee /dev/sdb|tee /dev/sdc|tee /dev/sde > /dev/sdd
Note | |
---|---|
This can take a long time (about 8 hours for an extra-large instance). |
Configuring drives for RAID initializes them by writing to every drive location. When configuring software-based RAID, make sure to change the minimum reconstruction speed:
echo $((30*1024)) > /proc/sys/dev/raid/speed_limit_min
Note | |
---|---|
You cannot use iostat (part of the sar System Activity Reporting package) to watch performance. You also cannot watch 'cat /proc/mdstat'. |