Re: C as config

2010-06-16 Thread Joe Orton
On Sun, Jun 06, 2010 at 08:53:03PM +0200, Stefan Fritsch wrote: On Sunday 06 June 2010, Brian Pane wrote: As long as the documentation explained to users that they need to have enough memory to accommodate MaxClient * MaxOutputBufferedPerRequest (where the latter is a hypothetical name

Re: C as config

2010-06-16 Thread Graham Leggett
On 16 Jun 2010, at 10:45 AM, Joe Orton wrote: There is already mod_buffer in trunk. From reading the docs, it should be suitable for this purpose. Or is it missing some functionality? You can get many of the benefits of using a memory buffer in the output filter chain very cheaply by

Re: C as config

2010-06-16 Thread Joe Orton
On Wed, Jun 16, 2010 at 12:05:21PM +0200, Graham Leggett wrote: On 16 Jun 2010, at 10:45 AM, Joe Orton wrote: There is already mod_buffer in trunk. From reading the docs, it should be suitable for this purpose. Or is it missing some functionality? You can get many of the benefits of using

Re: C as config

2010-06-16 Thread Graham Leggett
On 16 Jun 2010, at 12:49 PM, Joe Orton wrote: The core output filter should coalesce small writes already and if it's not doing that effeciently that's a bug. Are the tiny files you were seeing getting sendfile()d out bigger than AP_MIN_SENDFILE_BYTES? That sounds like a case for bumping up

Re: C as config

2010-06-15 Thread Jim Jagielski
On Jun 9, 2010, at 12:08 PM, Akins, Brian wrote: On 6/8/10 7:21 PM, Graham Leggett minf...@sharp.fm wrote: That said, if your server doesn't have work to do, ie you're just a bit-shifter, then a simple async loop will win hands down. We also found that even for resource intensive tasks

Re: C as config

2010-06-15 Thread Jim Jagielski
On Jun 6, 2010, at 2:53 PM, Stefan Fritsch wrote: On Sunday 06 June 2010, Brian Pane wrote: On Sun, Jun 6, 2010 at 5:03 AM, Graham Leggett minf...@sharp.fm wrote: [...] We've also been playing with Varnish, one of the cooler things it does is have the ability to suck up an entire response

Re: C as config

2010-06-09 Thread Akins, Brian
On 6/8/10 6:34 PM, Sean Conner s...@conman.org wrote: 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

Re: C as config

2010-06-09 Thread Akins, Brian
On 6/8/10 7:21 PM, Graham Leggett minf...@sharp.fm wrote: That said, if your server doesn't have work to do, ie you're just a bit-shifter, then a simple async loop will win hands down. We also found that even for resource intensive tasks -- like rendering a template or something similar --

Re: C as config

2010-06-08 Thread Dan Poirier
On 2010-06-07 at 17:42, Akins, Brian brian.ak...@turner.com wrote: On 6/7/10 9:16 AM, Dan Poirier poir...@pobox.com 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

Re: C as config

2010-06-08 Thread Akins, Brian
On 6/8/10 8:07 AM, Dan Poirier poir...@pobox.com wrote: That's a shame. I wonder if another embedded language would do better? E.g. mod_perl, mod_python? They've both been around for a while. I wonder why neither has gotten into the server? Lua is leaps and bounds faster than both of those

Re: C as config

2010-06-08 Thread HyperHacker
On Tue, Jun 8, 2010 at 09:34, Akins, Brian brian.ak...@turner.com wrote: On 6/8/10 8:07 AM, Dan Poirier poir...@pobox.com wrote: That's a shame.  I wonder if another embedded language would do better? E.g. mod_perl, mod_python?  They've both been around for a while. I wonder why neither has

Re: C as config

2010-06-08 Thread Sean Conner
It was thus said that the Great Akins, Brian once stated: On 6/7/10 9:16 AM, Dan Poirier poir...@pobox.com 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

Re: C as config

2010-06-08 Thread Graham Leggett
On 07 Jun 2010, at 11:46 PM, Akins, Brian wrote: With multi-core architectures, we're finding that humble worker on our commodity hardware is as fast or faster than our load balancers. +1 We soon found that the web servers spends more time doing context switches than actual work. (Or so

Re: C as config

2010-06-07 Thread Dan Poirier
On 2010-06-04 at 18:21, Akins, Brian brian.ak...@turner.com wrote: Also, I do a good bit with Lua -- in httpd and other projects. Every time I run profiles on this stuff, Lua is always 3 out of the top 5 cpu consumers. And lots of it is just the language itself (all the table look-ups) and we

Re: C as config

2010-06-07 Thread Akins, Brian
On 6/7/10 9:16 AM, Dan Poirier poir...@pobox.com 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?

Re: C as config

2010-06-07 Thread Akins, Brian
On 6/6/10 8:03 AM, Graham Leggett minf...@sharp.fm wrote: With multi-core architectures, we're finding that humble worker on our commodity hardware is as fast or faster than our load balancers. +1 We soon found that the web servers spends more time doing context switches than actual work.

Re: C as config

2010-06-07 Thread Akins, Brian
a dainting task, and one that creates many other issues. Yeah, I thought about that as well. However, I already know C ;) A config/runtime language built using llvm could probably be just as fast as writing straight C. The thing I hate about VCL is that it teases you with being C like

Re: C as config

2010-06-06 Thread Graham Leggett
On 05 Jun 2010, at 12:21 AM, Akins, Brian wrote: So, we thought about wouldn't it just be cool if Apache had VCL. Then I thought, I already know C, why do I need to learn a meta-language that just writes C??? Won't someone think of the users! I could here all of the #httpd folks saying.

Re: C as config

2010-06-06 Thread Brian Pane
On Sun, Jun 6, 2010 at 5:03 AM, Graham Leggett minf...@sharp.fm wrote: [...] We've also been playing with Varnish, one of the cooler things it does is have the ability to suck up an entire response into a RAM buffer and releasing the backend before playing out the response to the browser. I've

Re: C as config

2010-06-06 Thread Stefan Fritsch
On Sunday 06 June 2010, Brian Pane wrote: On Sun, Jun 6, 2010 at 5:03 AM, Graham Leggett minf...@sharp.fm wrote: [...] We've also been playing with Varnish, one of the cooler things it does is have the ability to suck up an entire response into a RAM buffer and releasing the backend

Re: C as config

2010-06-05 Thread Nick Kew
On 5 Jun 2010, at 03:18, Dennis J. wrote: The nginx syntax may look C-like but it really isn't at all. For one thing it's declarative and then you have all kinds of weird behaviors with variables and control structures that make no sense if you're coming from C-like angle. I think what

C as config

2010-06-04 Thread Akins, Brian
anyway, so it was just a matter of porting the Lua helpers into straight C. It took less than 2 hours. We were sort of shocked at the results - 1/3 the memory usage and 50% better performance (you run out of CPU eventually, no matter what you do). Odd thing was, the code in C for the Config

Re: C as config

2010-06-04 Thread Igor Galić
All of you folks who have to answer user questions, go ahead and ready your hate mail :) This is not a hate-mail (: I've been playing some with Varnish (long story) and lots of people seem to like it. The config language (VCL) is just a thin wrapper on top of C. Heck, you can just

Re: C as config

2010-06-04 Thread Paul Querna
On Fri, Jun 4, 2010 at 3:21 PM, Akins, Brian brian.ak...@turner.com wrote: All of you folks who have to answer user questions, go ahead and ready your hate mail :) I've been playing some with Varnish (long story) and lots of people seem to like it.  The config language (VCL) is just a thin

Re: C as config

2010-06-04 Thread Akins, Brian
On 6/4/10 7:30 PM, Paul Querna p...@querna.org wrote: Are you using LuaJIT 2? The performance numbers its putting up seemed very impressive. Yes and meh... -- Brian Akins

Re: C as config

2010-06-04 Thread Dennis J.
On 06/05/2010 12:51 AM, Igor Galić wrote: Not a terribly interesting read, but we are seriously considering just using straight C with some helper functions and macros as the config for one of our projects. And, for the record I was wrong in the past - yes, async is the answer... I've been a

Re: C as config

2010-06-04 Thread Paul Querna
On Jun 4, 2010, at 4:32 PM, Akins, Brian brian.ak...@turner.com wrote: On 6/4/10 7:30 PM, Paul Querna p...@querna.org wrote: Are you using LuaJIT 2? The performance numbers its putting up seemed very impressive. Yes and meh... bummer. The most iteresting thing in this space