Return-Path: Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 51651 invoked by uid 500); 25 Aug 2003 19:45:54 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list dev@httpd.apache.org Delivered-To: moderator for dev@httpd.apache.org Received: (qmail 26960 invoked from network); 25 Aug 2003 18:44:11 -0000 X-Authentication-Warning: kaiken.cse.ucsc.edu: txu owned process doing -bs Date: Mon, 25 Aug 2003 11:43:36 -0700 (PDT) From: Teng Xu To: "William A. Rowe, Jr." cc: dev@httpd.apache.org, Greg Stein , , , Subject: Re: Strangely long poll() times In-Reply-To: <5.2.0.9.2.20030823013018.0164e058@pop3.rowe-clan.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N On Sat, 23 Aug 2003, William A. Rowe, Jr. wrote: > At 06:59 PM 8/22/2003, Jim Whitehead wrote: > > >>From what we can tell, the call sequence looks like this: > > > >method_propfind --> ap_xml_parse_input --> ap_get_brigade --> > >core_input_filter --> apr_bucket_read --> socket_bucket_read --> > >apr_socket_recv --> apr_wait_for_io_or_timeout --> apr_poll --> poll > > > >What we found was that just poll() was taking about 31milliseconds, and the > >rest of the functions took only microseconds. Poll acts somewhat like > >select(), and we verified that there was only one file description active at > >the time. Both client and server were on the same local subnet (100Base-T > >wiring), and the PROPFIND request body was relatively small, around > >1500-2500 bytes (we tested for different numbers of properties being > >requested by PROPFIND, hence the variation). > > > >Strangely, when we request 1, 2, 3, ... or 14 properties per request, we see > >this behavior (long poll() response times). But, as soon as we request 15 > >properties, things speed up dramatically, to appx. 3-5ms. > > Sure sounds like nagling is turned on on the client side. I seems not the effect of nagling, as the experiment data almost didn't change after the nagle algorithm was disabled (the TCP_NODELAY is "on"). To make clear what happened in the client side, I dived into neon library and found the call sequence looks like this: ne_request_dispatch --> ne_begin_request --> send_request --> open_connection --> do_connect --> ne_sock_connect --> select As you can imagine, the strange behavior on the client side is very similar to that on server side, as the select() call was taking about 35 milliseconds and the rest of the functions took only microseconds. -Teng