Return-Path: X-Original-To: apmail-httpd-users-archive@www.apache.org Delivered-To: apmail-httpd-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C89C999B8 for ; Sat, 11 Feb 2012 20:18:25 +0000 (UTC) Received: (qmail 86560 invoked by uid 500); 11 Feb 2012 20:18:23 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 86501 invoked by uid 500); 11 Feb 2012 20:18:22 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 86493 invoked by uid 99); 11 Feb 2012 20:18:21 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 11 Feb 2012 20:18:21 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=NORMAL_HTTP_TO_IP,RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of rainer.jung@kippdata.de designates 195.227.30.149 as permitted sender) Received: from [195.227.30.149] (HELO mailserver.kippdata.de) (195.227.30.149) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 11 Feb 2012 20:18:15 +0000 Received: from [10.0.110.6] ([192.168.2.104]) by mailserver.kippdata.de (8.13.5/8.13.5) with ESMTP id q1BKHrTS011424 for ; Sat, 11 Feb 2012 21:17:54 +0100 (CET) Message-ID: <4F36CCEB.80003@kippdata.de> Date: Sat, 11 Feb 2012 21:17:47 +0100 From: Rainer Jung User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:9.0) Gecko/20111222 Thunderbird/9.0.1 MIME-Version: 1.0 To: users@httpd.apache.org References: <4F365E3D.9090805@kippdata.de> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Subject: Re: [users@httpd] concurrent connections and netstat 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 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 for more info. To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org " from the digest: users-digest-unsubscribe@httpd.apache.org For additional commands, e-mail: users-help@httpd.apache.org