V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
holinhot
V2EX  ›  问与答

SSL/TLS 性能问题

  •  1
     
  •   holinhot · 2023-01-30 12:10:32 +08:00 · 561 次点击
    这是一个创建于 444 天前的主题,其中的信息可能已经有所发展或是发生改变。

    我测试了下我们服务器的 openssl 性能如下

    #benchmark,1 core,56 cores - Intel(R) Xeon(R) CPU E5-2680 v4 @ 2.40GHz
    #openssl pki performance
    ecdsap256 Sign,39142.4 ops/s, 1139339.0 ops/s
    ecdsap256 Verify,13795.8 ops/s, 353261.9 ops/s
    rsa2048 Sign,1572.1 ops/s, 38369.7 ops/s
    rsa2048 Verify,55272.9 ops/s, 1366343.4 ops/s
    rsa3072 Sign,505.5 ops/s, 13009.4 ops/s
    rsa3072 Verify,26967.3 ops/s, 669999.1 ops/s
    ecdhp256 Key-Exchange,18657.7 ops/s, 457098.7 ops/s
    ecdhx25519 Key-Exchange,27833.2 ops/s, 735125.1 ops/s
    #openssl aead performance
    aes-128-gcm,4.085 GiB/s, 94.614 GiB/s
    aes-256-gcm,2.948 GiB/s, 75.447 GiB/s
    chacha20-poly1305,1.654 GiB/s, 44.588 GiB/s
    

    如果 nginx 上用的 RSA2048 证书。

    应该参考这 2 个指标

    rsa2048 Sign,1572.1 ops/s, 38369.7 ops/s
    rsa2048 Verify,55272.9 ops/s, 1366343.4 ops/s
    

    没深入了解 SSL/TLS 握手过程。想知道 HTTPS 握手过程中,客户端和服务器分别要调用 Sign 和 Verify 多少次?我需要参考这个来评估服务器 SSL/TLS 性能。

    下面这几个参数是在握手完成后使用 key 进行对称加密传输数据用的。 #openssl aead performance aes-128-gcm,4.085 GiB/s, 94.614 GiB/s aes-256-gcm,2.948 GiB/s, 75.447 GiB/s chacha20-poly1305,1.654 GiB/s, 44.588 GiB/s

    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   4747 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 09:53 · PVG 17:53 · LAX 02:53 · JFK 05:53
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.