Weitere ähnliche Inhalte Ähnlich wie Optimizing Amazon EBS for Performance (CMP371) - AWS re:Invent 2018 (20) Mehr von Amazon Web Services (20) Optimizing Amazon EBS for Performance (CMP371) - AWS re:Invent 20182. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Optimizing Amazon EBS for
Performance
Sajee Mathew
Principal Solutions Architect
AWS
C M P 3 1 7
3. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon EBS Volume Types
4. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon EBS volume types
HDDSSD
Provisioned IOPS
SSD
io1
General Purpose
SSD
gp2
Throughput Optimized HDD
st1 sc1
Cold HDD
5. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon EBS use cases
HDDSSD
Relational Databases
MySQL, SQL Server,
PostgreSQL, SAP,
Oracle
NoSQL Databases
Cassandra, MongoDB,
CouchDB
Big Data , Analytics
Kafka, Splunk,
Hadoop, Data
Warehousing
File / Media
CIFS/NFS,
Transcoding,
Encoding, Rendering
6. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
More details:
https://amzn.to/2m9v2ao
• Dedicated network bandwidth for Amazon EBS I/O
• Enabled by default on most current generation instances
• Can be enabled at instance launch or on a running instance
• Not an option on some 10-Gbps instance types
• (c3.8xlarge, r3.8xlarge, i2.8xlarge)
What is an EBS-optimized instance?
7. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
c4.large
Dedicated to Amazon EBS
500 Mbps ~ 62.5 MiB/s
2 TiB GP2 volume:
6,000 IOPS
160 MiB/s max throughput
4,000 16K IOPS
c4.2xlarge
Dedicated to Amazon EBS
1 Gbps ~ 125 MiB/s
8,000 16KB IOPS
2 TiB GP2 volume:
6,000 IOPS
160 MiB/s max throughput
Performance: EBS-optimized
8. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Avoid Volume/Instance mismatch
Instances have EBS performance thresholds
EBS volumes have performance thresholds
The lower of these two will dictate your EBS performance
9. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
10. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Choosing an Amazon EBS volume type
i3
gp2
Latency?
< 1 ms Single-digit ms
Which is more important?
Cost Performance
IOPS
≤ 80,000> 80,000
is more important
11. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Choosing an Amazon EBS volume type
i3
gp2 io1
Latency?
< 1 ms Single-digit ms
Which is more important?
Cost Performance
IOPS
≤ 80,000> 80,000
is more important
Throughput?
12. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Choosing an Amazon EBS volume type
Throughput
is more important
Small, random I/O Large, sequential I/O
i3
gp2 io1 st1
d2
Latency?
< 1 ms Single-digit ms ≤ 1,750 MiB/s
Aggregate throughput?
> 1,750 MiB/s
Which is more important?
Cost Performance
IOPS
≤ 80,000> 80,000
is more important
Which is more important?
Cost Performance
13. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Choosing an Amazon EBS volume type
Throughput
is more important
Small, random I/O Large, sequential I/O
i3
gp2 io1 sc1 st1
d2
Latency?
< 1 ms Single-digit ms ≤ 1,750 MiB/s
Aggregate throughput?
> 1,750 MiB/s
Which is more important?
Cost Performance
IOPS
≤ 80,000> 80,000
is more important
Which is more important?
Cost Performance
14. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Choosing an Amazon EBS volume type
Throughput
is more important
Small, random I/O Large, sequential I/O
i3
gp2 io1 sc1 st1
d2
Latency?
< 1 ms Single-digit ms ≤ 1,750 MiB/s
Aggregate throughput?
> 1,750 MiB/s
Which is more important?
Cost Performance
IOPS
≤ 80,000> 80,000
is more important
Which is more important?
Cost Performance
15. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
New improvements
16. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
New announcements
2x improvement for Provisioned IOPS volumes
• IOPS increase from 32,000 IOPS to 64,000
• Throughput Increase from 500 MB/s to 1,000 MB/s per volume
• Volumes must be attached to Nitro based Amazon EC2 instances
60% peak performance increase for gp2 volumes
• For volumes > 5.334 TB: IOPS increase from 10K to 16K
• For volumes > 334 GB: Throughput increase from 160MB/sec to 256MB/sec
17. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Hybrid volume use case
Case study:
Running Cassandra on Amazon EBS
c4
gp2
st1
Data files
Commit log
i2
18. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon EBS
19. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Elastic Volumes: Features
Increase volume size
Increase/decrease provisioned IOPS
Change volume type
sc1 magnetic
20. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
How to modify
1. Snapshot volume
2. Modify volume
3. Monitor modification
4. Extend filesystem (if necessary)
21. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Elastic Volumes: Automation ideas
• Publish a “free space” metric to an Amazon
CloudWatch and use AWS Lambda + AWS
Systems Manager to resize the volume and the
file system
• Use an Amazon CloudWatch alarm to watch for
a volume that is running at or near its IOPS
limit or exhausting burst balance
• Initiate workflow to provision additional IOPS
Right-sizing:
https://github.com/awslabs/aws-elastic-volumes
22. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Hybrid volume use case
st1
Case study:
https://amzn.to/2zefJmI/
Transaction logs
“We’ve seen much stronger performance for our database backup
workloads with the Amazon EBS ST1 volumes, and we’re also
saving 75 percent on our monthly backup costs.”
- Randy Young, director of cloud operations, Infor
i2
st1
Full backups
st1
Partial backups
SQL Server
Database
EBS
snapshots
23. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
24. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Do you need to initialize EBS volumes?
It depends
25. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
New EBS volume? New EBS volume from snapshot?
• Attach and it’s ready to go • Initialize for best performance
• Random read across volume
https://amzn.to/2FPS2TS
EBS volume initialization
26. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
When to RAID0
• Storage requirement >16 TiB
• Throughput requirement >1000 MiB/s
• IOPS requirement >64,000 @ 16K
To RAID or not to RAID
EBS EBS EBS
27. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Avoid RAID for redundancy
• EBS data is already replicated
• RAID1 halves available EBS bandwidth
• RAID5/6 loses 20% to 30% of usable I/O to parity
To RAID or not to RAID
EBS EBS EBS
28. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
EBS Cost Optimization
Delete unattached volumes
Resize Volumes
Change Volume Type
Delete Stale Snapshots
Use EBS native encryption
30. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.