LoginSignup
5
1

More than 3 years have passed since last update.

Google Colabのリージョンを調べる

Last updated at Posted at 2020-05-19

概要

Google Colabにおいて、ノートブックが動いているリージョンを調べます。Colabから使用するCloud Storageのバケットをノートブックと同じリージョンにすることで、価格の低減やデータ転送の高速化が図れます。さらにDeep Learningなどの学習においてはデータ読み込みが高速化され、学習時間を短くすることができます。

調査

Google Colabのセルにおいてgcpingを実行することで、各リージョンからのレイテンシが調べられます。

!curl https://storage.googleapis.com/gcping-release/gcping_linux_amd64_0.0.3 > gcping
!chmod +x gcping
!./gcping

以下の結果から、確認したノートブックは最もレイテンシが小さいus-central1のリージョンで動いていることがわかりました。実際にCloud Storageのバケットをasia-northeast1からus-central1に変更したところ、データ転送時間が短くなり、DeepLearningの学習時間が約1/6になったことを確認できました。

 1.  [us-central1]              1.527713ms
 2.  [global]                   4.838736ms  (10 errors)
 3.  [us-east4]                 51.927976ms
 4.  [northamerica-northeast1]  57.970435ms
 5.  [us-east1]                 66.479917ms
 6.  [us-west2]                 68.485033ms
 7.  [us-west1]                 70.99003ms
 8.  [europe-west2]             189.84392ms
 9.  [europe-west1]             204.61113ms
10.  [europe-west4]             210.959809ms
11.  [europe-west3]             215.961598ms
12.  [europe-west6]             228.518708ms
13.  [asia-northeast1]          245.375997ms
14.  [asia-northeast2]          261.963207ms
15.  [europe-north1]            274.588144ms
16.  [southamerica-east1]       278.956365ms
17.  [asia-east1]               307.425311ms
18.  [asia-east2]               331.961357ms
19.  [australia-southeast1]     340.603328ms
20.  [asia-southeast1]          406.555719ms
21.  [asia-south1]              513.717495ms

まとめ

今回はgcpingを使用して、Google Colabが動作しているリージョンを調べました。Colabのリージョンに合わせて、Cloud Storageのバケットのリージョンを変更することで、データ転送およびDeep Learningの学習の高速化が出来ました。さらに、リージョン外への通信がなくなることから、コスト低減も期待できます。

参考

5
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
1