This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
• For given performance, how efficiently are resources being used?• Something at 100% utilization can’t accept any more work• Low utilization can indicate more resources are being purchased
than needed
Example: Web Application• MediaWiki installed on Apache with 140 pages of content• Load increased in intervals over time
Example: Web Application• Memory stats
Example: Web Application• Disk stats
Example: Web Application• Network stats
Example: Web Application• CPU stats
• Picking an instance is tantamount to resource performance tuning• Give back instances as easily as you can acquire new ones• Find an ideal instance type and workload combination
Instance Selection = Performance Tuning
Delivering Compute Performance with Amazon EC2 Instances
Review: C4 Instances
• Custom Intel E5-2666 v3 at 2.9 GHz• P-state and C-state controls
• A CPU credit provides the performance of a full CPU core for one minute
• An instance earns CPU credits at a steady rate
• An instance consumes credits when active
• Credits expire (leak) after 24 hours
Baseline rate
Credit balance
Burstrate
Tip: Monitor CPU credit balance
Delivering Memory Performance with Amazon EC2 Instances
Announced: X1 Instances
• Largest memory instance with 2 TB of DRAM• Quad socket, Intel E7 processors with 128 vCPUs
Model vCPU Memory (GiB) Local Storage
x1.32xlarge 128 1952 2x 1920GB
Delivering I/O Performance with Amazon EC2 Instances
Review: I2 Instances
16 vCPU: 3.2 TB SSD; 32 vCPU: 6.4 TB SSD365K random read IOPS for 32 vCPU instance
Model vCPU Memory (GiB)
Storage Read IOPS Write IOPS
i2.xlarge 4 30.5 1 x 800 SSD 35,000 35,000i2.2xlarge 8 61 2 x 800 SSD 75,000 75,000i2.4xlarge 16 122 4 x 800 SSD 175,000 155,000i2.8xlarge 32 244 8 x 800 SSD 365,000 315,000
Device Pass Through: Enhanced Networking
• SR-IOV eliminates need for driver domain• Physical network device exposes virtual function to
instance• Requires a specialized driver, which means:
• Your instance OS needs to know about it • EC2 needs to be told your instance can use it
Hardware
Before Enhanced NetworkingDriver Domain Guest Domain Guest Domain
VMM
Frontend driver
Frontend driver
Backend driver
DeviceDriver
Physical CPU
Physical Memory
Network Device
Virtual CPU Virtual Memory
CPU Scheduling
Sockets
Application1
23
4
5
Hardware
After Enhanced NetworkingDriver Domain Guest Domain Guest Domain
VMM
NIC Driver
Physical CPU
Physical Memory
SR-IOV Network Device
Virtual CPU Virtual Memory
CPU Scheduling
Sockets
Application1
2
3
NIC Driver
Tip: Use Enhanced Networking
• Highest packets-per-second• Lowest variance in latency• Instance OS must support it• Look for SR-IOV property of instance or image
Leveraging Features of EC2 and Companion Services
Auto Recovery for Amazon EC2
• Recover Instances that have become impaired due to underlying hardware problem.
• Instance maintains Instance ID, Private IP, Elastic IP and metadata.
• Configured through CloudWatchEC2 Action
Auto Recovery for Amazon EC2
• Examples of problems causing system status checks to fail:• Loss of Network Connectivity• Loss of system power• Software issues on the physical host• Hardware issues on the physical host.
• Only supported on:• C3, C4, M3, M4, R3, T2 and X1 Instances• Instances in a VPC• Instances with shared Tenancy• Instances that use EBS storage exclusively
Auto Scaling – Lifecycle Hooks
• Hold instance in Pending or Terminating state.
• Notification of Lifecycle event triggering via CloudWatch Events or SNS. (Lambda)
• Default timeout is one hour.
• Can CONTINUE or ABANDON. Set a default results using –default-result