Closed dmpetroff closed 1 year ago
Hi @dmpetroff Could you please try this cmd to expand the file descriptor number? It should solve the 'Too many open files' problem
ulimit -n 102400
At the same time, it is recommended that you can try to use ab for handshake testing. e.g.
ab -n 1000 -c 100 -f TLS1.2 -Z AES128-GCM-SHA256 https://127.0.0.1:4433/index.html
This is ApacheBench, Version 2.3 <$Revision$>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking 127.0.0.1 (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests
Server Software: nginx/1.22.1
Server Hostname: 127.0.0.1
Server Port: 4433
SSL/TLS Protocol: TLSv1.2,AES128-GCM-SHA256,2048,128
Document Path: /index.html
Document Length: 615 bytes
Concurrency Level: 100
Time taken for tests: 0.269 seconds
Complete requests: 1000
Failed requests: 0
Write errors: 0
Total transferred: 854784 bytes
HTML transferred: 619920 bytes
Requests per second: 3713.32 [#/sec] (mean)
Time per request: 26.930 [ms] (mean)
Time per request: 0.269 [ms] (mean, across all concurrent requests)
Transfer rate: 3099.69 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 12 19 2.9 19 28
Processing: 2 7 2.2 7 13
Waiting: 0 4 1.8 4 11
Total: 15 26 3.3 26 35
Percentage of the requests served within a certain time (ms)
50% 26
66% 27
75% 28
80% 29
90% 30
95% 31
98% 33
99% 33
100% 35 (longest request)
@ShuaiYuan21 I've specified 16384 file descriptors in nginx config. There are 3200 (16 threads * 200 connections per thread) client connections to that nginx.
My question was more about the reason behind internal errors reported by qatengine via nginx error logs:
2023/01/26 12:52:18 [crit] 121215#0: *184014 SSL_do_handshake() failed
(SSL: error:800B5044:lib(128):qat_rsa_decrypt:internal error error:800B8044:lib(128):
qat_rsa_priv_dec:internal error error:1419F093:SSL routines:tls_process_cke_rsa:decryption failed)
while SSL handshaking, client: 192.168.1.1, server: 0.0.0.0:1443
I encounter such errors when all nginx workers are running under 100%-ish CPU usage (as reported by top
)
UPD: My mistake. I was assuming that worker_connections
nginx parameter also sets RLIMIT_NOFILE, but there's a separate directive for that purpose. After tuning number of open files limit, that errors are gone, so I assume it was related to errors during creation of eventfd by qatengine.
Hello!
I'm benchmarking asynch-nginx performance using following software/hardware:
For SSL load I use tls-perf with 16 threads, 200 connections per thread:
It looks like that when device isn't fast enough to handle incoming requests, SSL connections are getting dropped with following messages in nginx error log:
And sometimes it even reports
I'm using slightly modified version of
dh895xcc/multi_process_event-driven_optimized/dh895xcc_dev0.conf
:And ssl engine in nginx is configured as
As a result I'm not able to pull more than 20k handshakes per second with such config despite nginx workers are not fully utilizing CPU. And if I try to add more client connections, then I ran into "internal error" problem described above.
Can you suggest anything to improve performance/get rid of that errors?