今年、AppleはAppleM1チップとそれに基づくデバイスでデスクトッププロセッサ市場を揺るがしました。同様のイベントが昨年、クラウドコンピューティングの世界で行われました。AWSは、独自のARMGraviton2プロセッサに基づく新しいタイプのサーバーをリリースしました。Amazonによると、新しいプロセッサのパフォーマンスと価格の比率は、x86のプロセッサよりも40%高くなっています。もう1つの最近の更新は、Graviton2上のAmazon RDS(データベースサーバーを提供するクラウドサービス)サーバーです。実際のバックエンドアプリケーションでいくつかのベンチマークと負荷テストを実行して、ARMサーバーがそれほど優れているかどうか、および互換性の問題が発生する可能性があるかどうかを確認しました。
パフォーマンス
AWSでサーバータイプt4g.small(ARM)とt3.small(x86)を比較していました。この記事の執筆時点では、x86サーバーの1時間あたりの価格は0.0208ドルで、ARMサーバーの場合は0.0168ドルです。ARMサーバーは20%安価です。
まず、wrkを使用して負荷テストを行い、サーバーにrecap.devの新規インストールを実行しました。
これは、4つのプロセスを持つdocker-composeテンプレートです。リクエストを受け入れてRabbitMQに保存するウェブサーバーと、PostgreSQLで1000のグループにリクエストを保存する別のバックグラウンドプロセス。
次のコマンドを使用して、同じリージョンにあるt3.2xlargeサーバーでwrkを実行しました。
wrk -t24 -c1000 -d300s -s ./post.lua <hostname>
24のストリームと1000のHTTP接続を使用して5分間継続的にリクエストを送信します。
サーバーt4g.small(ARM)の結果:
24 threads and 1000 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 473.53ms 53.06ms 1.96s 81.33%
Req/Sec 115.83 96.65 494.00 71.32%
620751 requests in 5.00m, 85.84MB read
Socket errors: connect 0, read 0, write 0, timeout 225
Requests/sec: 2068.48
Transfer/sec: 292.90KB
サーバーt3.small(x86)の場合:
24 threads and 1000 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 600.28ms 70.23ms 2.00s 72.53%
Req/Sec 92.77 82.25 404.00 70.26%
488218 requests in 5.00m, 67.51MB read
Socket errors: connect 0, read 0, write 0, timeout 348
Requests/sec: 1626.87
Transfer/sec: 230.37KB
ARMサーバーは、1秒あたり27%多い要求を、平均26%速く処理しました。
pts/compress-7zip-1.7.1 t4g.small (ARM) 6833 MIPS, t3.small (x86) - 5029 MIPS. ARM 35%.
ARM pts/c-ray 2 . 958 x86 458 ARM .
pts/ramspeed, .
|
t4g.small (ARM) |
t3.small (x86) |
Add/Integer |
50000 /c |
13008 /c |
Copy/Integer |
58650 /c |
11772 /c |
Scale/Integer |
31753 /c |
11989 /c |
Triad/Integer |
36869 /c |
12818 /c |
Average/Integer |
44280 /c |
12314 /c |
Add/Floating Point |
49775 /c |
12750 /c |
Copy/Floating Point |
58749 /c |
11694 /c |
Scale/Floating Point |
58721 /c |
11765 /c |
Triad/Floating Point |
49667 /c |
12809 /c |
Average/Floating Point |
54716 /c |
12260 /c |
, t4g.small Graviton2 3 5 .
, ARM . .
, .
ARM . , Docker .rpm .deb, (, Docker ). , docker-compose ARM , . , , ARM . , , , ARM , .
Amazon RDS Graviton2 ARM .
ARM Docker recap.dev arm/v7 arm64.