Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 39578 invoked from network); 8 Jun 2010 22:35:06 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 8 Jun 2010 22:35:06 -0000 Received: (qmail 55836 invoked by uid 500); 8 Jun 2010 22:35:06 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 55774 invoked by uid 500); 8 Jun 2010 22:35:06 -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: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 55762 invoked by uid 99); 8 Jun 2010 22:35:06 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Jun 2010 22:35:06 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of sean@conman.org designates 66.252.224.242 as permitted sender) Received: from [66.252.224.242] (HELO brevard.conman.org) (66.252.224.242) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Jun 2010 22:34:59 +0000 Received: by brevard.conman.org (Postfix, from userid 500) id 1AD5D1B183E9; Tue, 8 Jun 2010 18:34:38 -0400 (EDT) Date: Tue, 8 Jun 2010 18:34:38 -0400 From: Sean Conner To: dev@httpd.apache.org Subject: Re: C as config Message-ID: <20100608223438.GA19920@brevard.conman.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i X-Virus-Checked: Checked by ClamAV on apache.org It was thus said that the Great Akins, Brian once stated: > On 6/7/10 9:16 AM, "Dan Poirier" wrote: > > Did you profile httpd? I'm wondering if you had a few non-trivial hooks > > in lua, if it would be a significant part of the CPU consumption, or > > would it be swamped by the rest of the processing that always goes on > > for a request? > > > Increasingly, httpd is just there to provide a base to run Lua stuff for us. > You'd be surprised how easily problems get solved with a few if's and else's > instead of mounds of rewrite rules. > > At "normal" load it doesn't really matter - the trade off is worth it > ("speed" vs simplicity). However, as the servers get more and more loaded, > Lua takes a rather large percentage of the CPU. And it's the "Lua stuff" not > the part that does work. The constant string hashing, metatable lookups, > etc. If your platform is x86, have you considered testing with LuaJIT? It compiles Lua code directly into x86 code and is a drop-in replacement for lua (just link against libluajit instead of liblua). The few tests I've done have been impressive [1]. -spc [1] http://boston.conman.org/2010/02/03.2