0

What i have done :

  • I have used following ab command :

ab -n 1000 -c 100 http://192.168.101.143:8558/num?num=5

  • Here, I am trying to generate 1000 http request , 100 concurrent process, port is 8558, and i want factorial of 5 from my own web server .

  • Another side, My own Web Server is waiting for request at that IP address port:8558 and when we execute the ab command my own server accept the requests and did process gives response factorial of 5 but some of 10-20 request fails every time in native Linux system.

  • But When, I have run my own server on native windows system, it give 1000 correct response with 100 concurrent process on time without fail any request.

Problem:

  • In windows 100 concurrent process(thread) working fine but In Linux some request fails, Why?
  • How to solve this issue for Linux?
  • Is there any socket related issue ?

When Server on in Windows Platform:

This is ApacheBench, Version 2.3 <$Revision: 1528965 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 192.168.101.143 (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:        
Server Hostname:        192.168.101.143
Server Port:            8558

Document Path:          /num?num=5
Document Length:        3 bytes

Concurrency Level:      100
Time taken for tests:   1.350 seconds
Complete requests:      1000
Failed requests:        0
Total transferred:      123000 bytes
HTML transferred:       3000 bytes
Requests per second:    652.93 [#/sec] (mean)
Time per request:       155.493 [ms] (mean)
Time per request:       1.550 [ms] (mean, across all concurrent requests)
Transfer rate:          75.20 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    2   1.6      1      12
Processing:     4   74 117.5     25    1803
Waiting:        2   56  74.4     16    1281
Total:          5   150 117.8     26    1810

Percentage of the requests served within a certain time (ms)
  50%     26
  66%     42
  75%     78
  80%     93
  90%    171
  95%    218
  98%    358
  99%    536
 100%   1810 (longest request)

When Server Running in Linux Platform:

This is ApacheBench, Version 2.3 <$Revision: 1528965 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 192.168.101.143 (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:        
Server Hostname:        192.168.101.143
Server Port:            8558

Document Path:          /num?num=5
Document Length:        3 bytes

Concurrency Level:      100
Time taken for tests:   9.899 seconds
Complete requests:      1000
Failed requests:        13
   (Connect: 0, Receive: 0, Length: 13, Exceptions: 0)
Total transferred:      119802 bytes
HTML transferred:       2922 bytes
Requests per second:    102.91 [#/sec] (mean)
Time per request:       120.934 [ms] (mean)
Time per request:       1.299 [ms] (mean, across all concurrent requests)
Transfer rate:          50.19 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    4   3.0      3      21
Processing:     2  346 2206.7      7   18823
Waiting:        0   76 657.4      6    6371
Total:          3   90 2206.7     10   18827

Percentage of the requests served within a certain time (ms)
  50%     10
  66%     12
  75%     15
  80%     17
  90%     26
  95%     39
  98%   6341
  99%  18820
 100%  18827 (longest request)
  • What server are you using. Is this apache 2.2/2.4 etc? Also, things like this are typically configuration related ie if this is apache what MPM module are you using and what's it's configuration. – Harry Apr 12 '16 at 07:42
  • @ Harry : Server version: Apache/2.4.7 (Ubuntu) and Server MPM: event . Is event,prefork,worker effect on only Linux because when my server run from windows and i am executing this command from Ubantu it is working fine but when my server running in ubantu, this command fails some request . – Dhvanish Thakkar Apr 12 '16 at 08:22
  • I don't know what happening but if you have solution or some suggestion please comment here , or share some link related to this issue , so from that i can research and solve this problem. – Dhvanish Thakkar Apr 12 '16 at 08:27
  • Are you running the test from the same server the apache server is running on when using Ubuntu? Please post the config. – Harry Apr 12 '16 at 08:35
  • yes, both my apache sever and My web-server running in same Ubantu 14.04 and request fails , also i try from another linux ubantu vdi ,from that i run Apache and main VDI run my web server but same issue , also same server configuration used in windows and it is working :( – Dhvanish Thakkar Apr 12 '16 at 08:40
  • Also i cant post server configuration because its huge amount of code but i am sure problem in linux only , i think in linux is unable to open that much of sockets or concurrent process or some set of limits there. – Dhvanish Thakkar Apr 12 '16 at 08:49
  • Also, I have checked process limits using ulimit command and result : max user processes (-u) 15844 – Dhvanish Thakkar Apr 12 '16 at 08:53
  • 1
    Any hardware issues on your Linux server? CPU overheating, hard drive problems and broken network ports/cables can all cause increased latency, even when doing the easiest things... – thkala Apr 13 '16 at 07:35
  • @thkala : In linux sever hardware side there is no problem , I have checked all the things(Using different systems) , working fine but some other issue but i am sure that is OS related issue !! thank you for giving response !! :) – Dhvanish Thakkar Apr 13 '16 at 09:45
  • 1
    Can you try running that test on the server itself, pointing to localhost? – thkala Apr 14 '16 at 11:21
  • @ thkala : Before when i test my web server in Linux as guest (In Virtual Box) , So, it was fails 50 concurrent process but after reading your comment hardware latency and all i tried this server in native Linux system and it is working up to 70 concurrent process. thank you for that !! – Dhvanish Thakkar Apr 15 '16 at 05:52
  • But now my requirement is 100 concurrent process should be handle in Linux. And When I have checked my web server native windows system up 100 concurrent process is working without any issue but in native Linux when i tried for 80,90,100 concurrent process , it was fails. – Dhvanish Thakkar Apr 15 '16 at 05:54
  • Now I have update this question !! – Dhvanish Thakkar Apr 15 '16 at 05:59
  • Now my native Linux System configuration is : Operating System : Linux Ubantu 14.04 - 64 bit. Memory Allocation : 8192 MB . Processor : Intel(R) Core(TM) i3-4130 CPU @ 3.40GHz (4 CPUs), ~3.4GHz – Dhvanish Thakkar Apr 15 '16 at 06:18
  • 1
    You might want to tune your linux server for such kind of loads. Refer : http://serverfault.com/questions/10852/what-limits-the-maximum-number-of-connections-on-a-linux-server – Roshith Apr 15 '16 at 06:24
  • @Roshith : Thank you so much for the sharing link ! Its very useful link for me !! I am referring that and try to get my answer ! after that i will update here what happened :) – Dhvanish Thakkar Apr 15 '16 at 06:38
  • Were you able to resolve the issue ? If yes please post the answer and close the loop. – Roshith Apr 15 '16 at 09:45

1 Answers1

0
  • In this case, I am using Virtual Linux and in that i am running my web server. so when I am execute my ab command from the another system. some what problem in port forwarding in Virtual box(NAT,Bridge,Host Only) . so, some of the request fails.

  • After that, When i have tried run my web server on host Linux and i have execute ab command in another system , i got perfect output in 100 concurrent process.

  • So from this , I conclude that this type of load testing we need to see the hardware latency as well as port forwarding issue also is there when you are testing you web server from Virtual box but in host Linux system there is no issue.