Re: concurrent connections and netstat

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11.02.2012 21:05, Ishita Kapadiya wrote:
Hi Rainer,

Thanks.  I forogt to mention that I was using HTTPS with Keepalive
disabled. Based on your hint, i again tried to monitor netstat o/p and
mod_status o/p.
I have used below command for ab script -  ./ab -n 10000 -c 50
http://1.2.3.4/xyz.html
I was monitoring netstat o/p through script each second - netstat
-antp | grep -w 1.2.3.4:80 | grep EST | wc -l
Here is the o/p -
16
27
13
13
8
18
9
18
16
2
16
18
13
22
18
31
60
0
0
14
115
0
13
7
0
72
0
111
0
0
65

When I was monitoring mod_status o/p it was showing almost 45-49
requests currently being processed which is matching with 50
concurrent users test.

Good, so Apache itself is seeing the kind of load you try to produce with ab.

Of course, as expected no "K" present in the
o/p as i have disabled keepalive. All req were showing as etiher "C"
or "W"

OK

My concern is netstat o/p shown above. why there is so much variation?
Even if we take avg. of above values, it comes to 23.06 connections!

Please provide your thoughts.

Actually no idea. The consistency of the "-c 50" switch with mod_status at the other end suggests that something is wrong with the netstat measurement. Have a look at the full output instead of immediately throwing away everything apart from EST.

The numbers bigger than 50 indicate that there might also be connections from some other client involved, the much lower numbers are very strange.

On Sat, Feb 11, 2012 at 7:25 AM, Rainer Jung<rainer.jung@xxxxxxxxxxx>  wrote:
On 11.02.2012 06:11, Ishita Kapadiya wrote:

Hi All,

Recently I did 'ab' test just to check performance of my new setup. so
far, if we want to check concurrent users for that server, we were
using "netstat -an | grep 'EST' | wc -l" to check how many total no of
connections being used. I know we can use mod_status to get the
accurate results. but I am curious to know, how to determine total no
of concurrent connections being served by Apache web server at any
point of time. Even though I have set 50 concurrent users test with
'ab', I hardly see 50 ESTABLISHED connections! Even I checked total no
of CLOSE_WAIT, TIME_WAIT&     ESTABLISHED connections but that was also

not matching with the result of what mod_status was showing.

Can anyone let me know what could be the reason? I want to know how to
determine that MaxClients limit is approaching just by looking into
netstat o/p (or any other command)  without using mod_status.


netstat established and mod_status should show figures close to each other.
The deltas are:

- If using ab without "-k" you are not using HTTP Keep-Alive, i.e. each
request needs to open an new TCP connection. When using "-k", mod_status
shows established connections which did not yet receive any follow-on
requests with a "K"

- When doing HTTPS, SSL handshakes are between connection establishment and
requests

- ab itself is single threaded but very efficient. So if you push
concurrency very far, ab itself will need to process the results send back
from the web server. Concurrency 50 should be fine though.

Can cou give us some numbers? If you let run ab with "-k" for a longer time,
what numbers do you see in netstat, and which number of each letter
typically in the server-status? Are you using HTTPS?

Regards,

Rainer

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux