Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 86171 invoked from network); 5 Jul 2005 10:04:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 5 Jul 2005 10:04:54 -0000 Received: (qmail 4091 invoked by uid 500); 5 Jul 2005 10:04:51 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 4020 invoked by uid 500); 5 Jul 2005 10:04:48 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Id: Delivered-To: mailing list dev@apr.apache.org Delivered-To: moderator for dev@apr.apache.org Received: (qmail 38803 invoked by uid 99); 4 Jul 2005 22:24:57 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Mime-Version: 1.0 (Apple Message framework v730) In-Reply-To: <20050704091821.GA20411@redhat.com> References: <028168E4-9F12-4CD1-887C-AE86BFAC4CCD@apache.org> <20050704091821.GA20411@redhat.com> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Brian Pane Subject: poll on OS X Re: pollset initialization within apr_file_open()? Date: Mon, 4 Jul 2005 15:25:14 -0700 To: dev@apr.apache.org X-Mailer: Apple Mail (2.730) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gs3.inmotionhosting.com X-AntiAbuse: Original Domain - apr.apache.org X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [47 12] X-AntiAbuse: Sender Address Domain - brianp.net X-Source: X-Source-Args: X-Source-Dir: X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N On Jul 4, 2005, at 2:18 AM, Joe Orton wrote: > On Sun, Jul 03, 2005 at 04:27:05PM -0700, Brian Pane wrote: > >> I just did some performance profiling of httpd-2.1 for the first time >> in a long while. >> >> One of the odd things I noticed is that apr_file_open() appears to >> spend half its time >> in a call to apr_pollset_create(). >> >> The pollset creation can be expensive, especially on platforms where >> it's implemented using /dev/poll or kqueue. And as far as I can >> tell. >> the pollset is only used in the special case of >> apr_wait_for_io_or_timeout() where the caller wants to wait on a >> file. >> > > Note that this problem only affects the very small number of platforms > without a (working) poll() implementation. Ah, that explains it: I'm using OS X 10.4, and this recent change disabled the use of poll in APR on Darwin: I can develop a patch to do a lazy initialization of the pollset within the apr_file_t, which should fix the httpd performance problems. However, one of the later comments in bug 34332 notes that "disabling poll() may not be necessary" on Darwin after all. If anybody is actively looking at the possibility of reenabling poll() on Darwin, please let me know and I'll hold off on implementing the lazy-initialization fix for now. Thanks, Brian