Sharing of resources on AWS - performance

I am interested in understanding the way in which the hardware resources (CPU, disk, network, etc.) of an AWS physical server is shared between different applications. Do people have experiences about inexplicable performance changes in services running on AWS that you have successfully attributed to another application sharing the physical resources? If so, how did you go about debugging this?
In particular, I am interested in more complicated interactions between the resources, such as CPU->Memory bandwidth. If you run 15 VMs on a single machine, you will surely have worse performance than if you ran 2 VMs.
Perhaps this is a more general question about Xen virtualization, but I don't know if there is some kind of AWS magic happening under the hood that I don't know about.
I am not sure if this is the right forum for this kind of question; if not, it would be helpful if you could point me towards a resource or another forum.

Amazon EC2 instances are not susceptible to "noisy neighbour" problems.
Based upon the Instance Type selected, the EC2 instance receives CPU, Memory and (for some instance types) locally attached disk storage. These resources are dedicated to the instance and will not be impacted by other users nor other virtual machines. (An exception to this is the t1 and t2 instance types.)
Specifically:
The instance is allocated a number of vCPUs. These are provided to the instance and no other instance can use these vCPUs (see note about t1 and t2 below). The EC2 Instance Type page defines a vCPU as:
Each vCPU is a hyperthread of an Intel Xeon core for M4, M3, C4, C3, R3, HS1, G2, I2, and D2.
The instance is allocated an amount of RAM. No other instance can use this RAM. There is no oversubscription of CPU nor RAM.
The instance might be allocated locally-attached disk storage, known as Instance Store or Ephemeral Storage. This disk storage does not persist when the instance is Stopped or Terminated, so only store temporary data or data that is replicated elsewhere.
The instance is allocated network bandwidth that is dedicated to that instance. No other instance can impact this network bandwidth. The network performance is based upon the selected instance type. Basically, larger instances receive more network performance.
None of the above factors are impacted by other instances (virtual machines) running on the same host.
t1 and t2 instance types
An exception to the above statement are:
t1.micro instances "provide a small amount of consistent CPU resources and allow you to increase CPU capacity in short bursts when additional cycles are available".
t2 instances provide burst capacity based upon a system of CPU Credits. CPU Credits are earned at a constant rate depending upon instance type, and these credits can be used to burst the CPU when necessary.
For both these instance types, I would assume that this burst capacity is shared between instances, so it is possible that CPU burst might be impacted by other instances also wishing to burst. The t2 instances, however, would make this 'fair' by only consuming CPU credits when the CPU did actually burst.
Dedicated Instances and Dedicated Hosts
Dedicated instances are "Amazon EC2 instances that run in a virtual private cloud (VPC) on hardware that's dedicated to a single customer." Basically, your AWS account will be the only account running instances on that host computer.
A Dedicated Host is a "physical server with EC2 instance capacity fully dedicated to your use. Dedicated Hosts allow you to use your existing per-socket, per-core, or per-VM software licenses, including Windows Server, Microsoft SQL Server, SUSE, Linux Enterprise Server, and so on." Basically, you pay for the entire host computer and then launch individually instances on the host (at no additional charge).
The use of a Dedicated Instance or a Dedicated Host has no impact on resources allocated to each instance. They would receive the same resources as when running as a normal Shared Instance.

Related

What Exactly is NVMe on AWS?

I have been combing through AWS webpages but am not sure exactly what the NVMe storage is used for.
From my research NVMe stands for non volatile memory express but it also seems like NVMe does not persist through stopping of the instance? Kind of confusing naming.
Why would one use NVMe over regular SSD storage?
Ephemeral disks -- also called Instance Store volumes -- whether NVMe or SATA SSD or HDD -- don't persist across an instance stop/start because that action deallocates the hardware associated with the instance on stop and reallocates it on start. The instance store is also wiped, so that the next instance to receive that hardware can't access what you stored. In EC2, content on NVMe drives is also transparently encrypted, with service-managed keys, and the encryption keys are wiped when the instance is stopped.
These volumes do persist across a normal reboot, just not a stop/start. When you "stop" an EC2 instance, the billing for the instance also stops, because a stopped instance exists only logically -- not physically. A stopped EC2 instance is assigned to no physical equipment.
Some instance types use NVMe or SATA-based solid state drives (SSD) to deliver high random I/O performance. This is a good option when you need storage with very low latency, but you don't need the data to persist when the instance terminates or you can take advantage of fault-tolerant architectures. For more information, see SSD Instance Store Volumes
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html
NVMe is very high performance, but instance store volumes are (by design) not fault tolerant and not intended for use with data that can't be replaced (though of course, you can RAID them on machine types with more than one ephemeral disk). Unlike EBS volumes, which are network-attached storage (offering both SSD and magnetic types), are redundant, and support snapshots, the instance store is physically inside the host machine and these don't support snapshots. Kind of a classic trade-off. They're excellent for swap space and temporary files as well as other purposes mentioned at the links above.
As noted in the EC2 documentation, not all instance types offer ephemeral disks. On many smaller instance types, this isn't a choice that you need to make.
The "non-volatile" in NVMe is a name given to the technology in the storage industry, not really applicable to the way they are used in EC2.

What is ECU(AWS)? What does that mean?

I did a test performance for my server(1 ECU), but My server only arrived 1000 users in testing, how many ECU I need for 15000 users?
The ECU (Elastic Compute Unit) was a unit of measure designed to provide a relative measure of performance between Amazon EC2 instance types. For example, an m1.small instance had 1 ECU, an m1.large had 2 ECUs, etc.
However, it is no longer possible to summarize the power of an instance in a single number. Some instances have more RAM, some have more CPUs or more powerful CPUs, GPUs, enhanced networking and even burst capabilities.
Therefore, the ECU has slowly disappeared from AWS services and documentation. It can still be viewed as an optional column in the Amazon EC2 Launch Instance console.
The ECU is definitely not a good measure of "the number of users" that a system can support. The number of users that a system can support are totally dependent upon the application architecture and its system requirements. When testing the number of users a system can support, closely monitor all system components (eg CPU load, RAM utilization, disk queues) to identify the bottleneck. You can then try to modify the application or improve the bottleneck to provide better application performance.

AWS instance storage pricing and selection & Reserved Instance

Storage
Trying to launch an Ubuntu 13.10 Amazon AWS instance I’ve started with a General Purpose m1.medium instance with 1x410 GB instance storage. When I come to tab 4: Add Storage it says 8 GB on the root device and N/A on another device called Instance Store 0. However I can increase the root device to up to 1024 GB. I can also change the Instance Store 0 to an EBS and get 1024 GB there.
How am I able to select more space than I have available (410GB)? Am I charged for that? Where can I see how much of each of my instances are costing? If I set the root device to 410GB will I then be charged exactly as on the Amazon list?
Reserved Instance
I also have purchased a Reserved Instance. How can I verify that the EC2 instance I have just created is actually using my reserved instance?
Storage
You have two storage options with instances. EBS and Instance storage:
EBS is somewhat like an SAN volume. It exists outside of the instance and is accessed via dedicated ethernet (This is shared between instances based on IO priority). Volumes are billed based on the provisioned size. It does have some benefits over instance storage in that it can be easily snapshotted and moved from instance to instance. EBS limits are practical ones, while you can attach quite a few volumes (up to 1TB each) the available bandwidth will likely be saturated before you can take advantage of all of them.
Instance storage is a disk attached directly to the host hardware. Its included in the instance cost. But it should not be treated as persistent. You will loose any data stored on this volume if your instance is stopped or fails for any reason. This is because at each boot, your instance is assigned to available host in a pool instead of being locked to a specific host.
You can use both types of storage on any instance (Except micro, no instance storage available). Instance storage options however need to be set at launch and can't be changed later. EBS volumes can be added/removed at any time. In most cases, instance storage is disabled by default and needs to be explicitly enabled. Helps avoid the situation of "Why did all my data get deleted?"
Reserved Instance
Reservations are a billing feature. As long as your instance matches the parameters of the reservation you will be billed at the reservation rates. Should be able to verify this with account activity.

amazon ec2 cpu or hard slower than my home-linux?

I'm using small size ec2.
its noticeably slower than my less than $800 home linux machine.
(about average machine purchased 6month ago)
I don't know cpu or hard-disk is the bottleneck.
Wonder if there's a way to tell which.
yes, if you want to monitor your EC2 instance, consider using Amazon's cloudwatch ( http://aws.amazon.com/cloudwatch/ ). This service can monitor all your instance's resources, such as CPU utilization, memory usage, network latency, and request counts. It's also free in the amazon free tier.
If you're looking for more detailed monitoring, consider serverdensity service ( http://www.serverdensity.com/cloud-monitoring/ ). They can monitor software installed on the server itself, such as apache service

Amazon EC2 virtualization with VMware

http://aws.amazon.com/ec2/#pricing
I can't understand this. What is an instance? ("On-Demand Instances let you pay for compute capacity by the hour with no long-term commitments.")
Does this mean that I can use whole as my VMware server:
(Extra Large Instance)
15 GB memory
8 EC2 Compute Units (4 virtual cores with 2 EC2 Compute Units each)
1,690 GB instance storage
64-bit platform
I/O Performance: High
API name: m1.xlarge
For $0.96 per hour?
Or does it mean only like one operation or something? What is that instance exactly?
An instance signifies an operating system instance (a virtual machine). By using virtualization, Amazon (and cloud providers in general) offer you a virtualized environment where OS instances are running. You have full control over that operating system inside that environment. Per hour means that you pay that much for using your OS instance resources for a single hour. I believe that page has almost all the details about pricing.
An instance is a virtual machine. For example you can start up an ubuntu instance and then you can SSH into it and do whatever you want.

Resources