Fabricio Chalub | 1 Oct 2002 03:33
Picon

Re: Web Servers


Fred Gilham <gilham <at> csl.sri.com> writes:

> --- BTW it would be really nice if someone could add something to the
> CL-HTTP port patch file to get rid of the 17 in the following lines in
> the CL-HTTP distribution, since this is the second time it's bitten
> me:

I think this message from Pierre Mai contains probably all that it takes to
make CL-HTTP work under CMUCL:

http://groups.google.com/groups?selm=87it9ydkrn.fsf%40orion.bln.pmsf.de&output=gplain

(IIRC, it chokes on smtp/smtp.lisp, but I used to ignore it safely)

CL-HTTP has a somewhat restrictive license, but it may or may not be a
problem for you.

You should also consider Araneida as a choice of web server, it is
really great!  http://araneida.telent.net/.

Hope this helps...

fc
--

-- 
http://raw.no-ip.com/~fc/

Andras Simon | 1 Oct 2002 11:29
Picon
Favicon

Re: Web Servers

> Well, given that there are now too many web servers for CMUCL, I'm
> forced to actually choose which one I want.

Let me ask a slightly more specific question: is one of the free
web servers for CMUCL (Araneida and especially Portable Aserve) a
viable alternative to apache &al. for db (PostgreSQL and MySQL) backed
websites? Are there any multiprocessing or other issues one should
expect to run into? If so, can they be circumvented somehow? Right now
I'm using ACL and Aserve in a university setting, but for commercial
stuff ACL is not an option for me.

To put this question in context: I occasionally work for a company
that is of course deeply entrenched in the perl/php/Java servlets
world, and I wonder if I can argue there with clear conscience for
occasionally using CL instead of, say, Java. 

Andras

Edi Weitz | 1 Oct 2002 11:49
Picon
Favicon

Re: Web Servers


Andras Simon <andras <at> renyi.hu> writes:

> > Well, given that there are now too many web servers for CMUCL, I'm
> > forced to actually choose which one I want.
> 
> Let me ask a slightly more specific question: is one of the free
> web servers for CMUCL (Araneida and especially Portable Aserve) a
> viable alternative to apache &al. for db (PostgreSQL and MySQL) backed
> websites? Are there any multiprocessing or other issues one should
> expect to run into? If so, can they be circumvented somehow? Right now
> I'm using ACL and Aserve in a university setting, but for commercial
> stuff ACL is not an option for me.
> 
> To put this question in context: I occasionally work for a company
> that is of course deeply entrenched in the perl/php/Java servlets
> world, and I wonder if I can argue there with clear conscience for
> occasionally using CL instead of, say, Java. 

I don't have much experience with Araneida and Portableaserve although
I seem to remember that at least in older versions of AllegroServe the
number of child processes (speaking in Apache terminology) was fixed
while in Apache you have parameters like MaxClients, MinSpareServers,
and MaxSpareServers such that the server can adjust to heavy-load
situations. Or can we assume that the listeners are lightweight enough
so that we don't have too care if 200 of them are just idle?

Maybe you should also check out Marc Battyani's mod_lisp at

  <http://www.fractalconcept.com/asp/html/mod_lisp.html>
(Continue reading)

Christian Lynbech | 1 Oct 2002 15:48
Picon

Re: compilation problem with 18d


I found the problem

There were several instances of forms like

        (lambda (&rest) ....)

They were properly reported as errors, but scrolled off screen, and
since the compiler went into the break loop I didn't get the final
report of the errors.

------------------------+-----------------------------------------------------
Christian Lynbech       | Ericsson Telebit, Skanderborgvej 232, DK-8260 Viby J
Phone: +45 8938 5244    | email: christian.lynbech <at> ted.ericsson.se
Fax:   +45 8938 5101    | web:   www.ericsson.com
------------------------+-----------------------------------------------------
Hit the philistines three times over the head with the Elisp reference manual.
                                        - petonic <at> hal.com (Michael A. Petonic)

Andras Simon | 1 Oct 2002 16:04
Picon
Favicon

Re: Web Servers

Edi Weitz <edi <at> agharta.de> writes:

> I don't have much experience with Araneida and Portableaserve although
> I seem to remember that at least in older versions of AllegroServe the
> number of child processes (speaking in Apache terminology) was fixed
> while in Apache you have parameters like MaxClients, MinSpareServers,
> and MaxSpareServers such that the server can adjust to heavy-load
> situations. Or can we assume that the listeners are lightweight enough
> so that we don't have too care if 200 of them are just idle?

This is what top says for Aserve/ACL with 25 (idle) listeners (Aserve terminology)

  PID USER     PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME COMMAND
15772 lispweb    9   0  128M 128M  6112 S     0.0  3.6   0:33 alisp

So even if CPU usage goes up exponentially, there's nothing to worry about :-)
(The situation might be different with Portable Aserve/CMUCL though.)

Andras

Fred Gilham | 1 Oct 2002 18:50
Favicon

Re: Web Servers


OK, I've tried a couple web servers --- portableaserve and CL-HTTPD.

Both are multiprocessing web servers.  Both seem to hang when getting
requests from more than one client at a time.  I think there's
something wrong with the CMUCL multiprocessing.  I notice this same
kind of thread starvation in other things such as graphics
applications.  (I think this has been a problem for a long time, but I
have no idea exactly what it is.  If anyone is curious, I have code
that runs under Garnet that demonstrates the problem using the Garnet
animation interactors.)

Is anyone actually running a web server under CMUCL?  What are you
running?

--

-- 
Fred Gilham                                        gilham <at> csl.sri.com
...Please don't assume Lisp is only useful for Animation and Graphics,
AI, Bioinformatics, B2B and E-Commerce, Data Mining, EDA/Semiconductor
applications, Expert Systems, Finance, Intelligent Agents, Knowledge
Management, Mechanical CAD, Modeling and Simulation, Natural Language,
Optimization, Research, Risk Analysis, Scheduling, Telecom, and Web
Authoring just because these are the only things they happened to
list.                                                  -- Kent Pitman

Tim Moore | 1 Oct 2002 19:19

Re: Web Servers


A couple of general observations about CMUCL multiprocessing:
It's cooperative, not timesliced.  You can try enabling sigalrm based
scheduling if you're adventurous.  This may or may not be an issue for web
serving.

Last I checked, the whole system will block on a socket write, which can
definitely cause problems when webserving.

Overhauling CMUCL's MP would definitely be a desirable project...

Tim

On Tue, 1 Oct 2002, Fred Gilham wrote:

> 
> OK, I've tried a couple web servers --- portableaserve and CL-HTTPD.
> 
> Both are multiprocessing web servers.  Both seem to hang when getting
> requests from more than one client at a time.  I think there's
> something wrong with the CMUCL multiprocessing.  I notice this same
> kind of thread starvation in other things such as graphics
> applications.  (I think this has been a problem for a long time, but I
> have no idea exactly what it is.  If anyone is curious, I have code
> that runs under Garnet that demonstrates the problem using the Garnet
> animation interactors.)
> 
> Is anyone actually running a web server under CMUCL?  What are you
> running?
> 
(Continue reading)

Edi Weitz | 1 Oct 2002 20:17
Picon
Favicon

Re: Web Servers


Tim Moore <moore <at> bricoworks.com> writes:

> Overhauling CMUCL's MP would definitely be a desirable project...

I thought this has been done already:

  <http://www.scieneer.com/scl/>

Edi.

Edi Weitz | 1 Oct 2002 20:16
Picon
Favicon

Re: Web Servers


Fred Gilham <gilham <at> csl.sri.com> writes:

> Both are multiprocessing web servers.  Both seem to hang when getting
> requests from more than one client at a time.  I think there's
> something wrong with the CMUCL multiprocessing.  I notice this same
> kind of thread starvation in other things such as graphics
> applications.  (I think this has been a problem for a long time, but I
> have no idea exactly what it is.  If anyone is curious, I have code
> that runs under Garnet that demonstrates the problem using the Garnet
> animation interactors.)

I haven't experienced this until now. Curious as I am I downloaded the
newest version of Portableaserve and did some naïve benchmarks with
Apache's ab tool - Apache 1.3.26 vs. Portableaserve 1.2.12c on CMUCL
18d, both on Linux.

Both serve the same page, namely the welcome page from example.cl
which comes with Portableaserve. I emulated the dynamic behaviour of
this page (showing the process ID, the host name and some other stuff)
by running the page served by Apache through PHP so it provides
approximately the same information.

Apache is about two times as fast, but this is what I would have
expected - the Lisp approach will shine if you're doing more
complicated stuff. However, I wouldn't say that CMUCL seems to hang
here. (Of course it will hang if you increase the concurrency level -
but that's due to the fixed number of listeners mentioned earlier in
this thread.)

(Continue reading)

Fred Gilham | 1 Oct 2002 20:46
Favicon

Re: Web Servers


Tim wrote:

> Last I checked, the whole system will block on a socket write, which
> can definitely cause problems when webserving.

Well, checking CL-HTTPD's CMUCL code I noticed the following under 
cl-http-70-23/cmucl/server/tcp-interface-mp.lisp:

		       (let ((stream (www-utils::make-tcp-stream new-fd port)))
			 ;; Make it non-blocking.
----->			 #+nil
			 (unix:unix-fcntl new-fd unix:f-setfl unix:fndelay)
			 (listen-for-connection stream port)))))

someone has commented out the part that makes the socket use
nonblocking I/O.

So I went in there and took out the #+nil, and things don't seem to
hang --- yet.  In fact, it seems quite brisk.

I've also uncommented start-sigalrm-yield in cmucl/start.lisp and set
it as follows:

  (mp::start-sigalrm-yield 1 0)

This may not be necessary; I tried it before the above.

So things might not be as bad as they seemed.

(Continue reading)


Gmane