1

when we test performance of bulk product create api request using Apache 2 Benchmark, it takes to much time for return response of request.

I tested bulk api requests with 200 total number of requests & 25 concurrency level

Live Server Data

This is Apache Benchmark Result

$ ab -n 200 -c 25 -s 800 <api_url>
This is ApacheBench, Version 2.3 <$Revision: 1901567 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking <api_url> (be patient)
Completed 100 requests
Completed 200 requests
Finished 200 requests


Server Software:        Apache
Server Hostname:        <api_url>

Concurrency Level:      25
Time taken for tests:   1825.329 seconds
Complete requests:      200
Failed requests:        0
Requests per second:    0.11 [#/sec] (mean)
Time per request:       228166.105 [ms] (mean)
Time per request:       9126.644 [ms] (mean, across all concurrent requests)
Transfer rate:          313.50 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        4  259 760.3     87    3458
Processing: 11530 224407 17776.1 227501  242597
Waiting:    11501 223702 17661.3 226799  241997
Total:      11536 224666 17877.9 227903  242602

Percentage of the requests served within a certain time (ms)
  50%  227903
  66%  229995
  75%  231201
  80%  232007
  90%  235161
  95%  236600
  98%  239193
  99%  241998
 100%  242602 (longest request)

Live Server Apache & Php.ini Configuration

Intel(R) Xeon(R) CPU E5-2697 v3 @ 2.60GHz
core 56

Total Memory = 193068 MiB


Maximum Spare Servers = 10
    Server Limit = 256
    Max Request Workers = 150
    Max Connections per child = 10000
    Keep-Alive = On
    Keep-Alive Timeout = 5
    Max Keep-Alive Requests = 100
    Timeout = 300

    max_execution_time = 30
    memory_limit = 2G (*Magento's Min. recommended)
    opcache.enable = On
    gzip compression = enabled

Local Development System Data

This is Apache Benchmark Result

$ ab -n 200 -c 25 -s 800 <api_url>
This is ApacheBench, Version 2.3 <$Revision: 1879490 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking <api_url> (be patient)
Completed 100 requests
Completed 200 requests
Finished 200 requests


Server Software:        Apache/2.4.52
Server Hostname:        <api_url>

Concurrency Level:      25
Time taken for tests:   13.566 seconds
Complete requests:      200
Failed requests:        0
Requests per second:    14.74 [#/sec] (mean)
Time per request:       1695.800 [ms] (mean)
Time per request:       67.832 [ms] (mean, across all concurrent requests)
Transfer rate:          271.61 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.1      0       0
Processing:   243 1628 472.0   1657    2864
Waiting:      238 1618 468.9   1641    2832
Total:        243 1628 472.0   1657    2864

Percentage of the requests served within a certain time (ms)
  50%   1657
  66%   1799
  75%   1891
  80%   1944
  90%   2142
  95%   2512
  98%   2631
  99%   2846
 100%   2864 (longest request)

Local Server & Php.ini Configuration

Intel(R) Core(TM) i3-9100 CPU @ 3.60GHz
core 4
Total Memory = 11862.5 MiB

Max Requests :- Per Child: 0 - Keep Alive: on - Max Per Connection: 100
Timeouts :- Connection: 300 - Keep-Alive: 5
memory_limit = 756M
opcache.enable = On
gzip compression = enabled

Apache Benchmark Result of Live Server with concurrency 10

$ ab -n 200 -c 10 -s 800 <api_url>
This is ApacheBench, Version 2.3 <$Revision: 1901567 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking <api_url> (be patient)
Completed 100 requests
Completed 200 requests
Finished 200 requests


Server Software:        Apache
Server Hostname:        <api_url>

Concurrency Level:      10
Time taken for tests:   1332.961 seconds
Complete requests:      200
Failed requests:        0
Requests per second:    0.15 [#/sec] (mean)
Time per request:       66648.037 [ms] (mean)
Time per request:       6664.804 [ms] (mean, across all concurrent requests)
Transfer rate:          429.30 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        3   21  32.2      5      91
Processing: 17982 65490 4646.0  65398   75602
Waiting:    17886 65226 4614.8  65095   75300
Total:      17986 65511 4649.5  65402   75607

Percentage of the requests served within a certain time (ms)
  50%  65402
  66%  66109
  75%  66587
  80%  66991
  90%  70792
  95%  72711
  98%  74708
  99%  75212
 100%  75607 (longest request)

Apache Benchmark Result of Local Server with concurrency 10

$ ab -n 200 -c 10 -s 800 <api_url>
This is ApacheBench, Version 2.3 <$Revision: 1879490 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking <api_url> (be patient)
Completed 100 requests
Completed 200 requests
Finished 200 requests


Server Software:        Apache/2.4.52
Server Hostname:        <api_url>

Concurrency Level:      10
Time taken for tests:   13.210 seconds
Complete requests:      200
Failed requests:        0
Requests per second:    15.14 [#/sec] (mean)
Time per request:       660.524 [ms] (mean)
Time per request:       66.052 [ms] (mean, across all concurrent requests)
Transfer rate:          278.93 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:   237  644 126.4    666     933
Waiting:      229  641 125.6    666     922
Total:        237  644 126.4    666     933

Percentage of the requests served within a certain time (ms)
  50%    666
  66%    707
  75%    724
  80%    734
  90%    791
  95%    845
  98%    908
  99%    932
 100%    933 (longest request)

Apache Benchmark Result of Live Server with concurrency 3

$ ab -n 200 -c 3 -s 800 <api_url>
This is ApacheBench, Version 2.3 <$Revision: 1901567 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking <api_url> (be patient)
Completed 100 requests
Completed 200 requests
Finished 200 requests


Server Software:        Apache
Server Hostname:        <api_url>

Concurrency Level:      3
Time taken for tests:   1275.103 seconds
Complete requests:      200
Failed requests:        0
Requests per second:    0.16 [#/sec] (mean)
Time per request:       19126.552 [ms] (mean)
Time per request:       6375.517 [ms] (mean, across all concurrent requests)
Transfer rate:          448.78 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        3    5   5.0      4      38
Processing: 13393 18910 1324.7  18391   21411
Waiting:    13344 18825 1321.8  18305   21360
Total:      13399 18914 1324.4  18395   21416

Percentage of the requests served within a certain time (ms)
  50%  18395
  66%  19192
  75%  20377
  80%  20592
  90%  20842
  95%  20964
  98%  21174
  99%  21297
 100%  21416 (longest request)

Updated :-

Server MPM : prefork
Server API : CGI/FastCGI

**Issue :- ** when we send multiple requests at the same time, than why magento 2 takes to much time to respond to us.

what want wrong for me? please help me.

please guide me to improve performance of Magento 2.

2 Answers 2

0

On your local development server, drop your Apache Concurrency Level to 3 because you have only 4 CORES. What is your new timing to completion?

View profile for contact info.

0

Your Live Server does not have 56 cores according to this URL.

https://www.intel.com/content/www/us/en/products/sku/81059/intel-xeon-processor-e52697-v3-35m-cache-2-60-ghz/specifications.html

Drop your concurrency from 25 to 10 and rerun your test.

What is the new time to completion? Thank You.

5
  • hey I added benchmark result with concurrency 10, see my edited question Commented Jan 16, 2023 at 11:55
  • @HarshPatel Let's try LIVE / Prod server with concurrency of 3 and rerun your test. Please post results for comparison. We will work on DEV on another day please. View profile for contact info. Commented Jan 16, 2023 at 15:18
  • checkout I updated test result with concurrency level 3 Commented Jan 17, 2023 at 4:55
  • 1
    I also post Server MPM & Server API details at ending of question Commented Jan 17, 2023 at 11:29
  • @HarshPatel Could we schedule a SKYPE TALK session for 5 minutes to review the PROD progress from 25 - 10 - 3 concurrent processing? Skype ID is [email protected] Thanks Commented Jan 17, 2023 at 15:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.