離上次寫"Google 推出Iaas 服務 Google Compute Engine "也已經一個多月了，關於GCE和AWS的比較文章與相關的測試報告越來越多，但是我到現在都還沒有機會玩玩看GCE，申請試用了老半天也沒回應，因為我是小咖嘛...Orz..
Figure 1 – Google Compute Engine (Orange) and Amazon EC2 (Blue) Compute Capacity Compared [Source: IDEAS]
原來，這些也都只是紙上數據，原理是根據Google 和Amazon所公布的資料，分別算出Google Compute Engine Unit (GCEU)和 Amazon's Elastic Compute Unit (ECU)換算成實體主機的效能，來做比較：
GCEU： a least 1.0–1.2 GHz 2007 Opteron to 2.6 GHz processor in Intel's Sandy Bridge
ECU： 1.0–1.2 GHz 2007 Opteron or 2007 Xeon processor
我只能說這樣比較準嘛?....=_= ，另外根據這篇文章 ，裡面提到更多GCE的技術細節，其中就提到GCE的虛擬化技術是用KVM，光是憑這點，就算用同樣的硬體規格，就可能跟用Xen 的Amazon有所差異了。下面節錄出一些GCE的規格，我把比較特別的部分用紅色highlight 起來。
- Region: for geography and routing domain.
- Zone: for fault tolerance
- Currently operating 3 US datacenters/zones, located on the East coast of the US.
- Working on adding more datacenters globally and adding more datacenters in the US.
- JSON over HTTP API, REST-inspired, authorization is with OAuth2
- Main resources: projects, instances, networks, firewalls, disks, snapshots, zones
- Actions GET, POST (create), DELETE, custom verbs for updates
- A command line tool (gsutil), a GUI, and a set of standard libraries gives access to the APIs. Experience is like Amazon in that you have an UI and command line tools.
- All Google tools use the API. There is no backdoor. The web UI is built on Google App Engine, for example. App Engine is the web facing application environment and is considered an orchestration system for GCE.
- Partners like RightScale, Puppet, and OpsCode, also use the API to provide higher level services.
- Want people to take their code and run it on their infrastructure. Open API. No backdoors. Can extend that stack at any level.
- A combination of KVMs (Kernel Virtual Machines) and Linux cgroups are used for the underlying hypervisor technology. Linux scheduler and memory manager are reused to handle the scheduling of the machines.
- KVM provides virtualization. Cgroups provides resource isolation. Cgroups was pioneered by Google to keep workloads isolated from each other.
- Internally Google can run virtualized and non-virtualized workloads on the same kernel and on the same machine, which allows them to deploy and test one single kernel.
- Located in a zone.
- Fast boot times: 2 minutes.
- Networking - Internet
- Traffic from the Internet to your machine is shunted on to Google’s private network as soon as they can and given a “first class” ticket to your VPN. This is like an overlay network you see on CDNs.
- 1-to-1 NAT. Every VM can be assigned an external IP address that is rewritten as it enters and exits your VPN. They don’t exist on the VM when you do an ifconfig.
- IP addresses can be detached from a VM in one region and attached to a VM in another region and Google will make sure the traffic is routed properly.
- Built in firewall to control who talks to what in the system.
- Can’t use SMTP. Only UDP, TCP, and ICMP can be used to the Internet.
- IP addresses are advertised with Anycast, then they encapsulate it, and then forward it to your VPN.
- Focused on creating persistent block device that offers performance / throughput so you don’t need to push storage local.
- Two block storage devices: Persistent Disk and Local Disk.
- Persistent disk
- Off instance durably replicated storage medium. High consistency. High throughput solution. Secure. Backing store for database. Built from scratch to be highly performant and gives good 99.95 percentile performance.
- Allocated to a zone.
- Can be mounted read/write to a single instance or read only to a set of instances.
- Data is transparently encrypted when it leaves your VM, before it is written to disk. Using new processors there’s very little to no overhead. It seems to use Google keys and not your keys.
- Less than 3% variance in IO bandwidth when doing 4K random reads and writes. This is their consistency theme. Less variance than a local disk, which can vary by 13%.
- For large block read and writes there’s triple the local bandwidth compared to local disk.
- Google Compute Engine, which is still in limited preview mode, and Amazon cloud services. AWS has 11 different sizes of compute instances, ranging from small virtual machines with 1.7GB of memory, to extra-large compute clusters with 60.5GB of memory, whereas Google has only four. (快開放給試用啊!!)
- AWS is targeting technology-reliant businesses that are turning to the cloud to host their websites, databases and storage, Google is focused initially on research and development teams that may have a need for high-performance computing to complete a project. (所以這算是市場區隔嘛？)
- AWS offers reserved instance pricing discounts, in which customers agree to use a compute instance for months or even years. Google's cloud is priced by smaller time chunks and therefore aimed at shorter-lived projects. (長期使用還是AWS划算)
 Google Compute Engine Matches Amazon AWS Performance
 Google cloud vs amazon cloud how they stack up
 C is for compute Google compute engine gce