Skip to content

AES-GCM slower than BoringSSL on Zen3 #2283

@sticnarf

Description

@sticnarf

Problem:

Environment: EC2 c6a.large
AWS-LC version: 652f7a9
BoringSSL version: google/boringssl@7c25e73

Run the benchmark suite of AWS-LC.

AWS-LC result:

Did 88351000 AEAD-AES-128-GCM seal init operations in 10000023us (8835079.7 ops/sec)
Did 96643500 AEAD-AES-128-GCM seal (16 bytes) operations in 10000012us (9664338.4 ops/sec): 154.6 MB/s
Did 62820000 AEAD-AES-128-GCM seal (256 bytes) operations in 10000136us (6281914.6 ops/sec): 1608.2 MB/s
Did 24766500 AEAD-AES-128-GCM seal (1350 bytes) operations in 10000051us (2476637.4 ops/sec): 3343.5 MB/s
Did 5502000 AEAD-AES-128-GCM seal (8192 bytes) operations in 10000284us (550184.4 ops/sec): 4507.1 MB/s
Did 2844000 AEAD-AES-128-GCM seal (16384 bytes) operations in 10002055us (284341.6 ops/sec): 4658.7 MB/s
Did 88406750 AEAD-AES-128-GCM open init operations in 10000024us (8840653.8 ops/sec)
Did 91620000 AEAD-AES-128-GCM open (16 bytes) operations in 10000057us (9161947.8 ops/sec): 146.6 MB/s
Did 61806750 AEAD-AES-128-GCM open (256 bytes) operations in 10000005us (6180671.9 ops/sec): 1582.3 MB/s
Did 24261000 AEAD-AES-128-GCM open (1350 bytes) operations in 10000112us (2426072.8 ops/sec): 3275.2 MB/s
Did 5475000 AEAD-AES-128-GCM open (8192 bytes) operations in 10000813us (547455.5 ops/sec): 4484.8 MB/s
Did 2826000 AEAD-AES-128-GCM open (16384 bytes) operations in 10001913us (282545.9 ops/sec): 4629.2 MB/s
Did 82229250 AEAD-AES-256-GCM seal init operations in 10000032us (8222898.7 ops/sec)
Did 91326000 AEAD-AES-256-GCM seal (16 bytes) operations in 10000058us (9132547.0 ops/sec): 146.1 MB/s
Did 59753250 AEAD-AES-256-GCM seal (256 bytes) operations in 10000040us (5975301.1 ops/sec): 1529.7 MB/s
Did 23015000 AEAD-AES-256-GCM seal (1350 bytes) operations in 10000224us (2301448.4 ops/sec): 3107.0 MB/s
Did 5127000 AEAD-AES-256-GCM seal (8192 bytes) operations in 10000765us (512660.8 ops/sec): 4199.7 MB/s
Did 2638000 AEAD-AES-256-GCM seal (16384 bytes) operations in 10000288us (263792.4 ops/sec): 4322.0 MB/s
Did 82290000 AEAD-AES-256-GCM open init operations in 10000014us (8228988.5 ops/sec)
Did 85920500 AEAD-AES-256-GCM open (16 bytes) operations in 10000016us (8592036.3 ops/sec): 137.5 MB/s
Did 58123000 AEAD-AES-256-GCM open (256 bytes) operations in 10000101us (5812241.3 ops/sec): 1487.9 MB/s
Did 22427500 AEAD-AES-256-GCM open (1350 bytes) operations in 10000011us (2242747.5 ops/sec): 3027.7 MB/s
Did 5103000 AEAD-AES-256-GCM open (8192 bytes) operations in 10000243us (510287.6 ops/sec): 4180.3 MB/s
Did 2639000 AEAD-AES-256-GCM open (16384 bytes) operations in 10001526us (263859.7 ops/sec): 4323.1 MB/s

BoringSSL result:

Did 96518500 AEAD-AES-128-GCM seal init operations in 10000020us (9651830.7 ops/sec)
Did 144998000 AEAD-AES-128-GCM seal (16 bytes) operations in 10000064us (14499707.2 ops/sec): 232.0 MB/s
Did 109995750 AEAD-AES-128-GCM seal (256 bytes) operations in 10000004us (10999570.6 ops/sec): 2815.9 MB/s
Did 39113000 AEAD-AES-128-GCM seal (1350 bytes) operations in 10000059us (3911276.9 ops/sec): 5280.2 MB/s
Did 9885000 AEAD-AES-128-GCM seal (8192 bytes) operations in 10000669us (988433.9 ops/sec): 8097.3 MB/s
Did 5132000 AEAD-AES-128-GCM seal (16384 bytes) operations in 10001886us (513103.2 ops/sec): 8406.7 MB/s
Did 96728250 AEAD-AES-128-GCM open init operations in 10000006us (9672819.2 ops/sec)
Did 128507000 AEAD-AES-128-GCM open (16 bytes) operations in 10000004us (12850694.9 ops/sec): 205.6 MB/s
Did 104166250 AEAD-AES-128-GCM open (256 bytes) operations in 10000020us (10416604.2 ops/sec): 2666.7 MB/s
Did 39440000 AEAD-AES-128-GCM open (1350 bytes) operations in 10000003us (3943998.8 ops/sec): 5324.4 MB/s
Did 10542000 AEAD-AES-128-GCM open (8192 bytes) operations in 10000856us (1054109.8 ops/sec): 8635.3 MB/s
Did 5459000 AEAD-AES-128-GCM open (16384 bytes) operations in 10001379us (545824.7 ops/sec): 8942.8 MB/s
Did 89778250 AEAD-AES-256-GCM seal init operations in 10000004us (8977821.4 ops/sec)
Did 128749500 AEAD-AES-256-GCM seal (16 bytes) operations in 10000019us (12874925.5 ops/sec): 206.0 MB/s
Did 100996000 AEAD-AES-256-GCM seal (256 bytes) operations in 10000006us (10099593.9 ops/sec): 2585.5 MB/s
Did 34976750 AEAD-AES-256-GCM seal (1350 bytes) operations in 10000018us (3497668.7 ops/sec): 4721.9 MB/s
Did 9116000 AEAD-AES-256-GCM seal (8192 bytes) operations in 10000160us (911585.4 ops/sec): 7467.7 MB/s
Did 4697000 AEAD-AES-256-GCM seal (16384 bytes) operations in 10001178us (469644.7 ops/sec): 7694.7 MB/s
Did 89951500 AEAD-AES-256-GCM open init operations in 10000003us (8995147.3 ops/sec)
Did 121096000 AEAD-AES-256-GCM open (16 bytes) operations in 10000031us (12109562.5 ops/sec): 193.8 MB/s
Did 96149250 AEAD-AES-256-GCM open (256 bytes) operations in 10000010us (9614915.4 ops/sec): 2461.4 MB/s
Did 35331000 AEAD-AES-256-GCM open (1350 bytes) operations in 10000159us (3533043.8 ops/sec): 4769.6 MB/s
Did 9514000 AEAD-AES-256-GCM open (8192 bytes) operations in 10000220us (951379.1 ops/sec): 7793.7 MB/s
Did 4908000 AEAD-AES-256-GCM open (16384 bytes) operations in 10000384us (490781.2 ops/sec): 8041.0 MB/s

Solution:

Hope a more optimized version of AES-GCM will be implemented for Zen3.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions