GCP 的 f1-micro 的使用心得...

這幾天在弄備援跳板機,不想弄在日本 (latency),所以就想到 Google Cloud Platform (GCP) 在台灣有機房,而 Compute Enginef1-micro,類似 AWSEC2 提供的 t2.nano 的機器。而這兩天玩了玩,大概有些事情值得記錄起來。

CPU 相關的部份:

  • EC2 的 t2 系列可以透過 API 或是在 web console 看到 CPU credit 剩下多少,GCE 沒找到在哪邊可以看。
  • EC2 的 t2 系列在 CPU credit 用完後是變慢運行,除非你打開 T2 Unlimited 同意 AWS 多收錢。而 GCE 的則是沒得選,相當於一定要開 T2 Unlimited。
  • GCE 的 f1-micro 是 0.2 vCPU,但我在上面跑 Ubuntu 18.04,平常沒事就已經是 15% 左右。這數字比預期的高不少,還在找是什麼原因...

網路相關的部份:

  • 因為要用台灣的機房,網路的部份只有 Premium 等級可以選 (Standard 等級目前只在美國有),也就是會先走 Google 佈建的網路再出去,所以流出的費用會隨著 destination 地區而有差異 (i.e. 封包送到美國與送到中國是不同計價)。
  • 但 Premium 等級實測品質真的很不一樣,到香港居然在 15ms 以下,以前在固網機房內沒看過這個數字...

其他的部份:

  • 硬碟空間方面,Standard provisioned space 比 EBSgp2 便宜不少,而且還包括了 i/o 費用 (AWS 會另外收費)
  • 連續使用就會有 discount 了,也可以 commit 買一年或是三年取得更深的 discount。而 AWS 則是得買 Reserved Instance 拿到 discount。

來看看一個月會有多少帳單產生吧...

Amazon EC2 的 F1 type 開放一般使用

AWS 提供更快計算 Bitcoin 的 FPGA 機種開放一般使用了:「Amazon EC2 F1 Instances, Customizable FPGAs for Hardware Acceleration Are Now Generally Available」。

在 AWS 開始提供服務後,應該會有更多 library 支援吧... 現在現有的應用要上去還得自己先刻些東西,不像 TensorFlow 可以透過 GPU 運算。

F1 instances include the latest 16 nm Xilinx UltraScale Plus FPGA with local 64 GiB DDR4 ECC protected memory, with a dedicated PCI-e x16 connection to the instance. For F1.16xlarge instances, the dedicated PCI-e fabric lets the FPGAs share the same memory space and communicate with each other across the fabric at up to 12 GBps in each direction. The FPGAs within the F1.16xlarge share access to a 400 Gbps bidirectional ring for low-latency, high bandwidth communication.

以後被盜開機器的機種又多一個了:EC2 F1 Instances with FPGAs

又多了一種可以挖 BitCoin 的 instance type 了,AWS 正式推出 F1 Instance:「EC2 F1 Instances with FPGAs – Now Generally Available」。

目前只有在 us-east-1 有,不過有計畫要推到其他地區:

Today we are making the F1 instances generally available in the US East (Northern Virginia) Region, with plans to bring them to other regions before too long.

Amazon EC2 的大量新資訊

這次 re:InventAmazon EC2 的更新真是有夠多的,總集篇被整理在這邊:「EC2 Instance Type Update – T2, R4, F1, Elastic GPUs, I3, C5」。

先是 F1 系列提供 FPGA 能力:「Developer Preview – EC2 Instances (F1) with Programmable Hardware」。

再來是 T2 系列提供更大台的機器,不過往上提供的 CPU 級距還是 1.5 倍 (費用是 2 倍),主要還是給量還不夠大的使用者使用,如果夠大的就應該換去 C 系列,加上 auto scaling 的方式降低成本:「New T2.Xlarge and T2.2Xlarge Instances」。

另外一個大賣點是 GPU 變成可以掛在各種機器上,雖然還沒推出:「In the Works – Amazon EC2 Elastic GPUs」:

Today, you have the ability to set up freshly created EBS volumes when you launch new instances. You’ll be able to do something similar with Elastic GPUs, specifying the desired size during the launch process, with the option to stop, modify, and then start a running instance in order to make a change.

最後是推出了 R4、I3 與 C5 系列,主要是在於硬體升級而更新。