问题
I am using EBS volume to store MySQL data. I do have enough space on ephemeral device as well. I will move the data to /root/, provided it will improve the query performance.
Is ephemeral storage faster than EBS volumes?
回答1:
Daan's answer is pointing to Eric Hammond's excellent summary of all EBS benefits already (+1), but to stress one point again upfront:
Ephemeral storage will be lost on stop/start cycles and can generally go away, so you definitely don't want to put anything of lasting value there, i.e. only put temporary data there you can afford to lose or rebuild easily, like a swap file or strictly temporary data in use during computations. Of course you might store huge indexes there for example, but must be prepared to rebuild these after the storage has been cleared for whatever reason (instance reboot, hardware failure, ...).
So storing a MySQL database on ephemeral storage isn't a good idea in the first place, except if you exactly know what you are doing and are prepared to always have point in time backups etc.
That said, this indeed belongs to Server Fault, and there have been quite some similar or related questions asked and answered already - I usually don't link to a search result, but that's actually helpful here, see ebs ephemeral performance; the answers I consider most relevant for an ad hoc judgement are:
- Eric Hammond's on Ec2 micro instance, EBS, I/O and speed. How can I improve performance?
- Eric is the author of You Should Use EBS Boot Instances on Amazon EC2, amongst many other excellent articles on AWS in general and EC2/EBS in particular
- Jonik's on Which is faster for read access on EC2; local drive or EBS?
- aculich's on At what point is EBS usage the bottleneck?
- links to further articles regarding the topic
回答2:
To the answer the actual question:
Ephemeral instance storage is faster than standard EBS (100 IOPS), and EBS performance may vary greatly. Standard EBS when used with RAID appears to offer superior speed over ephemeral.
It's also possible to pay for EBS IPOS volume types to achieve predicable and reliable I/O performance which can perform better than elphermal and again these can be used with RAID for further improvements. The cavet to that is it possble to use ephemeral SSD drives which would also be highly performant (hi1.4xlarge).
See EC2 Ephemeral Disks vs EBS Volumes in RAID, Performance Test: Amazon EBS vs. Instance Storage, and Features of Amazon EBS volumes
回答3:
Always remember that Ephemeral storage will be lost on stop/start cycles.
I would be wary of anyone saying EBS is faster than ephemeral storage, I have read more than one real world experience saying that EBS is less performant than ephemeral storage. A recent article I can remember the link to is DuckDuckGo's experience:
- Got off EBS completely due to EBS being involved in most of the large failures.
- Also experienced performance variability with EBS.
- The new Provisioned IOPs is supposed to handle that, but having fewer extra moving pieces in the architecture is better.
- May experiment with PIOPs in the future, though the current non-EBS architecture is working well.
- Found 4 ephemeral disks performed better than striping 8 EBS disks.
来源:https://stackoverflow.com/questions/10117939/will-moving-data-from-ebs-to-ephemeral-storage-improve-mysql-query-performance