• No results found

Amazon EC2

In document Ad hoc Cloud Computing (Page 38-44)

2.3 Cloud Computing

2.3.3 Amazon EC2

Amazon Web Services (AWS) [4] offer their Elastic Compute Cloud (EC2) as a public Infrastructure as a Service (IaaS) cloud where virtual machine instances are provided

2.3. Cloud Computing 25

on top of a bare-bones environment, based on Xen virtualization [212, 60]. Ama-zon EC2 instances come in many flavours and sizes to give a user a greater choice to correctly fit an instance type to an application’s requirements. There are also a large selection of Amazon Machine Images (AMI) available to create and launch instances.

An AMI stores the information needed to launch an instance, e.g. the OS, access per-missions, storage volumes to attach etc. Cloud users are able to create, publish and share their own AMIs to allow others to launch equivalent instances.

2.3.3.1 Compute

At the time of first using Amazon EC2 for experimentation (approximately May 2011), we used a variety of EC2’s Standard On-Demand General Purpose instances; those that charge users for compute capacity by the hour and offer no performance enhancements or extra resources, for example additional storage. Upon subsequent experimenta-tion at a later date, we used instances of the same type and size to remain consistent throughout.

Despite this, Amazon EC2 instances have changed in configuration and cost since 2011. We show the available instance sizes, specifications and costs as of 2011 in Table 2.2. We only describe those that are used during our experiments and are hence mentioned later in the thesis. Full details of EC2 instances can be found on the Amazon EC2 website [3].

Size vCPU ECU RAM (GB) Storage (GB) I/O $/hr

m1.small 1 1 1.7 160 Moderate 0.085

m1.large 2 4 7.5 850 High 0.34

m1.xlarge 4 8 15 1690 High 0.68

Table 2.2: Amazon EC2 Instance Specifications and Costs (2011)

As of 2011, only three Standard On-Demand General Purpose instances sizes existed:

small, large and extra large. The number of virtual cores (vCPU), Elastic Compute Units (ECU), virtual resources and costs increase proportionally according to instance size; an ECU provides the equivalent CPU performance of a 1.0-1.2 GHz 2007 AMD Opteron or Intel Xeon processor and is calculated based on Amazon’s own unpublished benchmarks. EC2 processor research has shown that the small, large and extra large instances can run on Intel Xeon E5430 4 core 2.66 GHz processors or in some cases

(less than 10%), small instances may run on AMD Dual-Core Opteron 2.6 GHz 2218 HE Processors [125]. Since 2011, the available instances sizes, specifications and costs have changed and these changes are reflected in Table 2.3

Size vCPU ECU RAM (GB) Storage (GB) I/O $/hr

m1.small 1 1 1.7 160 Low 0.044

m1.medium 1 2 3.75 410 Low 0.087

m1.large 2 4 7.5 840 Moderate 0.175

m1.xlarge 4 8 15 1680 High 0.350

Table 2.3: Amazon EC2 Instance Specifications and Costs (2014)

In 2012, the medium sized instance was introduced offering approximately twice the amount resources of a small instance for twice the cost. However, these instances also experienced a slight loss of virtual resources when compared to those offered in 2011. A large and extra large instance lost 10 GB’s of storage and the level of I/O performance of a small and large instance was reduced to low and moderate respec-tively. This may be one of the many reasons why costs of the same sized instances are cheaper today than in 2011.

Note that the costs displayed in Table 2.2 and Table 2.3 are specific to the US East Region (Northern Virginia) of Amazon’s cloud infrastructure. Regions are defined as separate geographical areas whose data centres are completely isolated from those in other Amazon EC2 Regions. At the time of writing, eight Amazon EC2 Regions exist and their approximate locations are depicted (in red) in Figure 2.4.

2.3.3.2 Data Transfer

Within each Amazon EC2 Region, multiple Availability Zones exist. Availability Zones are isolated and distinct areas that are designed to be fault tolerant from other Availability Zone failures in the same Region, i.e. if an instance fails in one Avail-ability Zone, a service can still operate provided that it has another instance running in another Availability Zone. As a result of the segregated nature of the infrastruc-ture, each Region has different costs for computation and storage. Transferring data between and within Regions and Availability Zones can also incur different costs due to the different data transfer types:

• Internet Data Transfer (IDT): data transferred from an instance (or any Amazon

2.3. Cloud Computing 27

Figure 2.4: Amazon EC2 Regions

Web Service) to the Internet and vice versa. Data transferred between Regions also are classed as IDT.

• Regional Data Transfer (RDT): data transferred between instances in the same Region that are in different Availability Zones.

• Availability Zone Data Transfer (ADT): data transferred between instances in the same Availability Zone.

In order to reference experimental costs of Amazon EC2 in Appendix A, the costs of transferring data in May 2011 are outlined in Table 2.4; 2014 costs are included for completeness.

We see from Table 2.4 that the costs for RDT in both the outward and inward directions are set at $0.01 per GB, while inward IDT is now free compared to 3 years previously where this was set at $0.1 per GB. Furthermore, in 2011 the outward IDT charge was only based on the tiered charge model where users pay based on the amount they transfer. At the time of writing, outward IDT is charged at two different rates: one for transferring data to another Region, currently set at $ 0.02 per GB, and another to the Internet which is based on the cheaper tiered charging model.

2.3.3.3 Storage

Amazon also offer various persistent storage mechanisms such as Amazon Simple Storage Service (S3) and Amazon Elastic Block Storage (EBS); the former was the

Data Transfer Type Price (May 2011) Price (March 2014) Data Transfer In (per GB)

RDT $ 0.01 $ 0.01

IDT $ 0.10 $ 0.00

Data Transfer Out (per GB)

RDT $ 0.01 $ 0.01

IDT (to Region) NA $ 0.02

IDT (to Internet)

First 1GB / month $ 0.00 $ 0.00

Up to 10TB / month $ 0.15 $ 0.12

Table 2.4: Amazon EC2 Data Transfer Costs (2011/2014)

first service AWS publicly offered. Amazon S3 is an Internet-accessible, persistent and scalable storage platform providing limitless storage capabilities [172] that can be used for general persistence, backups, data distribution and sharing [4].

Amazon S3 is based on a simple architecture revolved around objects and buckets.

A cloud user’s data and metadata are stored as objects and these are placed in buck-ets. Once stored, objects are copied to multiple locations, by default, to improve data availability. Like any Amazon service, S3 is charged using the pay-as-you-go model based on the number of gigabytes stored as well as the number of requests performed on the data store.

Amazon EBS is a mountable storage, conceptually equivalent to a USB disk, that can be created and attached to a virtual machine [4]. Volumes of up to 1TB can be created and data may or may not be persistent dependent on the cloud user’s choice.

Amazon EBS offers data access speeds that are typically faster than S3 due to the locality of the volume mounted. Similar to S3, EBS is also charged based on the number of gigabytes stored as well as the number of requests sent to the storage service.

2.3.3.4 Billing and Usage Reports

Amazon EC2 charges for compute, data transfer and storage by monitoring the con-sumption rates for each of these resources and bills the cloud user at the end of each month; an example section of an EC2 bill is shown in Figure 2.5

2.3. Cloud Computing 29

Figure 2.5: Example Amazon EC2 End-of-Month Bill

Figure 2.5 shows the breakdown of costs for each of the instances used during one month, as well as the associated charges relating to Amazon EBS. The cloud user also has the ability to check the amount of resources they consumed during a specified period by downloading a copy of their Usage Report. The Usage Report is an XML or CSV file that displays the amount of resources consumed per service; an example section of a Usage Report is shown in Figure 2.6.

<OperationUsage>

<ServiceName>AmazonEC2</ServiceName>

<OperationName>InterZone-Out</OperationName>

<UsageType>DataTransfer-Regional-Bytes</UsageType>

<StartTime>10/05/11 20:00:00</StartTime>

<EndTime>10/05/11 21:00:00</EndTime>

<UsageValue>7512592218</UsageValue>

</OperationUsage>

<OperationUsage>

<ServiceName>AmazonEC2</ServiceName>

<OperationName>InterZone-In</OperationName>

<UsageType>DataTransfer-Regional-Bytes</UsageType>

<StartTime>10/05/11 20:00:00</StartTime>

<EndTime>10/05/11 21:00:00</EndTime>

<UsageValue>7756651392</UsageValue>

</OperationUsage>

Figure 2.6: Example AWS XML Usage Report

Figure 2.6 shows the number of RDT bytes transferred inwards and outwards from an instance. Note that Usage Reports can be large in size as they detail the resources consumed per hour for each AWS service. The Usage Report is updated each hour to reflect the cloud user’s current resource usage, however costs may be updated up to one day after a particular resource has been consumed by the cloud user’s instance.

We have now explored all of the concepts of Amazon EC2 that are necessary for understanding the experiments performed and results obtained that are outlined later in the thesis.

In document Ad hoc Cloud Computing (Page 38-44)