-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Performance degradation with increase of the number of concurrent connections #590
Comments
Actually there are at least several problems, not just degradation on increasing number of connections. This case is shown on the figure (degradation is circled in red): The second problem is ridiculous small RPS on small file size and small number of connections followed ин quite sharp jump on higher connections number: Probably the problem is linked with TCP issues like #439, #488 or #583. The next problem is about large files. Typically on large files |
The issue of a small RPS number on a small file size and small number of connections that is illustrated by graph 2 and 3 above is most likely caused by the lack of system resources exactly at the time these particular tests are run. These graph are for Tempesta FW server that runs on 2Gb RAM machine. The test results are for tests with Right after this heaviest test finishes it takes some time for the system to "recover" from the consequences of the heavy stress on the system resources. That's when the next lightweight tests don't show the expected results. If these tests are run independently, the results are as expected. Also, graphs for a Tempesta FW server on a 4Gb RAM machine don't show the above pattern. |
The tests are outdated. I didn't see the rough performance degradation on 16 byte files and keep-alive connections for the latest master: I used
, where 'Connection: close' tests on small 16B files also didn't show the performance anomaly: The benchmark command is
Tempesta configuration file:
Nginx configuration:
Tempesta utilizes just about 60% of CPU for softirq for the top load in both the tests whilw wrk fully utilizes all 8 cores. The same for 8 or 32K connections regardless keep-alive or closing connections - the bottleneck is wrk, not Tempesta. @keshonok how did you get 190K RPS from ab? It seems we need must stronger hardware for traffic generator to see real Tempesta numbers. Also after some Nginx tuning I reached 95KRPS instead of 60KRPS, so now the benchmarks are more fair. Meantime I also tried
and got 1479 and 2456 RPS for nginx-1.11.3 and Tempesta correspondingly, i.e. we don't see so low RPS for Tempesta at low number of connections. The bad thing is that I caught deadlock #613 when I try more concurrent connections with P.S. #613 is fixed. |
Recently a series of tests was executed on real hardware to compare the performance of Tempesta with the performance of Nginx as one of the most speediest and widespread web server. The tests revealed that Tempesta's performance degrades, sometimes significantly, with increase of the number of concurrent connections. That's something that should not happen.
As the degradation is observed, the server that runs Tempesta doesn't show any memory limitations, the system has plenty of memory (about 3Gb out of 4Gb RAM available on the server). Also there are no warnings from the TCP stack that it experiences a lack of memory. So this issue doesn't seem to be related to memory pressure.
Below is a collection of all settings and tools used to run the tests.
ab
benchmark tests. Tempesta Linux 4.1.12 kernel was used to run Tempesta. Pre-installed3.16.0-30-generic #40~14.04.1-Ubuntu SMP Thu Jan 15 17:43:14 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
was used to runab
benchmark on229
server.ab
benchmark was run on all three machines.ab
installed from packages was used as the benchmark.Tempesta configuration:
The tests were run by pointing the
ab
benchmark at either Nginx or Tempesta server. The test results were collected with various combinations of the keep-alive option, the number of concurrent connections, and the file size at the server. Theab
benchmark was run in one, two, or three instances simultaneously with help ofparallel
utility.The files sizes of 10, 100, 500, 1024, 10240, 51200, and 102400 bytes were chosen for the tests. The files of these specific sizes were generated by filling them with random data.
The following number of concurrent connections was tried in the tests: 1, 10, 64, 128, 512, 1024, 2048, 8192, 16384, 20000.
The resulting RPS (requests per second) were extracted from
ab
log files, andgnuplot
data files were prepared for each file size and each test. The graphs plotted withgnuplot
were the end result of these tests that illustrated the dependency of RPS on the number of concurrent connections for Nginx and Tempesta in the same tests.The graphs of test results taken at different times, with different parameters and different server tunings all show a very distinctive pattern: the RPS degrades significantly as the number of concurrent connections increases from a certain point.
The text was updated successfully, but these errors were encountered: