LoginSignup
1
2

More than 5 years have passed since last update.

EC2 の c5 instance では専有ホストを使わなくても PMU が使える

Posted at

EC2 の c5 インスタンスタイプが発表されました。

参考: https://dev.classmethod.jp/cloud/aws/ec2-c5-instance/

個人的に今までのGCEやEC2の不満は PMU が使えないことです。例えば perf コマンドでキャッシュミスや分岐ミスをプロファイリングできません。

C5インスタンスではハイパーバイザーがKVMに変更されたということで、この点に変化が無いか調べてみました。結果、 9xlarge (1ソケット専有) と 18xlarge (ホスト=2ソケット専有) では Hardware PMU Event を見ることができました。(テナンシーは通常の「共有」のまま、AMI は Amazon Linux 2017.9)

結果: https://gist.github.com/methane/3c523b7bc8e99508a90ca06b5d4bf601

一方で、 perf -b や perf --call-graph lbr は動きませんでした。 /proc/cpuinfo にも lbr が載ってないので、 lbr は利用できないようです。これ使えるともっと嬉しいんだけどなー。

ec2-user]# perf record -b python fib.py
Error:
PMU Hardware doesn't support sampling/overflow-interrupts.
1
2
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
1
2