From fahree at gmail.com Fri Aug 13 02:10:11 2010 From: fahree at gmail.com (=?ISO-8859-1?Q?Far=E9?=) Date: Thu, 12 Aug 2010 22:10:11 -0400 Subject: [hunchentoot-devel] 'max-threads' behavior for Hunchentoot In-Reply-To: References: <96F4A9B1-5603-4DE1-9144-415C9251DAA5@itasoftware.com> <4C05217C.4040406@itasoftware.com> <16493326-0713-4954-8976-19ED0C10D74C@itasoftware.com> <836C1566-0760-4000-AAA9-440FBAAB51EA@itasoftware.com> <586901B0-D79A-4AE5-908F-4FFEE9E3AF38@itasoftware.com> <18913F0E-C4B7-4044-8D02-45BCBBA0CDDE@itasoftware.com> Message-ID: Will do. I see no mention of this repository on the web page for the project: http://weitz.de/hunchentoot/ and it looked like that darcs repository was the closest thing to an upstream, but it might only have recorded public numbered releases. Is the bknr thirdparty svn now the official upstream for all ediware projects? Or at least the official "we're as close to Edi's disk as is otherwise published" mirror? i.e. is that also where I should be getting chunga, drakma, flexi-streams, cl-ppcre, cl-fad, cl-who, etc.? Are there also other software of which you are de facto maintainer, or should I fetch dependencies from their respective upstreams? Thanks a lot for your time! [ Fran?ois-Ren? ?VB Rideau | Reflection&Cybernethics | http://fare.tunes.org ] No woman ever falls in love with a man unless she has a better opinion of him than he deserves. ? Edgar Watson Howe On 7 July 2010 17:38, Edi Weitz wrote: > Hi Far?, > > The patch standards you asked for are here: > > http://weitz.de/patches.html > > And the Subversion repository Hans mentioned is here: > > http://bknr.net/trac/browser/trunk/thirdparty/hunchentoot > > Thanks, > Edi. > > > On Wed, Jul 7, 2010 at 11:32 PM, Hans H?bner wrote: >> Hi Far?, >> >> thank you for consolidating the patch. ?Please resubmit without the >> xcvb changes (we discussed this before) and make sure that you are >> submitting a patch against the subversion repository, as we do not use >> the darcs repository and do not know whether it is up to date or >> diverged. >> >> As a general note: ?It is much easier to review patches if they do not >> contain arbitary whitespace changes. >> >> Thanks, >> Hans >> >> On Wed, Jul 7, 2010 at 22:51, Far? wrote: >>> Dear Hunchentoot maintainers, >>> >>> I've merged Scott's changes with the latest upstream hunchentoot from >>> darcs (version 1.1.0 from 2010-01-09) and my XCVB changes. >>> >>> Here it is attached. >>> >>> Can you either apply or tell me how I may change the thing to fit your >>> standards? >>> >>> [ Fran?ois-Ren? ?VB Rideau | Reflection&Cybernethics | http://fare.tunes.org ] >>> Too many people are thinking of security instead of opportunity. ?They seem >>> more afraid of life than death. >>> ? ? ? ? ? ? ? ?? James F. Byrnes >>> >>> _______________________________________________ >>> tbnl-devel site list >>> tbnl-devel at common-lisp.net >>> http://common-lisp.net/mailman/listinfo/tbnl-devel >>> >> >> _______________________________________________ >> tbnl-devel site list >> tbnl-devel at common-lisp.net >> http://common-lisp.net/mailman/listinfo/tbnl-devel >> >> > > _______________________________________________ > tbnl-devel site list > tbnl-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/tbnl-devel > From hans.huebner at gmail.com Fri Aug 13 08:26:15 2010 From: hans.huebner at gmail.com (=?ISO-8859-1?Q?Hans_H=FCbner?=) Date: Fri, 13 Aug 2010 10:26:15 +0200 Subject: [hunchentoot-devel] 'max-threads' behavior for Hunchentoot In-Reply-To: References: <96F4A9B1-5603-4DE1-9144-415C9251DAA5@itasoftware.com> <4C05217C.4040406@itasoftware.com> <16493326-0713-4954-8976-19ED0C10D74C@itasoftware.com> <836C1566-0760-4000-AAA9-440FBAAB51EA@itasoftware.com> <586901B0-D79A-4AE5-908F-4FFEE9E3AF38@itasoftware.com> <18913F0E-C4B7-4044-8D02-45BCBBA0CDDE@itasoftware.com> Message-ID: Hi Far?, On Fri, Aug 13, 2010 at 04:10, Far? wrote: > Will do. I see no mention of this repository on the web page for the project: > ? http://weitz.de/hunchentoot/ > and it looked like that darcs repository was the closest thing to an > upstream, but it might only have recorded public numbered releases. The official upstream consists of the release tarballs. Development (currently) happens in the bknr Subversion repository, and patches against either of the two will (currently) be okay. As the darcs repository is not maintained by Edi or me, we can't tell whether it is up to date. > Is the bknr thirdparty svn now the official upstream for all ediware projects? > Or at least the official "we're as close to Edi's disk as is otherwise > published" mirror? Edi and I commit changes to the bknr Subversion before releasing, but usually Edi makes the releases shortly after the commits. > i.e. is that also where I should be getting chunga, drakma, > flexi-streams, cl-ppcre, cl-fad, cl-who, etc.? The release tarballs found at weitz.de are the safest bet. > Are there also other software of which you are de facto maintainer, or > should I fetch dependencies from their respective upstreams? I am not aware of any abandoned projects that Edi's software depends on and that are de facto maintained by Edi, but he'll comment if I'm wrong. -Hans From edi at agharta.de Fri Aug 13 10:28:07 2010 From: edi at agharta.de (Edi Weitz) Date: Fri, 13 Aug 2010 12:28:07 +0200 Subject: [hunchentoot-devel] 'max-threads' behavior for Hunchentoot In-Reply-To: References: <96F4A9B1-5603-4DE1-9144-415C9251DAA5@itasoftware.com> <4C05217C.4040406@itasoftware.com> <16493326-0713-4954-8976-19ED0C10D74C@itasoftware.com> <836C1566-0760-4000-AAA9-440FBAAB51EA@itasoftware.com> <586901B0-D79A-4AE5-908F-4FFEE9E3AF38@itasoftware.com> <18913F0E-C4B7-4044-8D02-45BCBBA0CDDE@itasoftware.com> Message-ID: This is all correct except that in the case of Hunchentoot I'm lacking somewhat behind in terms of the next release. Please send patches against the bknr repository and not against the latest release (which is from January). Thanks, Edi. On Fri, Aug 13, 2010 at 10:26 AM, Hans H?bner wrote: > Hi Far?, > > On Fri, Aug 13, 2010 at 04:10, Far? wrote: >> Will do. I see no mention of this repository on the web page for the project: >> ? http://weitz.de/hunchentoot/ >> and it looked like that darcs repository was the closest thing to an >> upstream, but it might only have recorded public numbered releases. > > The official upstream consists of the release tarballs. ?Development > (currently) happens in the bknr Subversion repository, and patches > against either of the two will (currently) be okay. ?As the darcs > repository is not maintained by Edi or me, we can't tell whether it is > up to date. > >> Is the bknr thirdparty svn now the official upstream for all ediware projects? >> Or at least the official "we're as close to Edi's disk as is otherwise >> published" mirror? > > Edi and I commit changes to the bknr Subversion before releasing, but > usually Edi makes the releases shortly after the commits. > >> i.e. is that also where I should be getting chunga, drakma, >> flexi-streams, cl-ppcre, cl-fad, cl-who, etc.? > > The release tarballs found at weitz.de are the safest bet. > >> Are there also other software of which you are de facto maintainer, or >> should I fetch dependencies from their respective upstreams? > > I am not aware of any abandoned projects that Edi's software depends > on and that are de facto maintained by Edi, but he'll comment if I'm > wrong. > > -Hans > > From jetmonk at gmail.com Wed Aug 18 23:53:36 2010 From: jetmonk at gmail.com (JTK) Date: Wed, 18 Aug 2010 13:53:36 -1000 Subject: [hunchentoot-devel] serious H'toot performance problem on CCL OSX ? Message-ID: <84A7D5E8-3D4D-472D-8D98-AEA021909765@gmail.com> Hello, I'm finding that the speed of hunchentoot falls drastically for more than 1 simultaneous connection, at least for CCL on OS X. And more than a few connections just fails. I downloaded the latest svn version from http://bknr.net/html/ To reduce any complicating factors, I loaded just h'toot and ran ccl on the shell command line, not in slime. I tried a simple page: CL-USER> (hunchentoot:start (make-instance 'hunchentoot:acceptor :port 4242)) # CL-USER> (hunchentoot:define-easy-handler (say-yo :uri "/yo") () (setf (hunchentoot:content-type*) "text/plain") "Yo! This. Is. Content") SAY-YO Then I tried the ab (apache bench) benchmark with c=1 (1 connection), and 500 iterations: $ ab -n 500 -c 1 http://127.0.0.1:4242/yo HTML transferred: 10500 bytes Requests per second: 138.26 [#/sec] (mean) <- ##### note speed ###### Time per request: 7.233 [ms] (mean) Time per request: 7.233 [ms] (mean, across all concurrent requests) Transfer rate: 22.82 [Kbytes/sec] received Then I tried it with TWO concurrent connections: $ ab -n 500 -c 2 http://127.0.0.1:4242/yo HTML transferred: 10500 bytes Requests per second: 29.10 [#/sec] (mean) <- ##### note speed ###### Time per request: 68.722 [ms] (mean) Time per request: 34.361 [ms] (mean, across all concurrent requests) Transfer rate: 4.80 [Kbytes/sec] received It's nearly 5x slower with just 2 simultaneous connections, going from 138 to 34 requests/sec. 10 connections gives the same speed as 2, and 30 fails because connection was reset by peer (maybe my fault for not having enough open files available, but it should never open more than 30 filehandles at once, no?). I'm running on a Mac OS X 10.6 with CCL "Version 1.4-r13119 (DarwinX8664)" Can anyone else reproduce this? Is it some threading problem? John From jetmonk at gmail.com Thu Aug 19 07:32:47 2010 From: jetmonk at gmail.com (JTK) Date: Wed, 18 Aug 2010 21:32:47 -1000 Subject: [hunchentoot-devel] serious H'toot performance problem on CCL OSX ? Message-ID: In addition to ccl, I've tried to use sbcl 1.0.29 with threads enabled, again on OSX 10.6. It displayed a similar slowdown with simultaneous connections. But with 100 connections, sbcl crashed and went into the ldb debugger: > fatal error encountered in SBCL pid 38459(tid 75514880): fault in heap page 12293 not marked as write-protected boxed_region.first_page: 0, boxed_region.last_page -1 Error opening /dev/tty: Device not configured Welcome to LDB, a low-level debugger for the Lisp runtime environment. ldb> From lukas.georgieff at hotmail.com Thu Aug 19 07:58:25 2010 From: lukas.georgieff at hotmail.com (lukas.georgieff at hotmail.com) Date: Thu, 19 Aug 2010 09:58:25 +0200 Subject: [hunchentoot-devel] serious H'toot performance problem on CCL OSX ? In-Reply-To: <84A7D5E8-3D4D-472D-8D98-AEA021909765@gmail.com> References: <84A7D5E8-3D4D-472D-8D98-AEA021909765@gmail.com> Message-ID: Hi John, we are using hunchentoot for a while in our application and made a similar experience. We're using it with SBCL on ubuntu and MAC systems. Another problem that we are currently debugging is that the needed memory on two or more parallel requests is not released, so the machine stops working when there is no RAM available. But at the moment we are not sure if this problem is 100% caused by hunchentoot. Best regards lukas -------------------------------------------------- From: "JTK" Sent: Thursday, August 19, 2010 1:53 AM To: Subject: [hunchentoot-devel] serious H'toot performance problem on CCL OSX ? > > Hello, > > I'm finding that the speed of hunchentoot falls drastically for more than > 1 simultaneous connection, > at least for CCL on OS X. And more than a few connections just fails. > > I downloaded the latest svn version from http://bknr.net/html/ > > To reduce any complicating factors, I loaded just h'toot and ran ccl on > the shell command line, not in slime. > > I tried a simple page: > > CL-USER> (hunchentoot:start (make-instance 'hunchentoot:acceptor :port > 4242)) > # > CL-USER> (hunchentoot:define-easy-handler (say-yo :uri "/yo") () > (setf (hunchentoot:content-type*) "text/plain") > "Yo! This. Is. Content") > SAY-YO > > Then I tried the ab (apache bench) benchmark with c=1 (1 connection), and > 500 > iterations: > > $ ab -n 500 -c 1 http://127.0.0.1:4242/yo > > HTML transferred: 10500 bytes > Requests per second: 138.26 [#/sec] (mean) <- ##### note speed > ###### > Time per request: 7.233 [ms] (mean) > Time per request: 7.233 [ms] (mean, across all concurrent requests) > Transfer rate: 22.82 [Kbytes/sec] received > > > Then I tried it with TWO concurrent connections: > > $ ab -n 500 -c 2 http://127.0.0.1:4242/yo > > HTML transferred: 10500 bytes > Requests per second: 29.10 [#/sec] (mean) <- ##### note speed > ###### > Time per request: 68.722 [ms] (mean) > Time per request: 34.361 [ms] (mean, across all concurrent > requests) > Transfer rate: 4.80 [Kbytes/sec] received > > It's nearly 5x slower with just 2 simultaneous connections, going from 138 > to 34 requests/sec. > > 10 connections gives the same speed as 2, and 30 fails because connection > was reset by peer (maybe my fault for not having enough open files > available, but it should never open more than 30 filehandles at once, > no?). > > I'm running on a Mac OS X 10.6 with CCL "Version 1.4-r13119 > (DarwinX8664)" > > Can anyone else reproduce this? Is it some threading problem? > > John > > > > > > > > > > _______________________________________________ > tbnl-devel site list > tbnl-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/tbnl-devel > From hans.huebner at gmail.com Thu Aug 19 08:11:18 2010 From: hans.huebner at gmail.com (=?ISO-8859-1?Q?Hans_H=FCbner?=) Date: Thu, 19 Aug 2010 10:11:18 +0200 Subject: [hunchentoot-devel] serious H'toot performance problem on CCL OSX ? In-Reply-To: <84A7D5E8-3D4D-472D-8D98-AEA021909765@gmail.com> References: <84A7D5E8-3D4D-472D-8D98-AEA021909765@gmail.com> Message-ID: John, what you are seeing is probably related to the fact that the default multi threaded task master of Hunchentoot is not clever about creating threads. It creates a new thread for every incoming connection, so it is easy to force it into situations where too many threads are created. Personally, I am not using multi threaded Hunchentoot. Instead, I run it single threaded and behind a HTTP caching proxy (squid) that is configured to use if-modified-since headers to negotiate reloading stuff from the Hunchentoot backend. That strategy works well and copes with all load patterns that I have tried (and I have tried a few, using both ab and Tsung). If you absolutely need threads, try the threading patch that has been submitted by Scott McKay a few weeks ago. It prevents Hunchentoot from creating threads without bounds, and might solve the problem for you. We will be incorporating that patch once it has been separated from the xcvb changes that won't go into the Hunchentoot mainline. Any reports on how it helps with artificial loads tests would be appreciated. For the SBCL crash: This should be reported to the SBCL folks. I never had a lot of faith in SBCL's thread implementation and it also is possible that the locking patterns inside of Hunchentoot trigger the misbehavior, but we need to have detailed advise how to fix that, if we need to. -Hans On Thu, Aug 19, 2010 at 01:53, JTK wrote: > > Hello, > > I'm finding that the speed of hunchentoot falls drastically for more than 1 simultaneous connection, > at least for CCL on OS X. ?And more than a few connections just fails. > > I downloaded the latest svn version from http://bknr.net/html/ > > To reduce any complicating factors, I loaded just h'toot and ran ccl on the shell command line, not in slime. > > I tried a simple page: > > CL-USER> (hunchentoot:start (make-instance 'hunchentoot:acceptor :port 4242)) > # > CL-USER> (hunchentoot:define-easy-handler (say-yo :uri "/yo") () > ?(setf (hunchentoot:content-type*) "text/plain") > ?"Yo! This. Is. Content") > SAY-YO > > Then I tried the ab (apache bench) benchmark with c=1 (1 connection), and 500 > iterations: > > $ ab -n 500 -c 1 ? http://127.0.0.1:4242/yo > > ?HTML transferred: ? ? ? 10500 bytes > ?Requests per second: ? ?138.26 [#/sec] (mean) ? <- ##### note speed ###### > ?Time per request: ? ? ? 7.233 [ms] (mean) > ?Time per request: ? ? ? 7.233 [ms] (mean, across all concurrent requests) > ?Transfer rate: ? ? ? ? ?22.82 [Kbytes/sec] received > > > Then I tried it with TWO concurrent connections: > > $ ab -n 500 -c 2 ? http://127.0.0.1:4242/yo > > ?HTML transferred: ? ? ? 10500 bytes > ?Requests per second: ? ?29.10 [#/sec] (mean) ? ?<- ##### note speed ###### > ?Time per request: ? ? ? 68.722 [ms] (mean) > ?Time per request: ? ? ? 34.361 [ms] (mean, across all concurrent requests) > ?Transfer rate: ? ? ? ? ?4.80 [Kbytes/sec] received > > It's nearly 5x slower with just 2 simultaneous connections, going from 138 to 34 requests/sec. > > 10 connections gives the same speed as 2, and 30 fails because connection was reset by peer (maybe my fault for not having enough open files available, but it should never open more than 30 filehandles at once, no?). > > I'm running on a Mac OS X 10.6 with CCL "Version 1.4-r13119 ?(DarwinX8664)" > > Can anyone else reproduce this? ?Is it some threading problem? > > John > > > > > > > > > > _______________________________________________ > tbnl-devel site list > tbnl-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/tbnl-devel > From archimag at gmail.com Thu Aug 19 09:11:20 2010 From: archimag at gmail.com (Andrey Moskvitin) Date: Thu, 19 Aug 2010 13:11:20 +0400 Subject: [hunchentoot-devel] serious H'toot performance problem on CCL OSX ? In-Reply-To: <84A7D5E8-3D4D-472D-8D98-AEA021909765@gmail.com> References: <84A7D5E8-3D4D-472D-8D98-AEA021909765@gmail.com> Message-ID: I have the following situation with http://lisper.ru/ (Hunchentoot + SBCL on Debian VPS without Apache, nginx, etc.) $ /usr/sbin/ab -n 100 -c 1 http://lisper.ru/ HTML transferred: 531200 bytes Requests per second: 153.37 [#/sec] (mean) Time per request: 6.520 [ms] (mean) Time per request: 6.520 [ms] (mean, across all concurrent requests) Transfer rate: 817.95 [Kbytes/sec] received $ /usr/sbin/ab -n 100 -c 10 http://lisper.ru/ HTML transferred: 531200 bytes Requests per second: 157.23 [#/sec] (mean) Time per request: 63.600 [ms] (mean) Time per request: 6.360 [ms] (mean, across all concurrent requests) Transfer rate: 838.52 [Kbytes/sec] received $ /usr/sbin/ab -n 100 -c 20 http://lisper.ru/ HTML transferred: 531200 bytes Requests per second: 67.39 [#/sec] (mean) Time per request: 296.800 [ms] (mean) Time per request: 14.840 [ms] (mean, across all concurrent requests) Transfer rate: 359.37 [Kbytes/sec] received $ /usr/sbin/ab -n 100 -c 50 http://lisper.ru/ HTML transferred: 531200 bytes Requests per second: 33.11 [#/sec] (mean) Time per request: 1510.000 [ms] (mean) Time per request: 30.200 [ms] (mean, across all concurrent requests) Transfer rate: 176.59 [Kbytes/sec] received I believe that a significant decrease in performance when the number of requests for more than 10 due to the limited resources of VPS. On my working machine (Gentoo) performance degradation with increasing number of requests is much smaller. Andrey From jetmonk at gmail.com Thu Aug 19 10:27:25 2010 From: jetmonk at gmail.com (JTK) Date: Thu, 19 Aug 2010 00:27:25 -1000 Subject: [hunchentoot-devel] serious H'toot performance problem on CCL OSX ? In-Reply-To: References: <84A7D5E8-3D4D-472D-8D98-AEA021909765@gmail.com> Message-ID: <2A0827C8-8198-4436-8DA6-55E17BC1F690@gmail.com> On Aug 18, 2010, at 10:11 PM, Hans H?bner wrote: > John, > > what you are seeing is probably related to the fact that the default > multi threaded task master of Hunchentoot is not clever about creating > threads. It creates a new thread for every incoming connection, so it > is easy to force it into situations where too many threads are > created. > > Personally, I am not using multi threaded Hunchentoot. Instead, I run > it single threaded and behind a HTTP caching proxy (squid) that is > configured to use if-modified-since headers to negotiate reloading > stuff from the Hunchentoot backend. That strategy works well and > copes with all load patterns that I have tried (and I have tried a > few, using both ab and Tsung). > > If you absolutely need threads, try the threading patch that has been > submitted by Scott McKay a few weeks ago. It prevents Hunchentoot > from creating threads without bounds, and might solve the problem for > you. We will be incorporating that patch once it has been separated > from the xcvb changes that won't go into the Hunchentoot mainline. > Any reports on how it helps with artificial loads tests would be > appreciated. Here's a simple webserver that avoids H'toot altogether. It has a thread manager (make-safe-process) that avoids making too many threads at once. The threshold *max-procs* is very low and it never seems to hit the limit (because it prints warnings when it does). If you run it as (do-dumb-server-loop :port NNNN) it runs great with just one request at a time, but fails with more than one thread (just like H'toot). Moreover, even in single-connection mode, the server performance deteriorates as one does more runs. So it almost looks to me that CCL threads on the the mac might be broken somehow. ;; =========================================== ;; simple threaded webserver to exercise threads and sockets (eval-when (load eval compile) (require 'bordeaux-threads) (require 'usocket)) (defparameter *lock* (bt:make-recursive-lock "proc-lock")) (defparameter *max-procs* 10) ;; max number of threads we allow (let ((nprocs 0)) ;; counter for how many threads are running (defun safe-make-process (func) "A function that launches FUNC in a new thread only if there are not more than *MAX-PROCS* running; otherwise it sleeps for a bit" (bt:with-lock-held (*lock*) (format t "Making proc with ~A already existing~%" nprocs) (force-output)) ;; sleep until some processes die (loop while (bt:with-lock-held (*lock*) (> nprocs *max-procs*)) do (format t "Warning - nprocs=~A~%" nprocs) (force-output) (sleep 0.1)) ;; (bt:with-lock-held (*lock*) (incf nprocs)) (bt:make-thread (lambda () (unwind-protect ;; protect the decrement of the counter (funcall func) (bt:with-lock-held (*lock*) (decf nprocs))))))) (defun do-dumb-server-loop (&key (port 9001)) (loop with listener = (usocket:socket-listen "127.0.0.1" port) for sock = (usocket:socket-accept listener) when sock do (safe-make-process (lambda () ;; I think we need to close over sock here or this thread's ;; loop might change what REPLY-FUNC sees (let ((this-sock sock)) (reply-func this-sock))) ))) (defparameter *response* "HTTP/1.1 200 OK Server: dumb Connection: Close Content-Type: text/plain This is the content. ") (defun reply-func (sock) ;; read headers and send content (let ((s (usocket:socket-stream sock))) (ignore-errors ;; eat client headers (loop for line = (read-line s nil nil) until (< (length line) 3)) ;; and send response (write-string *response* s)) ;; the socket close is protected by ignore-errors (usocket:socket-close sock))) ;; =========================================== > > For the SBCL crash: This should be reported to the SBCL folks. I > never had a lot of faith in SBCL's thread implementation and it also > is possible that the locking patterns inside of Hunchentoot trigger > the misbehavior, but we need to have detailed advise how to fix that, > if we need to. > > -Hans > > On Thu, Aug 19, 2010 at 01:53, JTK wrote: >> >> Hello, >> >> I'm finding that the speed of hunchentoot falls drastically for more than 1 simultaneous connection, >> at least for CCL on OS X. And more than a few connections just fails. >> >> I downloaded the latest svn version from http://bknr.net/html/ >> >> To reduce any complicating factors, I loaded just h'toot and ran ccl on the shell command line, not in slime. >> >> I tried a simple page: >> >> CL-USER> (hunchentoot:start (make-instance 'hunchentoot:acceptor :port 4242)) >> # >> CL-USER> (hunchentoot:define-easy-handler (say-yo :uri "/yo") () >> (setf (hunchentoot:content-type*) "text/plain") >> "Yo! This. Is. Content") >> SAY-YO >> >> Then I tried the ab (apache bench) benchmark with c=1 (1 connection), and 500 >> iterations: >> >> $ ab -n 500 -c 1 http://127.0.0.1:4242/yo >> >> HTML transferred: 10500 bytes >> Requests per second: 138.26 [#/sec] (mean) <- ##### note speed ###### >> Time per request: 7.233 [ms] (mean) >> Time per request: 7.233 [ms] (mean, across all concurrent requests) >> Transfer rate: 22.82 [Kbytes/sec] received >> >> >> Then I tried it with TWO concurrent connections: >> >> $ ab -n 500 -c 2 http://127.0.0.1:4242/yo >> >> HTML transferred: 10500 bytes >> Requests per second: 29.10 [#/sec] (mean) <- ##### note speed ###### >> Time per request: 68.722 [ms] (mean) >> Time per request: 34.361 [ms] (mean, across all concurrent requests) >> Transfer rate: 4.80 [Kbytes/sec] received >> >> It's nearly 5x slower with just 2 simultaneous connections, going from 138 to 34 requests/sec. >> >> 10 connections gives the same speed as 2, and 30 fails because connection was reset by peer (maybe my fault for not having enough open files available, but it should never open more than 30 filehandles at once, no?). >> >> I'm running on a Mac OS X 10.6 with CCL "Version 1.4-r13119 (DarwinX8664)" >> >> Can anyone else reproduce this? Is it some threading problem? >> >> John >> >> >> >> >> >> >> >> >> >> _______________________________________________ >> tbnl-devel site list >> tbnl-devel at common-lisp.net >> http://common-lisp.net/mailman/listinfo/tbnl-devel >> > > _______________________________________________ > tbnl-devel site list > tbnl-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/tbnl-devel From hans.huebner at gmail.com Thu Aug 19 12:27:14 2010 From: hans.huebner at gmail.com (=?ISO-8859-1?Q?Hans_H=FCbner?=) Date: Thu, 19 Aug 2010 14:27:14 +0200 Subject: [hunchentoot-devel] serious H'toot performance problem on CCL OSX ? In-Reply-To: <2A0827C8-8198-4436-8DA6-55E17BC1F690@gmail.com> References: <84A7D5E8-3D4D-472D-8D98-AEA021909765@gmail.com> <2A0827C8-8198-4436-8DA6-55E17BC1F690@gmail.com> Message-ID: John, I have made a few experiments with your test server on my FreeBSD box using ccl-1.5. I had to adjust the backlog parameter in usocket:socket-listen so that could cope with higher concurrency values, but other than that, I could see nothing abnormal. Before going to the CCL mailing list with your problem, consider upgrading CCL to a more recent version. -Hans On Thu, Aug 19, 2010 at 12:27, JTK wrote: > > On Aug 18, 2010, at 10:11 PM, Hans H?bner wrote: > >> John, >> >> what you are seeing is probably related to the fact that the default >> multi threaded task master of Hunchentoot is not clever about creating >> threads. ?It creates a new thread for every incoming connection, so it >> is easy to force it into situations where too many threads are >> created. >> >> Personally, I am not using multi threaded Hunchentoot. ?Instead, I run >> it single threaded and behind a HTTP caching proxy (squid) that is >> configured to use if-modified-since headers to negotiate reloading >> stuff from the Hunchentoot backend. ?That strategy works well and >> copes with all load patterns that I have tried (and I have tried a >> few, using both ab and Tsung). >> >> If you absolutely need threads, try the threading patch that has been >> submitted by Scott McKay a few weeks ago. ?It prevents Hunchentoot >> from creating threads without bounds, and might solve the problem for >> you. ?We will be incorporating that patch once it has been separated >> from the xcvb changes that won't go into the Hunchentoot mainline. >> Any reports on how it helps with artificial loads tests would be >> appreciated. > > > Here's a simple webserver that avoids H'toot altogether. ?It has a thread manager > (make-safe-process) that avoids making too many threads at once. ?The threshold *max-procs* is very low > and it never seems to hit the limit (because it prints warnings when it does). > > If you run it as (do-dumb-server-loop :port NNNN) ?it runs great with just one request at > a time, but fails with more than one thread (just like H'toot). > Moreover, even in single-connection mode, the server performance deteriorates > as one does more runs. > > > So it almost looks to me that CCL threads on the the mac might be broken somehow. > > ;; =========================================== > ;; simple threaded webserver to exercise threads and sockets > > (eval-when (load eval compile) > ?(require 'bordeaux-threads) > ?(require 'usocket)) > > (defparameter *lock* (bt:make-recursive-lock "proc-lock")) > (defparameter *max-procs* 10) ;; max number of threads we allow > > (let ((nprocs 0)) ;; counter for how many threads are running > ?(defun safe-make-process (func) > ? ?"A function that launches FUNC in a new thread only if > there are not more than *MAX-PROCS* running; otherwise it sleeps > for a bit" > ? ?(bt:with-lock-held (*lock*) > ? ? ?(format t "Making proc with ~A already existing~%" nprocs) > ? ? ?(force-output)) > ? ?;; sleep until some processes die > ? ?(loop > ? ? ? while > ? ? ? ? (bt:with-lock-held (*lock*) > ? ? ? ? ? (> nprocs *max-procs*)) > ? ? ? do > ? ? ? ? (format t "Warning - nprocs=~A~%" nprocs) (force-output) > ? ? ? ? (sleep 0.1)) > ? ?;; > ? ?(bt:with-lock-held (*lock*) > ? ? ?(incf nprocs)) > ? ?(bt:make-thread > ? ? (lambda () > ? ? ? (unwind-protect ;; protect the decrement of the counter > ? ? ? ? ? ?(funcall func) > ? ? ? ? (bt:with-lock-held (*lock*) > ? ? ? ? ? (decf nprocs))))))) > > > > > > (defun do-dumb-server-loop (&key (port 9001)) > ?(loop > ? ? with listener = (usocket:socket-listen "127.0.0.1" port) > ? ? for sock = (usocket:socket-accept listener) > ? ? when sock > ? ? do > ? ? ? (safe-make-process > ? ? ? ?(lambda () > ? ? ? ? ?;; I think we need to close over sock here or this thread's > ? ? ? ? ?;; loop might change what REPLY-FUNC sees > ? ? ? ? ?(let ((this-sock sock)) > ? ? ? ? ? ?(reply-func this-sock))) > ? ? ? ))) > > > (defparameter *response* > "HTTP/1.1 200 OK > Server: dumb > Connection: Close > Content-Type: text/plain > > This is the content. > ") > > (defun reply-func (sock) ;; read headers and send content > ?(let ((s (usocket:socket-stream sock))) > ? ?(ignore-errors > ? ? ?;; eat client headers > ? ? ?(loop for line = (read-line s nil nil) > ? ? ? ? until (< (length line) 3)) > ? ? ?;; and send response > ? ? ?(write-string *response* s)) > ? ?;; the socket close is protected by ignore-errors > ? ?(usocket:socket-close sock))) > > ;; =========================================== > > > > > > > > > > > > > > > > > >> >> For the SBCL crash: ?This should be reported to the SBCL folks. I >> never had a lot of faith in SBCL's thread implementation and it also >> is possible that the locking patterns inside of Hunchentoot trigger >> the misbehavior, but we need to have detailed advise how to fix that, >> if we need to. >> >> -Hans >> >> On Thu, Aug 19, 2010 at 01:53, JTK wrote: >>> >>> Hello, >>> >>> I'm finding that the speed of hunchentoot falls drastically for more than 1 simultaneous connection, >>> at least for CCL on OS X. ?And more than a few connections just fails. >>> >>> I downloaded the latest svn version from http://bknr.net/html/ >>> >>> To reduce any complicating factors, I loaded just h'toot and ran ccl on the shell command line, not in slime. >>> >>> I tried a simple page: >>> >>> CL-USER> (hunchentoot:start (make-instance 'hunchentoot:acceptor :port 4242)) >>> # >>> CL-USER> (hunchentoot:define-easy-handler (say-yo :uri "/yo") () >>> ?(setf (hunchentoot:content-type*) "text/plain") >>> ?"Yo! This. Is. Content") >>> SAY-YO >>> >>> Then I tried the ab (apache bench) benchmark with c=1 (1 connection), and 500 >>> iterations: >>> >>> $ ab -n 500 -c 1 ? http://127.0.0.1:4242/yo >>> >>> ?HTML transferred: ? ? ? 10500 bytes >>> ?Requests per second: ? ?138.26 [#/sec] (mean) ? <- ##### note speed ###### >>> ?Time per request: ? ? ? 7.233 [ms] (mean) >>> ?Time per request: ? ? ? 7.233 [ms] (mean, across all concurrent requests) >>> ?Transfer rate: ? ? ? ? ?22.82 [Kbytes/sec] received >>> >>> >>> Then I tried it with TWO concurrent connections: >>> >>> $ ab -n 500 -c 2 ? http://127.0.0.1:4242/yo >>> >>> ?HTML transferred: ? ? ? 10500 bytes >>> ?Requests per second: ? ?29.10 [#/sec] (mean) ? ?<- ##### note speed ###### >>> ?Time per request: ? ? ? 68.722 [ms] (mean) >>> ?Time per request: ? ? ? 34.361 [ms] (mean, across all concurrent requests) >>> ?Transfer rate: ? ? ? ? ?4.80 [Kbytes/sec] received >>> >>> It's nearly 5x slower with just 2 simultaneous connections, going from 138 to 34 requests/sec. >>> >>> 10 connections gives the same speed as 2, and 30 fails because connection was reset by peer (maybe my fault for not having enough open files available, but it should never open more than 30 filehandles at once, no?). >>> >>> I'm running on a Mac OS X 10.6 with CCL "Version 1.4-r13119 ?(DarwinX8664)" >>> >>> Can anyone else reproduce this? ?Is it some threading problem? >>> >>> John >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> _______________________________________________ >>> tbnl-devel site list >>> tbnl-devel at common-lisp.net >>> http://common-lisp.net/mailman/listinfo/tbnl-devel >>> >> >> _______________________________________________ >> tbnl-devel site list >> tbnl-devel at common-lisp.net >> http://common-lisp.net/mailman/listinfo/tbnl-devel > > > _______________________________________________ > tbnl-devel site list > tbnl-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/tbnl-devel > From rsynnott at gmail.com Thu Aug 19 12:59:59 2010 From: rsynnott at gmail.com (Robert Synnott) Date: Thu, 19 Aug 2010 13:59:59 +0100 Subject: [hunchentoot-devel] serious H'toot performance problem on CCL OSX ? In-Reply-To: <84A7D5E8-3D4D-472D-8D98-AEA021909765@gmail.com> References: <84A7D5E8-3D4D-472D-8D98-AEA021909765@gmail.com> Message-ID: I had this problem a while back (with a pre-1.0 Hunchentoot on SBCL 10.0.20 on a couple of elderly dual Opterons). I was able to deal with it by having a proxy server in front of Hunchentoot limit the number of connections it'd make to the Hunchentoot backends at any one time, which worked acceptably, and allowed for well over 200 requests per second (where the content being loaded from cache; realistic usage scenarios were somewhat below this due to app logic etc.) Rob On 19 August 2010 00:53, JTK wrote: > > Hello, > > I'm finding that the speed of hunchentoot falls drastically for more than 1 simultaneous connection, > at least for CCL on OS X. ?And more than a few connections just fails. > > I downloaded the latest svn version from http://bknr.net/html/ > > To reduce any complicating factors, I loaded just h'toot and ran ccl on the shell command line, not in slime. > > I tried a simple page: > > CL-USER> (hunchentoot:start (make-instance 'hunchentoot:acceptor :port 4242)) > # > CL-USER> (hunchentoot:define-easy-handler (say-yo :uri "/yo") () > ?(setf (hunchentoot:content-type*) "text/plain") > ?"Yo! This. Is. Content") > SAY-YO > > Then I tried the ab (apache bench) benchmark with c=1 (1 connection), and 500 > iterations: > > $ ab -n 500 -c 1 ? http://127.0.0.1:4242/yo > > ?HTML transferred: ? ? ? 10500 bytes > ?Requests per second: ? ?138.26 [#/sec] (mean) ? <- ##### note speed ###### > ?Time per request: ? ? ? 7.233 [ms] (mean) > ?Time per request: ? ? ? 7.233 [ms] (mean, across all concurrent requests) > ?Transfer rate: ? ? ? ? ?22.82 [Kbytes/sec] received > > > Then I tried it with TWO concurrent connections: > > $ ab -n 500 -c 2 ? http://127.0.0.1:4242/yo > > ?HTML transferred: ? ? ? 10500 bytes > ?Requests per second: ? ?29.10 [#/sec] (mean) ? ?<- ##### note speed ###### > ?Time per request: ? ? ? 68.722 [ms] (mean) > ?Time per request: ? ? ? 34.361 [ms] (mean, across all concurrent requests) > ?Transfer rate: ? ? ? ? ?4.80 [Kbytes/sec] received > > It's nearly 5x slower with just 2 simultaneous connections, going from 138 to 34 requests/sec. > > 10 connections gives the same speed as 2, and 30 fails because connection was reset by peer (maybe my fault for not having enough open files available, but it should never open more than 30 filehandles at once, no?). > > I'm running on a Mac OS X 10.6 with CCL "Version 1.4-r13119 ?(DarwinX8664)" > > Can anyone else reproduce this? ?Is it some threading problem? > > John > > > > > > > > > > _______________________________________________ > tbnl-devel site list > tbnl-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/tbnl-devel > -- Robert Synnott http://myblog.rsynnott.com MSN: rsynnott at gmail.com Jabber: rsynnott at gmail.com From wade.humeniuk at gmail.com Thu Aug 19 18:03:37 2010 From: wade.humeniuk at gmail.com (Wade Humeniuk) Date: Thu, 19 Aug 2010 12:03:37 -0600 Subject: [hunchentoot-devel] serious H'toot performance problem on CCL OSX ? In-Reply-To: References: <84A7D5E8-3D4D-472D-8D98-AEA021909765@gmail.com> Message-ID: I am not seeing it Hunchentoot 1.1.0 (2010-01-08) OS X 10.6.4 Stix:ccl wade$ uname -a Darwin Stix.local 10.4.0 Darwin Kernel Version 10.4.0: Fri Apr 23 18:28:53 PDT 2010; root:xnu-1504.7.4~1/RELEASE_I386 i386 Stix:ccl wade$ ./dx86cl64 ; loading system definition from ccl:tools;asdf-install;asdf-install.asd.newest into # ; registering # as ASDF-INSTALL ;;; ASDF-Install version 0.6.10 Welcome to Clozure Common Lisp Version 1.5-r13952M (DarwinX8664)! ? (quit) Stix:ccl wade$ ab -n 500 -c 1 http://127.0.0.1:4242/yo This is ApacheBench, Version 2.3 <$Revision: 655654 $> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/ Benchmarking 127.0.0.1 (be patient) Completed 100 requests Completed 200 requests Completed 300 requests Completed 400 requests Completed 500 requests Finished 500 requests Server Software: Hunchentoot Server Hostname: 127.0.0.1 Server Port: 4242 Document Path: /yo Document Length: 21 bytes Concurrency Level: 1 Time taken for tests: 0.991 seconds Complete requests: 500 Failed requests: 0 Write errors: 0 Total transferred: 84500 bytes HTML transferred: 10500 bytes Requests per second: 504.66 [#/sec] (mean) Time per request: 1.982 [ms] (mean) Time per request: 1.982 [ms] (mean, across all concurrent requests) Transfer rate: 83.29 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 0 0 0.0 0 0 Processing: 1 2 1.2 2 10 Waiting: 1 2 1.2 2 10 Total: 1 2 1.2 2 10 Percentage of the requests served within a certain time (ms) 50% 2 66% 2 75% 2 80% 2 90% 2 95% 6 98% 6 99% 6 100% 10 (longest request) Stix:ccl wade$ ab -n 500 -c 2 http://127.0.0.1:4242/yo This is ApacheBench, Version 2.3 <$Revision: 655654 $> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/ Benchmarking 127.0.0.1 (be patient) Completed 100 requests Completed 200 requests Completed 300 requests Completed 400 requests Completed 500 requests Finished 500 requests Server Software: Hunchentoot Server Hostname: 127.0.0.1 Server Port: 4242 Document Path: /yo Document Length: 21 bytes Concurrency Level: 2 Time taken for tests: 0.655 seconds Complete requests: 500 Failed requests: 0 Write errors: 0 Total transferred: 84500 bytes HTML transferred: 10500 bytes Requests per second: 762.88 [#/sec] (mean) Time per request: 2.622 [ms] (mean) Time per request: 1.311 [ms] (mean, across all concurrent requests) Transfer rate: 125.91 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 0 0 0.1 0 1 Processing: 1 2 1.7 2 14 Waiting: 0 2 1.7 2 14 Total: 1 3 1.7 2 14 Percentage of the requests served within a certain time (ms) 50% 2 66% 2 75% 2 80% 2 90% 6 95% 7 98% 7 99% 7 100% 14 (longest request) Stix:ccl wade$ From wade.humeniuk at gmail.com Thu Aug 19 19:15:24 2010 From: wade.humeniuk at gmail.com (Wade Humeniuk) Date: Thu, 19 Aug 2010 13:15:24 -0600 Subject: [hunchentoot-devel] serious H'toot performance problem on CCL OSX ? In-Reply-To: <84A7D5E8-3D4D-472D-8D98-AEA021909765@gmail.com> References: <84A7D5E8-3D4D-472D-8D98-AEA021909765@gmail.com> Message-ID: Just a note. I am not using the bknr repository. Just straight up asdf-install Here is a directory listing of all the asdf packages, Stix:site wade$ pwd /Users/wade/.asdf-install-dir/site Stix:site wade$ ls -l total 0 drwxr-xr-x 41 wade wade 1394 5 Jun 14:23 alexandria drwxr-xr-x 12 wade wade 408 5 Jun 14:24 anaphora-0.9.3 drwxr-xr-x 13 wade wade 442 28 Jul 2008 babel_0.3.0 drwxr-xr-x 10 wade wade 340 24 Dec 2009 bordeaux-threads-0.7.0 drwxr-xr-x 19 wade wade 646 16 Jun 2009 cffi_0.10.5 drwxr-xr-x 23 wade wade 782 5 Jun 14:23 chunga-1.1.0 drwxr-xr-x 27 wade wade 918 5 Jun 14:23 cl+ssl-2008-11-04 drwxr-xr-x 11 wade wade 374 5 Jun 14:23 cl-base64-3.3.3 drwxr-xr-x 16 wade wade 544 5 Jun 14:23 cl-fad-0.6.3 drwxr-xr-x 11 wade wade 374 5 Jun 14:23 cl-interpol-0.2.1 drwxr-xr-x 52 wade wade 1768 5 Jun 14:26 cl-pdf drwxr-xr-x 42 wade wade 1428 5 Jun 14:23 cl-ppcre-2.0.3 drwxr-xr-x 8 wade wade 272 29 Mar 2007 cl-prevalence drwxr-xr-x 48 wade wade 1632 5 Jun 14:26 cl-typesetting drwxr-xr-x 19 wade wade 646 5 Jun 14:23 cl-unicode-0.1.1 drwxr-xr-x 23 wade wade 782 5 Jun 14:24 cl-vectors-0.1.3 drwxr-xr-x 11 wade wade 374 5 Jun 14:23 cl-who-0.11.1 drwxr-xr-x 20 wade wade 680 5 Jun 14:23 closer-mop_0.61 drwxr-xr-x 44 wade wade 1496 20 Apr 12:37 clsql-5.1.0 drwxr-xr-x 19 wade wade 646 5 Jun 14:23 drakma-1.1.0 drwxr-xr-x 18 wade wade 612 22 May 13:18 elephant drwxr-xr-x 45 wade wade 1530 5 Jun 14:23 flexi-streams-1.0.7 drwxr-xr-x 46 wade wade 1564 5 Jun 14:23 hunchentoot-1.1.0 drwxr-xr-x 10 wade wade 340 29 Apr 21:24 ironclad_0.28 drwx------ 5 wade wade 170 5 Jun 14:23 md5-1.8.5 drwxr-xr-x 11 wade wade 374 26 Feb 22:25 parenscript-2.1 drwxr-xr-x 9 wade wade 306 5 Jun 14:23 puri-1.5.4 drwxr-xr-x 8 wade wade 272 5 Jun 14:23 rfc2388 drwxr-xr-x 7 wade wade 238 5 Jun 14:25 rt-20040621 drwxr-xr-x@ 41 wade wade 1394 5 Jun 14:23 rucksack drwxr-xr-x 8 wade wade 272 26 Jun 2008 s-sysdeps drwxr-xr-x 8 wade wade 272 18 Jan 2006 s-xml drwxr-xr-x 40 wade wade 1360 5 Jun 14:24 salza2-2.0.7 drwxr-xr-x 6 wade wade 204 5 Jun 14:23 split-sequence drwxr-xr-x 10 wade wade 340 16 May 2009 trivial-backtrace drwxr-xr-x 10 wade wade 340 19 Oct 2009 trivial-features_0.6 drwxr-xr-x 11 wade wade 374 5 Jun 14:23 trivial-gray-streams-2008-11-02 drwxr-xr-x 7 wade wade 238 5 Jun 14:23 trivial-utf-8 drwxr-xr-x 18 wade wade 612 20 Apr 12:32 uffi-2.0.0 drwxr-xr-x 3 wade wade 102 21 Jan 2006 unit-test drwxr-xr-x 18 wade wade 612 5 Jun 14:23 usocket-0.4.1 drwxr-xr-x 34 wade wade 1156 5 Jun 14:24 vecto-1.4.3 drwxr-xr-x 12 wade wade 408 5 Jun 14:26 yason-0.1 drwxr-xr-x 40 wade wade 1360 5 Jun 14:24 zpb-ttf-1.0 drwxr-xr-x 16 wade wade 544 5 Jun 14:24 zpng-1.2 Stix:site wade$ From wade.humeniuk at gmail.com Thu Aug 19 21:16:11 2010 From: wade.humeniuk at gmail.com (Wade Humeniuk) Date: Thu, 19 Aug 2010 15:16:11 -0600 Subject: [hunchentoot-devel] serious H'toot performance problem on CCL OSX ? In-Reply-To: <84A7D5E8-3D4D-472D-8D98-AEA021909765@gmail.com> References: <84A7D5E8-3D4D-472D-8D98-AEA021909765@gmail.com> Message-ID: It's not a problem in the bknr repository. Just tried it and everything works. Update ccl? wade From jetmonk at gmail.com Thu Aug 19 21:59:00 2010 From: jetmonk at gmail.com (JTK) Date: Thu, 19 Aug 2010 11:59:00 -1000 Subject: [hunchentoot-devel] serious H'toot performance problem on CCL OSX ? In-Reply-To: References: <84A7D5E8-3D4D-472D-8D98-AEA021909765@gmail.com> Message-ID: On Aug 19, 2010, at 8:03 AM, Wade Humeniuk wrote: > I am not seeing it Hunchentoot 1.1.0 (2010-01-08) OS X 10.6.4 ... [Summary: Wade is getting 500+ req/sec for both 1 and 2 connections for 64 bit CCL 1.5 on OS X] Thank you for looking into it, Wade (and Hans, Andrey, and Robert) Following Hans' suggestion I upgraded to CCL 1.5. I tried using both release and trunk. This helped a bit; 2 concurrent requests now work. To be safe, I rebuilt all of H'toot from the bknr SVN tree, just in case I missed anything the first time. I'm running on the latest i7 Macbook Pro, so I think I should be getting speeds near the top of Wade's range. From tcsh 'limit', my descriptors limit is 4864 and maxproc is 256 Some tests, with abbreviated outputs, are appended below, as is my dumb-server.lisp code for comparison. First, the conclusions: * Replacing CCL 1.4 with 1.5 allows concurrency to work in H'toot better but not very well. concurrency=2 works, but not 10. * H'toot is running 4x to 10x slower for me than for Wade, yet we're both using 64 bit CCL 1.5 with Darwin Kernel Version 10.4.0, Apache Bench 2.3. I tried both the release CCL 1.5 and the latest trunk. * My dumb server with bordeaux threads and usocket is running at 1200 req/sec, 10x faster than my H'toot and 2x Wade's H'toot speed. The dumb server works at a concurrency of 10, unlike H'toot. * My dumb server using raw CCL sockets and threads runs about as fast as the bordeaux+usocket version, so bordeaux and usocket seem fine. Wade, could I ask one more favor, even though you've already helped a lot? Could you please run my (do-dumb-server-loop :port 4001) and benchmark it on your Mac? I'm curious if it will be 5x faster on yours, like H'toot was. I'm getting about 1200 requests/sec. Thanks, John ;; ###################### ;; run H'toot /yo page as before with 1 connection $ ab -n 500 -c 1 http://127.0.0.1:4000/yo Requests per second: 136.94 [#/sec] (mean) <= #### 4x slower than Wade ##### Time per request: 7.303 [ms] (mean) Time per request: 7.303 [ms] (mean, across all concurrent requests) Transfer rate: 22.60 [Kbytes/sec] received ;; run H'toot with 2 connections $ ab -n 500 -c 2 http://127.0.0.1:4000/yo Requests per second: 46.11 [#/sec] (mean) <= #### 20x slower than Wade ##### Time per request: 43.379 [ms] (mean) Time per request: 21.689 [ms] (mean, across all concurrent requests) Transfer rate: 7.61 [Kbytes/sec] received ;; run H'toot with 10 connections - FAILS $ ab -n 500 -c 10 http://127.0.0.1:4000/yo Benchmarking 127.0.0.1 (be patient) Completed 100 requests Completed 200 requests Completed 300 requests apr_socket_recv: Connection reset by peer (54) Total of 358 requests completed ;; ###################### ;; run my dumb server (see appended code) using bordeaux threads and usocket ;; this prevents more than 20 threads from running at once. It prints a warning if ;; happened, but the limit was never reached CCL> (do-dumb-server-loop :port 4001) ;; concurrency=1 $ ab -n 500 -c 1 http://127.0.0.1:4000/yo Concurrency Level: 1 Time taken for tests: 0.355 seconds Complete requests: 500 Failed requests: 0 Write errors: 0 Total transferred: 47000 bytes HTML transferred: 10500 bytes Requests per second: 1406.64 [#/sec] (mean) Time per request: 0.711 [ms] (mean) Time per request: 0.711 [ms] (mean, across all concurrent requests) Transfer rate: 129.12 [Kbytes/sec] received ;; concurrency=2 $ ab -n 500 -c 2 http://127.0.0.1:4000/yo Concurrency Level: 2 Time taken for tests: 0.386 seconds Complete requests: 500 Failed requests: 2 (Connect: 0, Receive: 0, Length: 2, Exceptions: 0) Write errors: 0 Total transferred: 46812 bytes HTML transferred: 10458 bytes Requests per second: 1295.73 [#/sec] (mean) Time per request: 1.544 [ms] (mean) Time per request: 0.772 [ms] (mean, across all concurrent requests) Transfer rate: 118.47 [Kbytes/sec] received ;; concurrency=10 $ ab -n 500 -c 10 http://127.0.0.1:4000/yo Concurrency Level: 10 Time taken for tests: 0.483 seconds Complete requests: 500 Failed requests: 5 (Connect: 0, Receive: 0, Length: 5, Exceptions: 0) Write errors: 0 Total transferred: 46530 bytes HTML transferred: 10395 bytes Requests per second: 1034.68 [#/sec] (mean) Time per request: 9.665 [ms] (mean) Time per request: 0.966 [ms] (mean, across all concurrent requests) Transfer rate: 94.03 [Kbytes/sec] received ;; now run a version of dumb server that uses native CCL threads and sockets CCL> (do-dumb-server-loop/ccl :port 4001) ;; concurrency=1 $ ab -n 500 -c 1 http://127.0.0.1:4000/yo oncurrency Level: 1 Time taken for tests: 0.401 seconds Complete requests: 500 Failed requests: 0 Write errors: 0 Total transferred: 47000 bytes HTML transferred: 10500 bytes Requests per second: 1245.62 [#/sec] (mean) <== #### FAST ##### Time per request: 0.803 [ms] (mean) Time per request: 0.803 [ms] (mean, across all concurrent requests) Transfer rate: 114.34 [Kbytes/sec] received ;; concurrency=2 $ ab -n 500 -c 2 http://127.0.0.1:4000/yo Concurrency Level: 2 Time taken for tests: 0.576 seconds Complete requests: 500 Failed requests: 2 (Connect: 0, Receive: 0, Length: 2, Exceptions: 0) Write errors: 0 Total transferred: 46812 bytes HTML transferred: 10458 bytes Requests per second: 867.85 [#/sec] (mean) <== #### FAST, but some errors ##### Time per request: 2.305 [ms] (mean) Time per request: 1.152 [ms] (mean, across all concurrent requests) Transfer rate: 79.35 [Kbytes/sec] received ;; concurrency=10 - $ ab -n 500 -c 10 of http://127.0.0.1:4000/yo Concurrency Level: 10 Time taken for tests: 0.309 seconds Complete requests: 500 Failed requests: 2 (Connect: 0, Receive: 0, Length: 2, Exceptions: 0) Write errors: 0 Total transferred: 46812 bytes HTML transferred: 10458 bytes Requests per second: 1617.78 [#/sec] (mean) <== #### FAST, but some errors ##### Time per request: 6.181 [ms] (mean) Time per request: 0.618 [ms] (mean, across all concurrent requests) Transfer rate: 147.91 [Kbytes/sec] received > > Stix:ccl wade$ uname -a > Darwin Stix.local 10.4.0 Darwin Kernel Version 10.4.0: Fri Apr 23 > 18:28:53 PDT 2010; root:xnu-1504.7.4~1/RELEASE_I386 i386 > Stix:ccl wade$ ./dx86cl64 > ; loading system definition from > ccl:tools;asdf-install;asdf-install.asd.newest into # > ; registering # as ASDF-INSTALL > ;;; ASDF-Install version 0.6.10 > Welcome to Clozure Common Lisp Version 1.5-r13952M (DarwinX8664)! > ? (quit) > > Stix:ccl wade$ ab -n 500 -c 1 http://127.0.0.1:4242/yo > This is ApacheBench, Version 2.3 <$Revision: 655654 $> > Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ > Licensed to The Apache Software Foundation, http://www.apache.org/ > > Benchmarking 127.0.0.1 (be patient) > Completed 100 requests > Completed 200 requests > Completed 300 requests > Completed 400 requests > Completed 500 requests > Finished 500 requests > > > Server Software: Hunchentoot > Server Hostname: 127.0.0.1 > Server Port: 4242 > > Document Path: /yo > Document Length: 21 bytes > > Concurrency Level: 1 > Time taken for tests: 0.991 seconds > Complete requests: 500 > Failed requests: 0 > Write errors: 0 > Total transferred: 84500 bytes > HTML transferred: 10500 bytes > Requests per second: 504.66 [#/sec] (mean) > Time per request: 1.982 [ms] (mean) > Time per request: 1.982 [ms] (mean, across all concurrent requests) > Transfer rate: 83.29 [Kbytes/sec] received > > Connection Times (ms) > min mean[+/-sd] median max > Connect: 0 0 0.0 0 0 > Processing: 1 2 1.2 2 10 > Waiting: 1 2 1.2 2 10 > Total: 1 2 1.2 2 10 > > Percentage of the requests served within a certain time (ms) > 50% 2 > 66% 2 > 75% 2 > 80% 2 > 90% 2 > 95% 6 > 98% 6 > 99% 6 > 100% 10 (longest request) > > Stix:ccl wade$ ab -n 500 -c 2 http://127.0.0.1:4242/yo > This is ApacheBench, Version 2.3 <$Revision: 655654 $> > Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ > Licensed to The Apache Software Foundation, http://www.apache.org/ > > Benchmarking 127.0.0.1 (be patient) > Completed 100 requests > Completed 200 requests > Completed 300 requests > Completed 400 requests > Completed 500 requests > Finished 500 requests > > > Server Software: Hunchentoot > Server Hostname: 127.0.0.1 > Server Port: 4242 > > Document Path: /yo > Document Length: 21 bytes > > Concurrency Level: 2 > Time taken for tests: 0.655 seconds > Complete requests: 500 > Failed requests: 0 > Write errors: 0 > Total transferred: 84500 bytes > HTML transferred: 10500 bytes > Requests per second: 762.88 [#/sec] (mean) > Time per request: 2.622 [ms] (mean) > Time per request: 1.311 [ms] (mean, across all concurrent requests) > Transfer rate: 125.91 [Kbytes/sec] received > > Connection Times (ms) > min mean[+/-sd] median max > Connect: 0 0 0.1 0 1 > Processing: 1 2 1.7 2 14 > Waiting: 0 2 1.7 2 14 > Total: 1 3 1.7 2 14 > > Percentage of the requests served within a certain time (ms) > 50% 2 > 66% 2 > 75% 2 > 80% 2 > 90% 6 > 95% 7 > 98% 7 > 99% 7 > 100% 14 (longest request) > Stix:ccl wade$ > > _______________________________________________ > tbnl-devel site list > tbnl-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/tbnl-devel -------------- next part -------------- A non-text attachment was scrubbed... Name: dumb-server.lisp Type: application/octet-stream Size: 3581 bytes Desc: not available URL: -------------- next part -------------- From wade.humeniuk at gmail.com Fri Aug 20 01:01:57 2010 From: wade.humeniuk at gmail.com (Wade Humeniuk) Date: Thu, 19 Aug 2010 19:01:57 -0600 Subject: [hunchentoot-devel] serious H'toot performance problem on CCL OSX ? In-Reply-To: References: <84A7D5E8-3D4D-472D-8D98-AEA021909765@gmail.com> Message-ID: I am running a MacBook Pro (about 4 years old). Core 2 ~2.1 GHz I get no errors in any run. Seems to run the same no matter what test I do, CL-USER> (do-dumb-server-loop :port 4001) Stix:~ wade$ ab -n 500 -c 1 http://127.0.0.1:4001/yo This is ApacheBench, Version 2.3 <$Revision: 655654 $> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/ Benchmarking 127.0.0.1 (be patient) Completed 100 requests Completed 200 requests Completed 300 requests Completed 400 requests Completed 500 requests Finished 500 requests Server Software: dumb Server Hostname: 127.0.0.1 Server Port: 4001 Document Path: /yo Document Length: 21 bytes Concurrency Level: 1 Time taken for tests: 0.599 seconds Complete requests: 500 Failed requests: 0 Write errors: 0 Total transferred: 47000 bytes HTML transferred: 10500 bytes Requests per second: 835.27 [#/sec] (mean) Time per request: 1.197 [ms] (mean) Time per request: 1.197 [ms] (mean, across all concurrent requests) Transfer rate: 76.67 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 0 0 0.0 0 1 Processing: 1 1 0.8 1 5 Waiting: 1 1 0.8 1 5 Total: 1 1 0.8 1 5 Percentage of the requests served within a certain time (ms) 50% 1 66% 1 75% 1 80% 1 90% 1 95% 4 98% 4 99% 4 100% 5 (longest request) Stix:~ wade$ ab -n 500 -c 2 http://127.0.0.1:4001/yo This is ApacheBench, Version 2.3 <$Revision: 655654 $> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/ Benchmarking 127.0.0.1 (be patient) Completed 100 requests Completed 200 requests Completed 300 requests Completed 400 requests Completed 500 requests Finished 500 requests Server Software: dumb Server Hostname: 127.0.0.1 Server Port: 4001 Document Path: /yo Document Length: 21 bytes Concurrency Level: 2 Time taken for tests: 0.785 seconds Complete requests: 500 Failed requests: 3 (Connect: 0, Receive: 0, Length: 3, Exceptions: 0) Write errors: 0 Total transferred: 46718 bytes HTML transferred: 10437 bytes Requests per second: 637.18 [#/sec] (mean) Time per request: 3.139 [ms] (mean) Time per request: 1.569 [ms] (mean, across all concurrent requests) Transfer rate: 58.14 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 0 0 0.0 0 0 Processing: 0 3 21.5 1 330 Waiting: 0 1 0.8 1 5 Total: 0 3 21.5 1 331 Percentage of the requests served within a certain time (ms) 50% 1 66% 1 75% 1 80% 1 90% 1 95% 4 98% 4 99% 5 100% 331 (longest request) Stix:~ wade$ ab -n 500 -c 10 http://127.0.0.1:4001/yo This is ApacheBench, Version 2.3 <$Revision: 655654 $> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/ Benchmarking 127.0.0.1 (be patient) Completed 100 requests Completed 200 requests Completed 300 requests Completed 400 requests Completed 500 requests Finished 500 requests Server Software: dumb Server Hostname: 127.0.0.1 Server Port: 4001 Document Path: /yo Document Length: 21 bytes Concurrency Level: 10 Time taken for tests: 0.679 seconds Complete requests: 500 Failed requests: 22 (Connect: 0, Receive: 0, Length: 22, Exceptions: 0) Write errors: 0 Total transferred: 44932 bytes HTML transferred: 10038 bytes Requests per second: 735.92 [#/sec] (mean) Time per request: 13.588 [ms] (mean) Time per request: 1.359 [ms] (mean, across all concurrent requests) Transfer rate: 64.58 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 0 0 0.1 0 1 Processing: 0 13 59.5 1 337 Waiting: 0 2 1.8 1 10 Total: 0 13 59.5 1 337 Percentage of the requests served within a certain time (ms) 50% 1 66% 1 75% 1 80% 4 90% 6 95% 9 98% 327 99% 330 100% 337 (longest request) Stix:~ wade$ CL-USER> (do-dumb-server-loop/ccl :port 4001) Stix:~ wade$ ab -n 500 -c 1 http://127.0.0.1:4001/yo This is ApacheBench, Version 2.3 <$Revision: 655654 $> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/ Benchmarking 127.0.0.1 (be patient) Completed 100 requests Completed 200 requests Completed 300 requests Completed 400 requests Completed 500 requests Finished 500 requests Server Software: dumb Server Hostname: 127.0.0.1 Server Port: 4001 Document Path: /yo Document Length: 21 bytes Concurrency Level: 1 Time taken for tests: 0.590 seconds Complete requests: 500 Failed requests: 0 Write errors: 0 Total transferred: 47000 bytes HTML transferred: 10500 bytes Requests per second: 847.87 [#/sec] (mean) Time per request: 1.179 [ms] (mean) Time per request: 1.179 [ms] (mean, across all concurrent requests) Transfer rate: 77.83 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 0 0 0.0 0 0 Processing: 1 1 0.8 1 5 Waiting: 1 1 0.8 1 5 Total: 1 1 0.8 1 5 Percentage of the requests served within a certain time (ms) 50% 1 66% 1 75% 1 80% 1 90% 1 95% 4 98% 4 99% 5 100% 5 (longest request) Stix:~ wade$ ab -n 500 -c 2 http://127.0.0.1:4001/yo This is ApacheBench, Version 2.3 <$Revision: 655654 $> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/ Benchmarking 127.0.0.1 (be patient) Completed 100 requests Completed 200 requests Completed 300 requests Completed 400 requests Completed 500 requests Finished 500 requests Server Software: dumb Server Hostname: 127.0.0.1 Server Port: 4001 Document Path: /yo Document Length: 21 bytes Concurrency Level: 2 Time taken for tests: 0.738 seconds Complete requests: 500 Failed requests: 3 (Connect: 0, Receive: 0, Length: 3, Exceptions: 0) Write errors: 0 Total transferred: 46718 bytes HTML transferred: 10437 bytes Requests per second: 677.52 [#/sec] (mean) Time per request: 2.952 [ms] (mean) Time per request: 1.476 [ms] (mean, across all concurrent requests) Transfer rate: 61.82 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 0 0 0.0 0 1 Processing: 0 2 21.1 1 331 Waiting: 0 1 0.8 1 4 Total: 0 3 21.1 1 331 Percentage of the requests served within a certain time (ms) 50% 1 66% 1 75% 1 80% 1 90% 1 95% 4 98% 4 99% 4 100% 331 (longest request) Stix:~ wade$ ab -n 500 -c 10 http://127.0.0.1:4001/yo This is ApacheBench, Version 2.3 <$Revision: 655654 $> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/ Benchmarking 127.0.0.1 (be patient) Completed 100 requests Completed 200 requests Completed 300 requests Completed 400 requests Completed 500 requests Finished 500 requests Server Software: dumb Server Hostname: 127.0.0.1 Server Port: 4001 Document Path: /yo Document Length: 21 bytes Concurrency Level: 10 Time taken for tests: 0.710 seconds Complete requests: 500 Failed requests: 27 (Connect: 0, Receive: 0, Length: 27, Exceptions: 0) Write errors: 0 Total transferred: 44462 bytes HTML transferred: 9933 bytes Requests per second: 704.28 [#/sec] (mean) Time per request: 14.199 [ms] (mean) Time per request: 1.420 [ms] (mean, across all concurrent requests) Transfer rate: 61.16 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 0 0 0.2 0 3 Processing: 0 14 58.8 1 331 Waiting: 0 2 2.0 1 10 Total: 0 14 58.8 1 331 Percentage of the requests served within a certain time (ms) 50% 1 66% 1 75% 2 80% 4 90% 7 95% 26 98% 313 99% 330 100% 331 (longest request) Stix:~ wade$ From wade.humeniuk at gmail.com Fri Aug 20 01:09:52 2010 From: wade.humeniuk at gmail.com (Wade Humeniuk) Date: Thu, 19 Aug 2010 19:09:52 -0600 Subject: [hunchentoot-devel] serious H'toot performance problem on CCL OSX ? In-Reply-To: References: <84A7D5E8-3D4D-472D-8D98-AEA021909765@gmail.com> Message-ID: I actually do get some errors. From jetmonk at gmail.com Fri Aug 20 10:39:40 2010 From: jetmonk at gmail.com (JTK) Date: Fri, 20 Aug 2010 00:39:40 -1000 Subject: [hunchentoot-devel] serious H'toot performance problem on CCL OSX ? In-Reply-To: References: <84A7D5E8-3D4D-472D-8D98-AEA021909765@gmail.com> Message-ID: It looks like there is something inside my seemingly identical CCL/H'toot that makes it run 1/10 as fast as Wade's. For what it is worth, running 'top' during the benchmark shows that CCL is running at 100%+ CPU, but the 'ab' benchmark tool making the requests is using almost nothing. Unfortunately, profiling on CCL is not straightforward, so I can't figure out where the CPU is spending its time. It's not terribly important for me, because I'll probably run it on a different platform than a Mac. It's sure irksome and inxplicable. Thanks to everyone who looked at this. On Aug 19, 2010, at 3:01 PM, Wade Humeniuk wrote: > I am running a MacBook Pro (about 4 years old). Core 2 ~2.1 GHz > > I get no errors in any run. > > Seems to run the same no matter what test I do, > > CL-USER> (do-dumb-server-loop :port 4001) > > > Stix:~ wade$ ab -n 500 -c 1 http://127.0.0.1:4001/yo > This is ApacheBench, Version 2.3 <$Revision: 655654 $> > Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ > Licensed to The Apache Software Foundation, http://www.apache.org/ > > Benchmarking 127.0.0.1 (be patient) > Completed 100 requests > Completed 200 requests > Completed 300 requests > Completed 400 requests > Completed 500 requests > Finished 500 requests > > > Server Software: dumb > Server Hostname: 127.0.0.1 > Server Port: 4001 > > Document Path: /yo > Document Length: 21 bytes > > Concurrency Level: 1 > Time taken for tests: 0.599 seconds > Complete requests: 500 > Failed requests: 0 > Write errors: 0 > Total transferred: 47000 bytes > HTML transferred: 10500 bytes > Requests per second: 835.27 [#/sec] (mean) > Time per request: 1.197 [ms] (mean) > Time per request: 1.197 [ms] (mean, across all concurrent requests) > Transfer rate: 76.67 [Kbytes/sec] received > > Connection Times (ms) > min mean[+/-sd] median max > Connect: 0 0 0.0 0 1 > Processing: 1 1 0.8 1 5 > Waiting: 1 1 0.8 1 5 > Total: 1 1 0.8 1 5 > > Percentage of the requests served within a certain time (ms) > 50% 1 > 66% 1 > 75% 1 > 80% 1 > 90% 1 > 95% 4 > 98% 4 > 99% 4 > 100% 5 (longest request) > Stix:~ wade$ ab -n 500 -c 2 http://127.0.0.1:4001/yo > This is ApacheBench, Version 2.3 <$Revision: 655654 $> > Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ > Licensed to The Apache Software Foundation, http://www.apache.org/ > > Benchmarking 127.0.0.1 (be patient) > Completed 100 requests > Completed 200 requests > Completed 300 requests > Completed 400 requests > Completed 500 requests > Finished 500 requests > > > Server Software: dumb > Server Hostname: 127.0.0.1 > Server Port: 4001 > > Document Path: /yo > Document Length: 21 bytes > > Concurrency Level: 2 > Time taken for tests: 0.785 seconds > Complete requests: 500 > Failed requests: 3 > (Connect: 0, Receive: 0, Length: 3, Exceptions: 0) > Write errors: 0 > Total transferred: 46718 bytes > HTML transferred: 10437 bytes > Requests per second: 637.18 [#/sec] (mean) > Time per request: 3.139 [ms] (mean) > Time per request: 1.569 [ms] (mean, across all concurrent requests) > Transfer rate: 58.14 [Kbytes/sec] received > > Connection Times (ms) > min mean[+/-sd] median max > Connect: 0 0 0.0 0 0 > Processing: 0 3 21.5 1 330 > Waiting: 0 1 0.8 1 5 > Total: 0 3 21.5 1 331 > > Percentage of the requests served within a certain time (ms) > 50% 1 > 66% 1 > 75% 1 > 80% 1 > 90% 1 > 95% 4 > 98% 4 > 99% 5 > 100% 331 (longest request) > Stix:~ wade$ ab -n 500 -c 10 http://127.0.0.1:4001/yo > This is ApacheBench, Version 2.3 <$Revision: 655654 $> > Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ > Licensed to The Apache Software Foundation, http://www.apache.org/ > > Benchmarking 127.0.0.1 (be patient) > Completed 100 requests > Completed 200 requests > Completed 300 requests > Completed 400 requests > Completed 500 requests > Finished 500 requests > > > Server Software: dumb > Server Hostname: 127.0.0.1 > Server Port: 4001 > > Document Path: /yo > Document Length: 21 bytes > > Concurrency Level: 10 > Time taken for tests: 0.679 seconds > Complete requests: 500 > Failed requests: 22 > (Connect: 0, Receive: 0, Length: 22, Exceptions: 0) > Write errors: 0 > Total transferred: 44932 bytes > HTML transferred: 10038 bytes > Requests per second: 735.92 [#/sec] (mean) > Time per request: 13.588 [ms] (mean) > Time per request: 1.359 [ms] (mean, across all concurrent requests) > Transfer rate: 64.58 [Kbytes/sec] received > > Connection Times (ms) > min mean[+/-sd] median max > Connect: 0 0 0.1 0 1 > Processing: 0 13 59.5 1 337 > Waiting: 0 2 1.8 1 10 > Total: 0 13 59.5 1 337 > > Percentage of the requests served within a certain time (ms) > 50% 1 > 66% 1 > 75% 1 > 80% 4 > 90% 6 > 95% 9 > 98% 327 > 99% 330 > 100% 337 (longest request) > Stix:~ wade$ > > > CL-USER> (do-dumb-server-loop/ccl :port 4001) > > > Stix:~ wade$ ab -n 500 -c 1 http://127.0.0.1:4001/yo > This is ApacheBench, Version 2.3 <$Revision: 655654 $> > Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ > Licensed to The Apache Software Foundation, http://www.apache.org/ > > Benchmarking 127.0.0.1 (be patient) > Completed 100 requests > Completed 200 requests > Completed 300 requests > Completed 400 requests > Completed 500 requests > Finished 500 requests > > > Server Software: dumb > Server Hostname: 127.0.0.1 > Server Port: 4001 > > Document Path: /yo > Document Length: 21 bytes > > Concurrency Level: 1 > Time taken for tests: 0.590 seconds > Complete requests: 500 > Failed requests: 0 > Write errors: 0 > Total transferred: 47000 bytes > HTML transferred: 10500 bytes > Requests per second: 847.87 [#/sec] (mean) > Time per request: 1.179 [ms] (mean) > Time per request: 1.179 [ms] (mean, across all concurrent requests) > Transfer rate: 77.83 [Kbytes/sec] received > > Connection Times (ms) > min mean[+/-sd] median max > Connect: 0 0 0.0 0 0 > Processing: 1 1 0.8 1 5 > Waiting: 1 1 0.8 1 5 > Total: 1 1 0.8 1 5 > > Percentage of the requests served within a certain time (ms) > 50% 1 > 66% 1 > 75% 1 > 80% 1 > 90% 1 > 95% 4 > 98% 4 > 99% 5 > 100% 5 (longest request) > Stix:~ wade$ ab -n 500 -c 2 http://127.0.0.1:4001/yo > This is ApacheBench, Version 2.3 <$Revision: 655654 $> > Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ > Licensed to The Apache Software Foundation, http://www.apache.org/ > > Benchmarking 127.0.0.1 (be patient) > Completed 100 requests > Completed 200 requests > Completed 300 requests > Completed 400 requests > Completed 500 requests > Finished 500 requests > > > Server Software: dumb > Server Hostname: 127.0.0.1 > Server Port: 4001 > > Document Path: /yo > Document Length: 21 bytes > > Concurrency Level: 2 > Time taken for tests: 0.738 seconds > Complete requests: 500 > Failed requests: 3 > (Connect: 0, Receive: 0, Length: 3, Exceptions: 0) > Write errors: 0 > Total transferred: 46718 bytes > HTML transferred: 10437 bytes > Requests per second: 677.52 [#/sec] (mean) > Time per request: 2.952 [ms] (mean) > Time per request: 1.476 [ms] (mean, across all concurrent requests) > Transfer rate: 61.82 [Kbytes/sec] received > > Connection Times (ms) > min mean[+/-sd] median max > Connect: 0 0 0.0 0 1 > Processing: 0 2 21.1 1 331 > Waiting: 0 1 0.8 1 4 > Total: 0 3 21.1 1 331 > > Percentage of the requests served within a certain time (ms) > 50% 1 > 66% 1 > 75% 1 > 80% 1 > 90% 1 > 95% 4 > 98% 4 > 99% 4 > 100% 331 (longest request) > Stix:~ wade$ ab -n 500 -c 10 http://127.0.0.1:4001/yo > This is ApacheBench, Version 2.3 <$Revision: 655654 $> > Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ > Licensed to The Apache Software Foundation, http://www.apache.org/ > > Benchmarking 127.0.0.1 (be patient) > Completed 100 requests > Completed 200 requests > Completed 300 requests > Completed 400 requests > Completed 500 requests > Finished 500 requests > > > Server Software: dumb > Server Hostname: 127.0.0.1 > Server Port: 4001 > > Document Path: /yo > Document Length: 21 bytes > > Concurrency Level: 10 > Time taken for tests: 0.710 seconds > Complete requests: 500 > Failed requests: 27 > (Connect: 0, Receive: 0, Length: 27, Exceptions: 0) > Write errors: 0 > Total transferred: 44462 bytes > HTML transferred: 9933 bytes > Requests per second: 704.28 [#/sec] (mean) > Time per request: 14.199 [ms] (mean) > Time per request: 1.420 [ms] (mean, across all concurrent requests) > Transfer rate: 61.16 [Kbytes/sec] received > > Connection Times (ms) > min mean[+/-sd] median max > Connect: 0 0 0.2 0 3 > Processing: 0 14 58.8 1 331 > Waiting: 0 2 2.0 1 10 > Total: 0 14 58.8 1 331 > > Percentage of the requests served within a certain time (ms) > 50% 1 > 66% 1 > 75% 2 > 80% 4 > 90% 7 > 95% 26 > 98% 313 > 99% 330 > 100% 331 (longest request) > Stix:~ wade$ > > _______________________________________________ > tbnl-devel site list > tbnl-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/tbnl-devel From fahree at gmail.com Fri Aug 20 22:11:39 2010 From: fahree at gmail.com (=?ISO-8859-1?Q?Far=E9?=) Date: Fri, 20 Aug 2010 18:11:39 -0400 Subject: [hunchentoot-devel] 'max-threads' behavior for Hunchentoot In-Reply-To: References: <96F4A9B1-5603-4DE1-9144-415C9251DAA5@itasoftware.com> <4C05217C.4040406@itasoftware.com> <16493326-0713-4954-8976-19ED0C10D74C@itasoftware.com> <836C1566-0760-4000-AAA9-440FBAAB51EA@itasoftware.com> <586901B0-D79A-4AE5-908F-4FFEE9E3AF38@itasoftware.com> <18913F0E-C4B7-4044-8D02-45BCBBA0CDDE@itasoftware.com> Message-ID: Dear Hunchentooters, here's my patch against the latest svn, de-xcvb-ified. That's what I'm running at ITA, it seems to be passing the QRes precheckin. Can you review, and apply if satisfactory? Suggested commit message (from Scott McKay's svn commit): Extend Hunchentoot's 'one-thread-per-connection-taskmaster' to support 'max-threads' semantics, i.e., don't create a new thread if we've max out. Add a 'pooled-thread-per-connection-taskmaster' that will eventually use a thread pool, if profiling indicates. Fix the 'handle-incoming-connection' to implement the new behavior. Add a commented-out implementation of 'accept-connections' that might give better performance. This needs to be discussed with the Hunchentoot maintainers. Address the review comments and discussions between Scott McKay and Hans Huebner, who is one of the H'toot maintainers. Also correctly issue HTTP 503 when the server runs out of threads. (work by Scott McKay) [ Fran?ois-Ren? ?VB Rideau | Reflection&Cybernethics | http://fare.tunes.org ] Comparing oneself with Galileo or Einstein is certainly good for the ego ? provided one refrains from going into too much detail. ? John McCarthy -------------- next part -------------- A non-text attachment was scrubbed... Name: max-foo-count.diff Type: text/x-diff Size: 36592 bytes Desc: not available URL: From hans.huebner at gmail.com Sat Aug 21 06:06:55 2010 From: hans.huebner at gmail.com (=?ISO-8859-1?Q?Hans_H=FCbner?=) Date: Sat, 21 Aug 2010 08:06:55 +0200 Subject: [hunchentoot-devel] 'max-threads' behavior for Hunchentoot In-Reply-To: References: <96F4A9B1-5603-4DE1-9144-415C9251DAA5@itasoftware.com> <4C05217C.4040406@itasoftware.com> <16493326-0713-4954-8976-19ED0C10D74C@itasoftware.com> <836C1566-0760-4000-AAA9-440FBAAB51EA@itasoftware.com> <586901B0-D79A-4AE5-908F-4FFEE9E3AF38@itasoftware.com> <18913F0E-C4B7-4044-8D02-45BCBBA0CDDE@itasoftware.com> Message-ID: Thanks Far?, I have committed the patch, minus the whitespace-only changes. Everyone, please give it a spin and report any errors that you may find. -Hans 2010/8/21 Far? : > Dear Hunchentooters, > > here's my patch against the latest svn, de-xcvb-ified. That's what I'm > running at ITA, it seems to be passing the QRes precheckin. Can you > review, and apply if satisfactory? > > Suggested commit message (from Scott McKay's svn commit): > > ? ?Extend Hunchentoot's 'one-thread-per-connection-taskmaster' > ? ? ?to support 'max-threads' semantics, i.e., don't create > ? ? ?a new thread if we've max out. > > ? ?Add a 'pooled-thread-per-connection-taskmaster' that will > ? ? ?eventually use a thread pool, if profiling indicates. > ? ?Fix the 'handle-incoming-connection' to implement the > ? ? ?new behavior. > ? ?Add a commented-out implementation of 'accept-connections' > ? ? ?that might give better performance. ?This needs to be > ? ? ?discussed with the Hunchentoot maintainers. > > ? ?Address the review comments and discussions between Scott McKay > ? ?and Hans Huebner, who is one of the H'toot maintainers. > ? ?Also correctly issue HTTP 503 when the server runs out of threads. > > (work by Scott McKay) > > [ Fran?ois-Ren? ?VB Rideau | Reflection&Cybernethics | http://fare.tunes.org ] > Comparing oneself with Galileo or Einstein is certainly good for the ego ? > provided one refrains from going into too much detail. ?? John McCarthy > From edi at agharta.de Sun Aug 22 19:36:13 2010 From: edi at agharta.de (Edi Weitz) Date: Sun, 22 Aug 2010 21:36:13 +0200 Subject: [hunchentoot-devel] 'max-threads' behavior for Hunchentoot In-Reply-To: References: <96F4A9B1-5603-4DE1-9144-415C9251DAA5@itasoftware.com> <4C05217C.4040406@itasoftware.com> <16493326-0713-4954-8976-19ED0C10D74C@itasoftware.com> <836C1566-0760-4000-AAA9-440FBAAB51EA@itasoftware.com> <586901B0-D79A-4AE5-908F-4FFEE9E3AF38@itasoftware.com> <18913F0E-C4B7-4044-8D02-45BCBBA0CDDE@itasoftware.com> Message-ID: Far?, thanks for the patch which generally looks very good. However, I just had to revert it because it breaks the LispWorks implementation. I don't expect you to provide the new features for LW as well, but at least on LW the code should still compile and load in its old form - I'm relying on it for my daily work. Also, I don't see the need for factoring out the version number in a separate file. Thanks, Edi. 2010/8/21 Hans H?bner : > Thanks Far?, > > I have committed the patch, minus the whitespace-only changes. > Everyone, please give it a spin and report any errors that you may > find. > > -Hans > > 2010/8/21 Far? : >> Dear Hunchentooters, >> >> here's my patch against the latest svn, de-xcvb-ified. That's what I'm >> running at ITA, it seems to be passing the QRes precheckin. Can you >> review, and apply if satisfactory? >> >> Suggested commit message (from Scott McKay's svn commit): >> >> ? ?Extend Hunchentoot's 'one-thread-per-connection-taskmaster' >> ? ? ?to support 'max-threads' semantics, i.e., don't create >> ? ? ?a new thread if we've max out. >> >> ? ?Add a 'pooled-thread-per-connection-taskmaster' that will >> ? ? ?eventually use a thread pool, if profiling indicates. >> ? ?Fix the 'handle-incoming-connection' to implement the >> ? ? ?new behavior. >> ? ?Add a commented-out implementation of 'accept-connections' >> ? ? ?that might give better performance. ?This needs to be >> ? ? ?discussed with the Hunchentoot maintainers. >> >> ? ?Address the review comments and discussions between Scott McKay >> ? ?and Hans Huebner, who is one of the H'toot maintainers. >> ? ?Also correctly issue HTTP 503 when the server runs out of threads. >> >> (work by Scott McKay) >> >> [ Fran?ois-Ren? ?VB Rideau | Reflection&Cybernethics | http://fare.tunes.org ] >> Comparing oneself with Galileo or Einstein is certainly good for the ego ? >> provided one refrains from going into too much detail. ?? John McCarthy >> > > From peter at gigamonkeys.com Mon Aug 23 05:26:55 2010 From: peter at gigamonkeys.com (Peter Seibel) Date: Sun, 22 Aug 2010 22:26:55 -0700 Subject: [hunchentoot-devel] usocket:timeout-errors and *catch-errors-p* Message-ID: If I set *CATCH-ERRORS-P* to NIL, is it expected/desired behavior that the timeout-errors generated when (I think) the client disconnects without making a full request or some such, will land you in the debugger? I gather I can define a method on MAYBE-INVOKE-DEBUGGER to surpress that but I just wanted to make sure that's The Right Thing. -Peter -- Peter Seibel http://www.codequarterly.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From hans.huebner at gmail.com Mon Aug 23 06:27:56 2010 From: hans.huebner at gmail.com (=?ISO-8859-1?Q?Hans_H=FCbner?=) Date: Mon, 23 Aug 2010 08:27:56 +0200 Subject: [hunchentoot-devel] usocket:timeout-errors and *catch-errors-p* In-Reply-To: References: Message-ID: On Mon, Aug 23, 2010 at 07:26, Peter Seibel wrote: > If I set *CATCH-ERRORS-P* to NIL, is it expected/desired behavior that the > timeout-errors generated when (I think) the client disconnects without > making a full request or some such, will land you in the debugger? This is a bug. Timeouts that occur while Hunchentoot is waiting for a new request should always be ignored. Timeouts that occur when a partial request has been request has been received _should_ be intercepted, though, as those are not part of a normal exchange. I've added the issue to our bug tracker. -Hans From fahree at gmail.com Mon Aug 23 13:22:20 2010 From: fahree at gmail.com (=?ISO-8859-1?Q?Far=E9?=) Date: Mon, 23 Aug 2010 09:22:20 -0400 Subject: [hunchentoot-devel] 'max-threads' behavior for Hunchentoot In-Reply-To: References: <96F4A9B1-5603-4DE1-9144-415C9251DAA5@itasoftware.com> <4C05217C.4040406@itasoftware.com> <16493326-0713-4954-8976-19ED0C10D74C@itasoftware.com> <836C1566-0760-4000-AAA9-440FBAAB51EA@itasoftware.com> <586901B0-D79A-4AE5-908F-4FFEE9E3AF38@itasoftware.com> <18913F0E-C4B7-4044-8D02-45BCBBA0CDDE@itasoftware.com> Message-ID: Dear Edi, On 22 August 2010 15:36, Edi Weitz wrote: > Far?, thanks for the patch which generally looks very good. ?However, > I just had to revert it because it breaks the LispWorks > implementation. ?I don't expect you to provide the new features for LW > as well, but at least on LW the code should still compile and load in > its old form - I'm relying on it for my daily work. > Oops, I didn't realize the patch was not lispworks-friendly. I'll see if there's anything obvious I can do to make it compile as before on LispWorks. > Also, I don't see the need for factoring out the version number in a > separate file. Oh, that was an independent change I did to make h'toot more friendly to xcvb (that doesn't read the asd file thus will bork on the version) and the future more declarative asdf 3 (in which asd files would putatively not contain code?). I can separate it from the rest if you wish. [ Fran?ois-Ren? ?VB Rideau | Reflection&Cybernethics | http://fare.tunes.org ] Mail addiction is a malediction. From edi at agharta.de Mon Aug 23 15:21:06 2010 From: edi at agharta.de (Edi Weitz) Date: Mon, 23 Aug 2010 17:21:06 +0200 Subject: [hunchentoot-devel] 'max-threads' behavior for Hunchentoot In-Reply-To: References: <96F4A9B1-5603-4DE1-9144-415C9251DAA5@itasoftware.com> <4C05217C.4040406@itasoftware.com> <16493326-0713-4954-8976-19ED0C10D74C@itasoftware.com> <836C1566-0760-4000-AAA9-440FBAAB51EA@itasoftware.com> <586901B0-D79A-4AE5-908F-4FFEE9E3AF38@itasoftware.com> <18913F0E-C4B7-4044-8D02-45BCBBA0CDDE@itasoftware.com> Message-ID: On Mon, Aug 23, 2010 at 3:22 PM, Far? wrote: > Oops, I didn't realize the patch was not lispworks-friendly. I'll see > if there's anything obvious I can do to make it compile as before on > LispWorks. >From a quick look, I'd say you just have to check that LispWorks doesn't see any of the symbols from Bordeaux Threads and usocket. If you end up with code where the new features only work on non-LispWorks compilers, that's not a problem. I'll take care of the rest then. > Oh, that was an independent change I did to make h'toot more friendly > to xcvb (that doesn't read the asd file thus will bork on the version) > and the future more declarative asdf 3 (in which asd files would > putatively not contain code?). I can separate it from the rest if you > wish. Yes, please. Thanks, Edi. From fahree at gmail.com Mon Aug 23 17:48:32 2010 From: fahree at gmail.com (=?ISO-8859-1?Q?Far=E9?=) Date: Mon, 23 Aug 2010 13:48:32 -0400 Subject: [hunchentoot-devel] 'max-threads' behavior for Hunchentoot In-Reply-To: References: <96F4A9B1-5603-4DE1-9144-415C9251DAA5@itasoftware.com> <4C05217C.4040406@itasoftware.com> <16493326-0713-4954-8976-19ED0C10D74C@itasoftware.com> <836C1566-0760-4000-AAA9-440FBAAB51EA@itasoftware.com> <586901B0-D79A-4AE5-908F-4FFEE9E3AF38@itasoftware.com> <18913F0E-C4B7-4044-8D02-45BCBBA0CDDE@itasoftware.com> Message-ID: On 23 August 2010 11:21, Edi Weitz wrote: >> Oops, I didn't realize the patch was not lispworks-friendly. I'll see >> if there's anything obvious I can do to make it compile as before on >> LispWorks. > > From a quick look, I'd say you just have to check that LispWorks > doesn't see any of the symbols from Bordeaux Threads and usocket. ?If > you end up with code where the new features only work on non-LispWorks > compilers, that's not a problem. ?I'll take care of the rest then. > Hum. At some point we use make-condition-variable, which in bordeaux-threads is a non-trivial bit of code on lispworks. Is there a good reason to not use bordeaux-threads on lispworks? What is the right thing to do here? >> Oh, that was an independent change I did to make h'toot more friendly >> to xcvb (that doesn't read the asd file thus will bork on the version) >> and the future more declarative asdf 3 (in which asd files would >> putatively not contain code?). I can separate it from the rest if you >> wish. > > Yes, please. > Will do. [ Fran?ois-Ren? ?VB Rideau | Reflection&Cybernethics | http://fare.tunes.org ] Wishing without work is like fishing without bait. ? Frank Tyger From edi at agharta.de Mon Aug 23 20:21:57 2010 From: edi at agharta.de (Edi Weitz) Date: Mon, 23 Aug 2010 22:21:57 +0200 Subject: [hunchentoot-devel] 'max-threads' behavior for Hunchentoot In-Reply-To: References: <96F4A9B1-5603-4DE1-9144-415C9251DAA5@itasoftware.com> <4C05217C.4040406@itasoftware.com> <16493326-0713-4954-8976-19ED0C10D74C@itasoftware.com> <836C1566-0760-4000-AAA9-440FBAAB51EA@itasoftware.com> <586901B0-D79A-4AE5-908F-4FFEE9E3AF38@itasoftware.com> <18913F0E-C4B7-4044-8D02-45BCBBA0CDDE@itasoftware.com> Message-ID: On Mon, Aug 23, 2010 at 7:48 PM, Far? wrote: > Is there a good reason to not use bordeaux-threads on lispworks? Yes, the LispWorks version of Hunchentoot (which is the original Hunchentoot which only ran on LW) doesn't use any of the compatibility libs like BT, usocket, and cl+ssl. I want it to stay that way - the less dependencies, the better. > What is the right thing to do here? Can't you just comment out all the new stuff with #-:lispworks? As I said, I'll take care of the LW version. Cheers, Edi. From peter at gigamonkeys.com Mon Aug 23 23:45:55 2010 From: peter at gigamonkeys.com (Peter Seibel) Date: Mon, 23 Aug 2010 16:45:55 -0700 Subject: [hunchentoot-devel] usocket:timeout-errors and *catch-errors-p* In-Reply-To: References: Message-ID: So the problem seems to be in READ-INITIAL-REQUEST-LINE where HANDLER-CASE* lets MAYBE-INVOKE-DEBUGGER handle the condition before the cases of the HANDLER-CASE. I may well be missing something, but it seems like mabye HANDLER-CASE* should be changed as in the following patch so MAYBE-INVOKE-DEBUGGER is only invoked for unhandled conditions. -Peter --- conditions.lisp 2010-08-23 16:29:48.000000000 -0700 +++ fixed-conditions.lisp 2010-08-23 16:43:26.000000000 -0700 @@ -112,8 +112,8 @@ (defmacro handler-case* (expression &rest clauses) "Like HANDLER-CASE, but observes *CATCH-ERRORS-P*." - `(handler-case (with-debugger ,expression) - , at clauses)) + `(with-debugger + (handler-case ,expression , at clauses))) (defun get-backtrace () "Returns a string with a backtrace of what the Lisp system thinks is On Sun, Aug 22, 2010 at 11:27 PM, Hans H?bner wrote: > On Mon, Aug 23, 2010 at 07:26, Peter Seibel wrote: > > If I set *CATCH-ERRORS-P* to NIL, is it expected/desired behavior that > the > > timeout-errors generated when (I think) the client disconnects without > > making a full request or some such, will land you in the debugger? > > This is a bug. Timeouts that occur while Hunchentoot is waiting for a > new request should always be ignored. Timeouts that occur when a > partial request has been request has been received _should_ be > intercepted, though, as those are not part of a normal exchange. > > I've added the issue to our bug tracker. > > -Hans > > _______________________________________________ > tbnl-devel site list > tbnl-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/tbnl-devel > -- Peter Seibel http://www.codequarterly.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From hans.huebner at gmail.com Tue Aug 24 04:42:36 2010 From: hans.huebner at gmail.com (=?ISO-8859-1?Q?Hans_H=FCbner?=) Date: Tue, 24 Aug 2010 06:42:36 +0200 Subject: [hunchentoot-devel] usocket:timeout-errors and *catch-errors-p* In-Reply-To: References: Message-ID: Peter, before moving forward with your patch, I tried to reproduce the wrong behavior and failed. From your report, I would have expected that if I set *CATCH-ERRORS-P* to NIL, open a connection to Hunchentoot and then wait, I'd be sent to the debugger. This does not seem to be the case, even when I send the initial request line. Even though I'd think that errors should be intercepted only while reading the initial request line, the current behavior seems to be acceptable. Could it be that the timeouts that you see and find disturbing are coming from somewhere else? Can you provide a way to reproduce the issue? Thanks, Hans On Tue, Aug 24, 2010 at 01:45, Peter Seibel wrote: > So the problem seems to be in READ-INITIAL-REQUEST-LINE where HANDLER-CASE* > lets MAYBE-INVOKE-DEBUGGER handle the condition before the cases of the > HANDLER-CASE. > I may well be missing something, but it seems like mabye HANDLER-CASE* > should be changed as in the following patch so MAYBE-INVOKE-DEBUGGER is only > invoked for unhandled conditions. > -Peter > --- conditions.lisp 2010-08-23 16:29:48.000000000 -0700 > +++ fixed-conditions.lisp 2010-08-23 16:43:26.000000000 -0700 > @@ -112,8 +112,8 @@ > > ?(defmacro handler-case* (expression &rest clauses) > ?? "Like HANDLER-CASE, but observes *CATCH-ERRORS-P*." > - ?`(handler-case (with-debugger ,expression) > - ? ? , at clauses)) > + ?`(with-debugger > + ? ? (handler-case ,expression , at clauses))) > > ?(defun get-backtrace () > ?? "Returns a string with a backtrace of what the Lisp system thinks is > > On Sun, Aug 22, 2010 at 11:27 PM, Hans H?bner > wrote: >> >> On Mon, Aug 23, 2010 at 07:26, Peter Seibel wrote: >> > If I set *CATCH-ERRORS-P* to NIL, is it expected/desired behavior that >> > the >> > timeout-errors generated when (I think) the client disconnects without >> > making a full request or some such, will land you in the debugger? >> >> This is a bug. ?Timeouts that occur while Hunchentoot is waiting for a >> new request should always be ignored. ?Timeouts that occur when a >> partial request has been request has been received _should_ be >> intercepted, though, as those are not part of a normal exchange. >> >> I've added the issue to our bug tracker. >> >> -Hans >> >> _______________________________________________ >> tbnl-devel site list >> tbnl-devel at common-lisp.net >> http://common-lisp.net/mailman/listinfo/tbnl-devel > > > > -- > Peter Seibel > http://www.codequarterly.com/ > > _______________________________________________ > tbnl-devel site list > tbnl-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/tbnl-devel > From peter at gigamonkeys.com Tue Aug 24 05:35:11 2010 From: peter at gigamonkeys.com (Peter Seibel) Date: Mon, 23 Aug 2010 22:35:11 -0700 Subject: [hunchentoot-devel] usocket:timeout-errors and *catch-errors-p* In-Reply-To: References: Message-ID: I seem to be able to reproduce it like this: - Load a page. - Reload twice in quick succession. (I hit Command-R twice as fast as I can.) - Wait about 15-20 seconds. At that point, three debugger buffers will pop up, all with the same socket timeout error. I've tried this on Chrome and Firefox, with SBCL 1.0.41 as my Lisp. I've had the server on both OS X and Debian. -Peter On Mon, Aug 23, 2010 at 9:42 PM, Hans H?bner wrote: > Peter, > > before moving forward with your patch, I tried to reproduce the wrong > behavior and failed. From your report, I would have expected that if > I set *CATCH-ERRORS-P* to NIL, open a connection to Hunchentoot and > then wait, I'd be sent to the debugger. This does not seem to be the > case, even when I send the initial request line. > > Even though I'd think that errors should be intercepted only while > reading the initial request line, the current behavior seems to be > acceptable. Could it be that the timeouts that you see and find > disturbing are coming from somewhere else? Can you provide a way to > reproduce the issue? > > Thanks, > Hans > > On Tue, Aug 24, 2010 at 01:45, Peter Seibel wrote: > > So the problem seems to be in READ-INITIAL-REQUEST-LINE where > HANDLER-CASE* > > lets MAYBE-INVOKE-DEBUGGER handle the condition before the cases of the > > HANDLER-CASE. > > I may well be missing something, but it seems like mabye HANDLER-CASE* > > should be changed as in the following patch so MAYBE-INVOKE-DEBUGGER is > only > > invoked for unhandled conditions. > > -Peter > > --- conditions.lisp 2010-08-23 16:29:48.000000000 -0700 > > +++ fixed-conditions.lisp 2010-08-23 16:43:26.000000000 -0700 > > @@ -112,8 +112,8 @@ > > > > (defmacro handler-case* (expression &rest clauses) > > "Like HANDLER-CASE, but observes *CATCH-ERRORS-P*." > > - `(handler-case (with-debugger ,expression) > > - , at clauses)) > > + `(with-debugger > > + (handler-case ,expression , at clauses))) > > > > (defun get-backtrace () > > "Returns a string with a backtrace of what the Lisp system thinks is > > > > On Sun, Aug 22, 2010 at 11:27 PM, Hans H?bner > > wrote: > >> > >> On Mon, Aug 23, 2010 at 07:26, Peter Seibel > wrote: > >> > If I set *CATCH-ERRORS-P* to NIL, is it expected/desired behavior that > >> > the > >> > timeout-errors generated when (I think) the client disconnects without > >> > making a full request or some such, will land you in the debugger? > >> > >> This is a bug. Timeouts that occur while Hunchentoot is waiting for a > >> new request should always be ignored. Timeouts that occur when a > >> partial request has been request has been received _should_ be > >> intercepted, though, as those are not part of a normal exchange. > >> > >> I've added the issue to our bug tracker. > >> > >> -Hans > >> > >> _______________________________________________ > >> tbnl-devel site list > >> tbnl-devel at common-lisp.net > >> http://common-lisp.net/mailman/listinfo/tbnl-devel > > > > > > > > -- > > Peter Seibel > > http://www.codequarterly.com/ > > > > _______________________________________________ > > tbnl-devel site list > > tbnl-devel at common-lisp.net > > http://common-lisp.net/mailman/listinfo/tbnl-devel > > > > _______________________________________________ > tbnl-devel site list > tbnl-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/tbnl-devel > -- Peter Seibel http://www.codequarterly.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From edi at agharta.de Tue Aug 24 06:44:18 2010 From: edi at agharta.de (Edi Weitz) Date: Tue, 24 Aug 2010 08:44:18 +0200 Subject: [hunchentoot-devel] usocket:timeout-errors and *catch-errors-p* In-Reply-To: References: Message-ID: On Tue, Aug 24, 2010 at 1:45 AM, Peter Seibel wrote: > I may well be missing something, but it seems like mabye HANDLER-CASE* > should be changed as in the following patch so MAYBE-INVOKE-DEBUGGER is only > invoked for unhandled conditions. No, the point of handler-case* is exactly that it should call maybe-invoke-debugger for /all/ conditions before they can be handled. Otherwise, the source code uses the standard handler-case (without asterisk). I think the question in the case of the problem you report is whether there's some handler-case* that should rather be handler-case or whether we're seeing some behavior we think is acceptable if *catch-errors-p* is nil. Cheers, Edi. PS: Hey Peter, you're hacking Lisp again? From edi at agharta.de Tue Aug 24 06:48:29 2010 From: edi at agharta.de (Edi Weitz) Date: Tue, 24 Aug 2010 08:48:29 +0200 Subject: [hunchentoot-devel] usocket:timeout-errors and *catch-errors-p* In-Reply-To: References: Message-ID: On Tue, Aug 24, 2010 at 8:44 AM, edi wrote: > I think the question in the case of the problem you report is whether there's some handler-case* that should rather be handler-case or whether we're seeing some behavior we think is acceptable if *catch-errors-p* is nil. Eek! I now see what the problem is. You're talking about the release version of Hunchentoot while Hans and I are talking about the dev version in the BKNR repository where this problem has been resolved already. I was meaning to make a new release but didn't get around to actually doing it. Maybe I should just do it now... Sorry for the confusion, Edi. From edi at agharta.de Tue Aug 24 07:26:06 2010 From: edi at agharta.de (Edi Weitz) Date: Tue, 24 Aug 2010 09:26:06 +0200 Subject: [hunchentoot-devel] New release 1.1.1 [Was: usocket:timeout-errors and *catch-errors-p*] Message-ID: On Tue, Aug 24, 2010 at 8:48 AM, Edi Weitz wrote: > I was meaning to make a new release but didn't get around to actually > doing it. ?Maybe I should just do it now... Version 1.1.1 of Hunchentoot is now available from http://weitz.de/. Edi. From fahree at gmail.com Wed Aug 25 02:16:41 2010 From: fahree at gmail.com (=?ISO-8859-1?Q?Far=E9?=) Date: Tue, 24 Aug 2010 22:16:41 -0400 Subject: [hunchentoot-devel] 'max-threads' behavior for Hunchentoot In-Reply-To: References: <96F4A9B1-5603-4DE1-9144-415C9251DAA5@itasoftware.com> <4C05217C.4040406@itasoftware.com> <16493326-0713-4954-8976-19ED0C10D74C@itasoftware.com> <836C1566-0760-4000-AAA9-440FBAAB51EA@itasoftware.com> <586901B0-D79A-4AE5-908F-4FFEE9E3AF38@itasoftware.com> <18913F0E-C4B7-4044-8D02-45BCBBA0CDDE@itasoftware.com> Message-ID: Dear Edi, Here's a revised patch against the current svn. It's xcvb and version changes reverted, otherwise what I'm running at ITA, and it seems to be passing the QRes precheckin. It looks like it passes the elementary test under Lispworks, but I don't personally have a working Lispworks setup, so I can't say (will it work on LW Personal?). Can you review and apply if satisfactory? > Yes, the LispWorks version of Hunchentoot (which is the original > Hunchentoot which only ran on LW) doesn't use any of the compatibility > libs like BT, usocket, and cl+ssl. ?I want it to stay that way - the > less dependencies, the better. > Understood. I also saw that you defined trivial wrappers rather than imported LW symbols, and kept things that way. > Can't you just comment out all the new stuff with #-:lispworks? ?As I > said, I'll take care of the LW version. > Scott did some work so it compiles under Lispworks, and though it's wholly untested, I fixed it rather than scrapped it. Please take it with a pinch of salt. Suggested commit message: Extend Hunchentoot's 'one-thread-per-connection-taskmaster' to support 'max-threads' semantics, i.e., don't create a new thread if we've max out. Add a 'pooled-thread-per-connection-taskmaster' that will eventually use a thread pool, if profiling indicates. Fix the 'handle-incoming-connection' to implement the new behavior. Add a commented-out implementation of 'accept-connections' that might give better performance. This needs to be discussed with the Hunchentoot maintainers. Address the review comments and discussions between Scott McKay and Hans Huebner. Also correctly issue HTTP 503 when the server runs out of threads. (Work by Scott McKay, merge by Fran?ois-Ren? Rideau) [ Fran?ois-Ren? ?VB Rideau | Reflection&Cybernethics | http://fare.tunes.org ] Moving parts in rubbing contact require lubrication to avoid excessive wear. Honorifics and formal politeness provide lubrication where people rub together. Often the very young, the untraveled, the na?ve, the unsophisticated deplore these formalities as "empty", "meaningless", or "dishonest", and scorn to use them. No matter how "pure" their motives, they thereby throw sand into machinery that does not work too well at best. ? Robert Heinlein, "Time Enough For Love" From edi at agharta.de Wed Aug 25 06:49:27 2010 From: edi at agharta.de (Edi Weitz) Date: Wed, 25 Aug 2010 08:49:27 +0200 Subject: [hunchentoot-devel] 'max-threads' behavior for Hunchentoot In-Reply-To: References: <96F4A9B1-5603-4DE1-9144-415C9251DAA5@itasoftware.com> <4C05217C.4040406@itasoftware.com> <16493326-0713-4954-8976-19ED0C10D74C@itasoftware.com> <836C1566-0760-4000-AAA9-440FBAAB51EA@itasoftware.com> <586901B0-D79A-4AE5-908F-4FFEE9E3AF38@itasoftware.com> <18913F0E-C4B7-4044-8D02-45BCBBA0CDDE@itasoftware.com> Message-ID: Thanks, that sounds good. Except that you forgot the attachment... :) On Wed, Aug 25, 2010 at 4:16 AM, Far? wrote: > Dear Edi, > > Here's a revised patch against the current svn. It's xcvb and version > changes reverted, otherwise what I'm running at ITA, and it seems to > be passing the QRes precheckin. It looks like it passes the elementary > test under Lispworks, but I don't personally have a working Lispworks > setup, so I can't say (will it work on LW Personal?). > > Can you review and apply if satisfactory? > >> Yes, the LispWorks version of Hunchentoot (which is the original >> Hunchentoot which only ran on LW) doesn't use any of the compatibility >> libs like BT, usocket, and cl+ssl. ?I want it to stay that way - the >> less dependencies, the better. >> > Understood. I also saw that you defined trivial wrappers rather than > imported LW symbols, and kept things that way. > >> Can't you just comment out all the new stuff with #-:lispworks? ?As I >> said, I'll take care of the LW version. >> > Scott did some work so it compiles under Lispworks, and > though it's wholly untested, I fixed it rather than scrapped it. > Please take it with a pinch of salt. > > > Suggested commit message: > > ? Extend Hunchentoot's 'one-thread-per-connection-taskmaster' > ? ? to support 'max-threads' semantics, i.e., don't create > ? ? a new thread if we've max out. > > ? Add a 'pooled-thread-per-connection-taskmaster' that will > ? ? eventually use a thread pool, if profiling indicates. > ? Fix the 'handle-incoming-connection' to implement the > ? ? new behavior. > ? Add a commented-out implementation of 'accept-connections' > ? ? that might give better performance. ?This needs to be > ? ? discussed with the Hunchentoot maintainers. > > ? Address the review comments and discussions between Scott McKay > ? and Hans Huebner. > ? Also correctly issue HTTP 503 when the server runs out of threads. > > (Work by Scott McKay, merge by Fran?ois-Ren? Rideau) > > [ Fran?ois-Ren? ?VB Rideau | Reflection&Cybernethics | http://fare.tunes.org ] > Moving parts in rubbing contact require lubrication to avoid excessive wear. > Honorifics and formal politeness provide lubrication where people rub together. > Often the very young, the untraveled, the na?ve, the unsophisticated deplore > these formalities as "empty", "meaningless", or "dishonest", and scorn to use > them. No matter how "pure" their motives, they thereby throw sand into > machinery that does not work too well at best. > ? ? ? ?? Robert Heinlein, "Time Enough For Love" > > From fahree at gmail.com Wed Aug 25 06:58:17 2010 From: fahree at gmail.com (=?ISO-8859-1?Q?Far=E9?=) Date: Wed, 25 Aug 2010 02:58:17 -0400 Subject: [hunchentoot-devel] 'max-threads' behavior for Hunchentoot In-Reply-To: References: <96F4A9B1-5603-4DE1-9144-415C9251DAA5@itasoftware.com> <4C05217C.4040406@itasoftware.com> <16493326-0713-4954-8976-19ED0C10D74C@itasoftware.com> <836C1566-0760-4000-AAA9-440FBAAB51EA@itasoftware.com> <586901B0-D79A-4AE5-908F-4FFEE9E3AF38@itasoftware.com> <18913F0E-C4B7-4044-8D02-45BCBBA0CDDE@itasoftware.com> Message-ID: On 25 August 2010 02:49, Edi Weitz wrote: > Thanks, that sounds good. ?Except that you forgot the attachment... :) > Oops. Attached. [ Fran?ois-Ren? ?VB Rideau | Reflection&Cybernethics | http://fare.tunes.org ] "We will never get the money out of politics until we get the politics out of money." ? Alex Tabarrok > On Wed, Aug 25, 2010 at 4:16 AM, Far? wrote: >> Dear Edi, >> >> Here's a revised patch against the current svn. It's xcvb and version >> changes reverted, otherwise what I'm running at ITA, and it seems to >> be passing the QRes precheckin. It looks like it passes the elementary >> test under Lispworks, but I don't personally have a working Lispworks >> setup, so I can't say (will it work on LW Personal?). >> >> Can you review and apply if satisfactory? >> >>> Yes, the LispWorks version of Hunchentoot (which is the original >>> Hunchentoot which only ran on LW) doesn't use any of the compatibility >>> libs like BT, usocket, and cl+ssl. ?I want it to stay that way - the >>> less dependencies, the better. >>> >> Understood. I also saw that you defined trivial wrappers rather than >> imported LW symbols, and kept things that way. >> >>> Can't you just comment out all the new stuff with #-:lispworks? ?As I >>> said, I'll take care of the LW version. >>> >> Scott did some work so it compiles under Lispworks, and >> though it's wholly untested, I fixed it rather than scrapped it. >> Please take it with a pinch of salt. >> >> >> Suggested commit message: >> >> ? Extend Hunchentoot's 'one-thread-per-connection-taskmaster' >> ? ? to support 'max-threads' semantics, i.e., don't create >> ? ? a new thread if we've max out. >> >> ? Add a 'pooled-thread-per-connection-taskmaster' that will >> ? ? eventually use a thread pool, if profiling indicates. >> ? Fix the 'handle-incoming-connection' to implement the >> ? ? new behavior. >> ? Add a commented-out implementation of 'accept-connections' >> ? ? that might give better performance. ?This needs to be >> ? ? discussed with the Hunchentoot maintainers. >> >> ? Address the review comments and discussions between Scott McKay >> ? and Hans Huebner. >> ? Also correctly issue HTTP 503 when the server runs out of threads. >> >> (Work by Scott McKay, merge by Fran?ois-Ren? Rideau) >> >> [ Fran?ois-Ren? ?VB Rideau | Reflection&Cybernethics | http://fare.tunes.org ] >> Moving parts in rubbing contact require lubrication to avoid excessive wear. >> Honorifics and formal politeness provide lubrication where people rub together. >> Often the very young, the untraveled, the na?ve, the unsophisticated deplore >> these formalities as "empty", "meaningless", or "dishonest", and scorn to use >> them. No matter how "pure" their motives, they thereby throw sand into >> machinery that does not work too well at best. >> ? ? ? ?? Robert Heinlein, "Time Enough For Love" >> >> > -------------- next part -------------- A non-text attachment was scrubbed... Name: h.diff Type: text/x-patch Size: 36847 bytes Desc: not available URL: From ron at flownet.com Sat Aug 28 01:50:37 2010 From: ron at flownet.com (Ron Garret) Date: Fri, 27 Aug 2010 18:50:37 -0700 Subject: [hunchentoot-devel] cgitb Message-ID: Is there any straightforward way to get a backtrace-on-error displayed on the browser screen instead of being logged to a file, like Pythons' cgitb package does? I tried this: (defun error-handler (arg) [code-to-generate-backtrace]) (setf *HTTP-ERROR-HANDLER* 'error-handler) but that doesn't work because by the time error-handler is called the server has already exited the error context. Thanks, rg From ron at flownet.com Sat Aug 28 01:51:50 2010 From: ron at flownet.com (Ron Garret) Date: Fri, 27 Aug 2010 18:51:50 -0700 Subject: [hunchentoot-devel] Is this a bug? Message-ID: <1BED860F-1EC9-4E3C-86D7-3F51589606A0@flownet.com> This popped up in my log file while the server was idle: [2010-08-27 18:41:13 [ERROR]] Error while processing connection: :REAL-ERROR is an invalid initarg to INITIALIZE-INSTANCE for #. Valid initargs: (:SOCKET). Is this a bug, or an indication that I'm doing something wrong? rg From fahree at gmail.com Sat Aug 28 02:12:18 2010 From: fahree at gmail.com (=?ISO-8859-1?Q?Far=E9?=) Date: Fri, 27 Aug 2010 22:12:18 -0400 Subject: [hunchentoot-devel] Is this a bug? In-Reply-To: <1BED860F-1EC9-4E3C-86D7-3F51589606A0@flownet.com> References: <1BED860F-1EC9-4E3C-86D7-3F51589606A0@flownet.com> Message-ID: On 27 August 2010 21:51, Ron Garret wrote: > This popped up in my log file while the server was idle: > > [2010-08-27 18:41:13 [ERROR]] Error while processing connection: :REAL-ERROR is an invalid initarg to INITIALIZE-INSTANCE for #. > Valid initargs: (:SOCKET). > > Is this a bug, or an indication that I'm doing something wrong? > Looks like you need to update usocket. That bug was I believe fixed by the commit from Thu Sep 17 07:01:50 2009 +0000 by hhuebner. [ Fran?ois-Ren? ?VB Rideau | Reflection&Cybernethics | http://fare.tunes.org ] >From a programmer's point of view, the user is a peripheral that types when you issue a read request. ? P. Williams From ron at flownet.com Sat Aug 28 03:57:36 2010 From: ron at flownet.com (Ron Garret) Date: Fri, 27 Aug 2010 20:57:36 -0700 Subject: [hunchentoot-devel] Is this a bug? In-Reply-To: References: <1BED860F-1EC9-4E3C-86D7-3F51589606A0@flownet.com> Message-ID: Thanks! On Aug 27, 2010, at 7:12 PM, Far? wrote: > On 27 August 2010 21:51, Ron Garret wrote: >> This popped up in my log file while the server was idle: >> >> [2010-08-27 18:41:13 [ERROR]] Error while processing connection: :REAL-ERROR is an invalid initarg to INITIALIZE-INSTANCE for #. >> Valid initargs: (:SOCKET). >> >> Is this a bug, or an indication that I'm doing something wrong? >> > Looks like you need to update usocket. That bug was I believe fixed by > the commit from Thu Sep 17 07:01:50 2009 +0000 by hhuebner. > > [ Fran?ois-Ren? ?VB Rideau | Reflection&Cybernethics | http://fare.tunes.org ] > From a programmer's point of view, the user is a peripheral that types > when you issue a read request. ? P. Williams > > _______________________________________________ > tbnl-devel site list > tbnl-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/tbnl-devel From edi at agharta.de Sat Aug 28 10:20:14 2010 From: edi at agharta.de (Edi Weitz) Date: Sat, 28 Aug 2010 12:20:14 +0200 Subject: [hunchentoot-devel] cgitb In-Reply-To: References: Message-ID: Hunchentoot already depends om trivial-backtrace, so it should be pretty trivial to wrap a handler-bind around your code to make it do what you want. Having said that, we used to have an option to do that automatically (controlled by a special variable) which was removed during The Big Cleanup[TM]. If someone wants to send a patch to add this back in, I'll likely accept that. http://weitz.de/patches.html Edi. On Sat, Aug 28, 2010 at 3:50 AM, Ron Garret wrote: > Is there any straightforward way to get a backtrace-on-error displayed on the browser screen instead of being logged to a file, like Pythons' cgitb package does? ?I tried this: > > (defun error-handler (arg) [code-to-generate-backtrace]) > > (setf *HTTP-ERROR-HANDLER* 'error-handler) > > but that doesn't work because by the time error-handler is called the server has already exited the error context. > > Thanks, > rg > > > _______________________________________________ > tbnl-devel site list > tbnl-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/tbnl-devel > > From sky at viridian-project.de Sat Aug 28 11:29:20 2010 From: sky at viridian-project.de (Leslie P. Polzer) Date: Sat, 28 Aug 2010 13:29:20 +0200 (CEST) Subject: [hunchentoot-devel] cgitb In-Reply-To: References: Message-ID: <1ce77fb5561b79cce85ab0d286d5452e.squirrel@mail.stardawn.org> Ron Garret wrote: > Is there any straightforward way to get a backtrace-on-error displayed on the browser > screen instead of being logged to a file, like Pythons' cgitb package does? I tried > this: > > (defun error-handler (arg) [code-to-generate-backtrace]) > > (setf *HTTP-ERROR-HANDLER* 'error-handler) > > but that doesn't work because by the time error-handler is called the server has already > exited the error context. Here's what we're using in Weblocks: http://bitbucket.org/S11001001/weblocks-dev/src/tip/src/request-handler.lisp#cl-60 http://bitbucket.org/S11001001/weblocks-dev/src/tip/src/error-handler.lisp#cl-35 HTH, Leslie From ron at flownet.com Sat Aug 28 16:35:51 2010 From: ron at flownet.com (Ron Garret) Date: Sat, 28 Aug 2010 09:35:51 -0700 Subject: [hunchentoot-devel] cgitb In-Reply-To: <1ce77fb5561b79cce85ab0d286d5452e.squirrel@mail.stardawn.org> References: <1ce77fb5561b79cce85ab0d286d5452e.squirrel@mail.stardawn.org> Message-ID: Thanks! Here's what I came up with that seems to work: (defvar *devel-mode* nil) (defun devel-mode-handler (condition) (when *devel-mode* (throw 'page-handler-done (format nil "

Error

~%~A
~%
~%~A~%
~%"
                   condition (html-escape (tbnl::get-backtrace))))))

(defmacro defpage (url &body body)
   ...
         (catch 'page-handler-done
           (handler-bind ((error 'devel-mode-handler))
             (html :page , at body)))))))

rg


On Aug 28, 2010, at 4:29 AM, Leslie P. Polzer wrote:

> 
> Ron Garret wrote:
>> Is there any straightforward way to get a backtrace-on-error displayed on the browser
>> screen instead of being logged to a file, like Pythons' cgitb package does?  I tried
>> this:
>> 
>> (defun error-handler (arg) [code-to-generate-backtrace])
>> 
>> (setf *HTTP-ERROR-HANDLER* 'error-handler)
>> 
>> but that doesn't work because by the time error-handler is called the server has already
>> exited the error context.
> 
> Here's what we're using in Weblocks:
> 
>  http://bitbucket.org/S11001001/weblocks-dev/src/tip/src/request-handler.lisp#cl-60
>  http://bitbucket.org/S11001001/weblocks-dev/src/tip/src/error-handler.lisp#cl-35
> 
> HTH,
> 
>   Leslie
> 
> 
> _______________________________________________
> tbnl-devel site list
> tbnl-devel at common-lisp.net
> http://common-lisp.net/mailman/listinfo/tbnl-devel




From zaytsev.yakov at gmail.com  Sat Aug 28 19:14:52 2010
From: zaytsev.yakov at gmail.com (Yakov Zaytsev)
Date: Sat, 28 Aug 2010 23:14:52 +0400
Subject: [hunchentoot-devel] compiling 1.1.1 specials.lisp takes too long
Message-ID: 

Hello,

with ACL 8.2 (professional license) on windows 7 on Atom Z540 with
2GiBs of memory trying to

(asdf:oos 'asdf:load-op :hunchentoot)

ends with

;;; Compiling file c:\lisplibs\hunchentoot-1.1.1\specials.lisp
; While compiling (:top-level-form "specials.lisp" 1551):
Warning: Compiling a function definition for the name defconstant as a
defmacro.  This name is in the common-lisp
         package and redefining it will be a violation for portable
programs.  Replacing the current definition of
         # may be dangerous.  The
package common-lisp has
         excl:package-definition-lock set, which causes the system to
signal this violation.

and it seems like it freezes there. Is it normal? How long does it
take typically to compile that specials.lisp?

TIA!



From edi at agharta.de  Sat Aug 28 20:39:02 2010
From: edi at agharta.de (Edi Weitz)
Date: Sat, 28 Aug 2010 22:39:02 +0200
Subject: [hunchentoot-devel] compiling 1.1.1 specials.lisp takes too long
In-Reply-To: 
References: 
Message-ID: 

I think AllegroCL is confused here.  The name DEFCONSTANT is shadowed
in the Hunchentoot package, so there's no need for a warning and
certainly the compiler shouldn't freeze. Compiling specials.lisp
should usually take only fractions of a second.

I'd report the problem to Franz.

Edi.



On Sat, Aug 28, 2010 at 9:14 PM, Yakov Zaytsev  wrote:
> Hello,
>
> with ACL 8.2 (professional license) on windows 7 on Atom Z540 with
> 2GiBs of memory trying to
>
> (asdf:oos 'asdf:load-op :hunchentoot)
>
> ends with
>
> ;;; Compiling file c:\lisplibs\hunchentoot-1.1.1\specials.lisp
> ; While compiling (:top-level-form "specials.lisp" 1551):
> Warning: Compiling a function definition for the name defconstant as a
> defmacro. ?This name is in the common-lisp
> ? ? ? ? package and redefining it will be a violation for portable
> programs. ?Replacing the current definition of
> ? ? ? ? # may be dangerous. ?The
> package common-lisp has
> ? ? ? ? excl:package-definition-lock set, which causes the system to
> signal this violation.
>
> and it seems like it freezes there. Is it normal? How long does it
> take typically to compile that specials.lisp?
>
> TIA!
>
> _______________________________________________
> tbnl-devel site list
> tbnl-devel at common-lisp.net
> http://common-lisp.net/mailman/listinfo/tbnl-devel
>
>



From hans.huebner at gmail.com  Sun Aug 29 06:55:58 2010
From: hans.huebner at gmail.com (=?ISO-8859-1?Q?Hans_H=FCbner?=)
Date: Sun, 29 Aug 2010 08:55:58 +0200
Subject: [hunchentoot-devel] cgitb
In-Reply-To: 
References: 
	
Message-ID: 

On Sat, Aug 28, 2010 at 12:20, Edi Weitz  wrote:
> Hunchentoot already depends om trivial-backtrace, so it should be
> pretty trivial to wrap a handler-bind around your code to make it do
> what you want.
>
> Having said that, we used to have an option to do that automatically
> (controlled by a special variable) which was removed during The Big
> Cleanup[TM]. ?If someone wants to send a patch to add this back in,
> I'll likely accept that.

I've commited http://bknr.net/trac/changeset/4603 to revive
*SHOW-LISP-BACKTRACES-P*

-Hans



From edi at agharta.de  Sun Aug 29 10:22:42 2010
From: edi at agharta.de (Edi Weitz)
Date: Sun, 29 Aug 2010 12:22:42 +0200
Subject: [hunchentoot-devel] cgitb
In-Reply-To: 
References: 
	
	
Message-ID: 

On Sun, Aug 29, 2010 at 8:55 AM, Hans H?bner  wrote:

> I've commited http://bknr.net/trac/changeset/4603 to revive
> *SHOW-LISP-BACKTRACES-P*

Thanks... :)



From peter at gigamonkeys.com  Mon Aug 30 21:00:41 2010
From: peter at gigamonkeys.com (Peter Seibel)
Date: Mon, 30 Aug 2010 14:00:41 -0700
Subject: [hunchentoot-devel] Cookies?
Message-ID: 

It seems that cookie-in returns a string, not a cookie object. Is this
a recent change or am I misunderstanding the docs?

-Peter

-- 
Peter Seibel
http://www.codequarterly.com/



From edi at agharta.de  Mon Aug 30 21:54:56 2010
From: edi at agharta.de (Edi Weitz)
Date: Mon, 30 Aug 2010 23:54:56 +0200
Subject: [hunchentoot-devel] Cookies?
In-Reply-To: 
References: 
Message-ID: 

Indeed, incoming cookies are only returned as strings and this has
always been the case.  I understand that in theory the client could
send path and domain attributes with the cookie, but I think in
practice this never happens.  At least it seems nobody using
Hunchentoot was bothered with this so far.

I agree that the documentation is a bit misleading.  Although the
chapter about cookies starts with "OUTGOING cookies [...] are CLOS
objects" which one could construe as meaning that incoming cookies
aren't... :)

Edi.


On Mon, Aug 30, 2010 at 11:00 PM, Peter Seibel  wrote:
> It seems that cookie-in returns a string, not a cookie object. Is this
> a recent change or am I misunderstanding the docs?
>
> -Peter
>
> --
> Peter Seibel
> http://www.codequarterly.com/
>
> _______________________________________________
> tbnl-devel site list
> tbnl-devel at common-lisp.net
> http://common-lisp.net/mailman/listinfo/tbnl-devel
>
>



From peter at gigamonkeys.com  Mon Aug 30 22:01:27 2010
From: peter at gigamonkeys.com (Peter Seibel)
Date: Mon, 30 Aug 2010 15:01:27 -0700
Subject: [hunchentoot-devel] Cookies?
In-Reply-To: 
References: 
	
Message-ID: 

Yeah, I think the cookie-in being described as returning a "cookie" is
what threw me off.

-Peter

On Mon, Aug 30, 2010 at 2:54 PM, Edi Weitz  wrote:
> Indeed, incoming cookies are only returned as strings and this has
> always been the case. ?I understand that in theory the client could
> send path and domain attributes with the cookie, but I think in
> practice this never happens. ?At least it seems nobody using
> Hunchentoot was bothered with this so far.
>
> I agree that the documentation is a bit misleading. ?Although the
> chapter about cookies starts with "OUTGOING cookies [...] are CLOS
> objects" which one could construe as meaning that incoming cookies
> aren't... :)
>
> Edi.
>
>
> On Mon, Aug 30, 2010 at 11:00 PM, Peter Seibel  wrote:
>> It seems that cookie-in returns a string, not a cookie object. Is this
>> a recent change or am I misunderstanding the docs?
>>
>> -Peter
>>
>> --
>> Peter Seibel
>> http://www.codequarterly.com/
>>
>> _______________________________________________
>> tbnl-devel site list
>> tbnl-devel at common-lisp.net
>> http://common-lisp.net/mailman/listinfo/tbnl-devel
>>
>>
>
> _______________________________________________
> tbnl-devel site list
> tbnl-devel at common-lisp.net
> http://common-lisp.net/mailman/listinfo/tbnl-devel
>



-- 
Peter Seibel
http://www.codequarterly.com/