SSL/TLS 性能问题

2023-01-30 12:10:32 +08:00
 holinhot

我测试了下我们服务器的 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

575 次点击
所在节点    问与答
0 条回复

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/911586

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX