From doctorbill.news at gmail.com Mon Oct 2 22:53:26 2006 From: doctorbill.news at gmail.com (William Bland) Date: Mon, 2 Oct 2006 15:53:26 -0700 Subject: [nio-devel] NIO is asdf-installable Message-ID: <31ea564c0610021553t468278c0y9aad73ae54166afe@mail.gmail.com> Hi, I just made NIO asdf-installable. The only change I made to what's in the current code was: Index: nio.asd =================================================================== --- nio.asd (revision 3) +++ nio.asd (working copy) @@ -9,5 +9,5 @@ (:file "async-socket" :depends-on ("async-fd")) ) - :depends-on (:cffi)) + :depends-on (:cffi :event-notification)) Hope that looks ok to you. If not, just let me know and I'll change it. Cheers, Bill. -- William Bland: http://www.abstractnonsense.org/ Lisp documentation: http://www.lispdoc.com/ From doctorbill.news at gmail.com Mon Oct 2 23:18:05 2006 From: doctorbill.news at gmail.com (William Bland) Date: Mon, 2 Oct 2006 16:18:05 -0700 Subject: [nio-devel] nio-httpd Message-ID: <31ea564c0610021618k7c4212d5y3caa65de8b147ea1@mail.gmail.com> Here's an asd file for nio-httpd. Just to make things a little easier on the end user... nio-httpd.asd: ;;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Base: 10 -*- (defsystem :nio-httpd :components ((:file "nio-server") (:file "nio-httpd" :depends-on ("nio-server"))) :depends-on (:nio)) Cheers, Bill. -- William Bland: http://www.abstractnonsense.org/ Lisp documentation: http://www.lispdoc.com/ From enonymoos at gmail.com Tue Oct 3 01:24:05 2006 From: enonymoos at gmail.com (Nonny Mouse) Date: Mon, 2 Oct 2006 18:24:05 -0700 Subject: [nio-devel] stressing nio-httpd Message-ID: <8229e4e80610021824r22044598g2577e9c36eca2477@mail.gmail.com> Hi, I've been trying to stress the system a bit and i've come up against some issues, if anyone can shed light on them that'd be great... I patched my local to add errno via sb-alien:get-errno, but couldn't find a decent portable solution. ---------------------------------------- case 1 Using /usr/sbin/ab2 -n 500000 -c 1000 http://localhost:16323/ Completed 300000 requests apr_recv: Connection timed out (110) Total of 312165 requests completed meanwhile theres not a peep from the server Starting server on "127.0.0.1" port 16323.. (socket fd is 7) waiting for events.. There are about 30k conns in the TIME_WAIT state about a minute or two later we get: poll-error occurred: 4 (EINTR) Poll-error, exiting.. 0 -------------------------------------------------- case 2 /usr/sbin/ab2 -n 500000 -c 1000 http://localhost:31273/ This is ApacheBench, Version 2.0.41-dev <$Revision: 1.141 $> apache-2.0 Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/ Benchmarking localhost (be patient) Completed 50000 requests Completed 100000 requests Completed 150000 requests Completed 200000 requests Completed 250000 requests Completed 300000 requests apr_recv: Connection reset by peer (104) Total of 329682 requests completed :~/projects/svn$ wget http://localhost:31273/ --18:00:12-- http://localhost:31273/ => `index.html.2' Resolving localhost... 127.0.0.1 Connecting to localhost|127.0.0.1|:31273... connected. HTTP request sent, awaiting response... server: Starting server on "127.0.0.1" port 31273.. (socket fd is 8) waiting for events.. dump: 18:00:06.186009 IP localhost.31273 > localhost.44651: R 3993753736:3993753736(0) win 0 18:00:06.186014 IP localhost.31273 > localhost.44652: R 3990078422:3990078422(0) win 0 18:00:06.186018 IP localhost.31273 > localhost.44654: R 3993968120:3993968120(0) win 0 18:00:06.186682 IP localhost.59428 > localhost.31273: P 1:91(90) ack 1 win 8192 18:00:06.186688 IP localhost.31273 > localhost.59428: . ack 91 win 8192 18:00:06.186704 IP localhost.35785 > localhost.31273: F 91:91(0) ack 331 win 8192 18:00:06.186710 IP localhost.31273 > localhost.35785: . ack 92 win 8192 18:00:06.186739 IP localhost.35795 > localhost.31273: S 4233400977:4233400977(0) win 32767 18:00:06.186748 IP localhost.31273 > localhost.35795: S 3999548339:3999548339(0) ack 4233400978 win 32767 18:00:06.186755 IP localhost.35795 > localhost.31273: . ack 1 win 8192 18:00:06.187104 IP localhost.31273 > localhost.35788: P 1:330(329) ack 91 win 8192 18:00:06.187111 IP localhost.35788 > localhost.31273: . ack 330 win 8192 18:00:06.187119 IP localhost.31273 > localhost.35788: F 330:330(0) ack 91 win 8192 18:00:06.187148 IP localhost.35794 > localhost.31273: P 1:91(90) ack 1 win 8192 18:00:06.187155 IP localhost.31273 > localhost.35794: . ack 91 win 8192 18:00:06.187570 IP localhost.35795 > localhost.31273: F 1:1(0) ack 1 win 8192 ---------------------------------------------------- case 3 Tried tracking epoll_ctl returns in add-fd and getting EEXISTS for what looks like every connection. ---------------------------------------------------- Any help appreciated Cheers, Paul. -------------- next part -------------- An HTML attachment was scrubbed... URL: From enonymoos at gmail.com Tue Oct 3 01:37:22 2006 From: enonymoos at gmail.com (Nonny Mouse) Date: Mon, 2 Oct 2006 18:37:22 -0700 Subject: [nio-devel] nio-httpd In-Reply-To: <31ea564c0610021618k7c4212d5y3caa65de8b147ea1@mail.gmail.com> References: <31ea564c0610021618k7c4212d5y3caa65de8b147ea1@mail.gmail.com> Message-ID: <8229e4e80610021837k67ccbae9j9c858e3d0241602b@mail.gmail.com> hi doctorbill, Did a run through and all works for me, I'll commit if no-one has any objections. Thanks for the input, Paul. On 10/2/06, William Bland wrote: > > Here's an asd file for nio-httpd. Just to make things a little easier > on the end user... > > nio-httpd.asd: > > ;;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Base: 10 -*- > > (defsystem :nio-httpd > :components ((:file "nio-server") > (:file "nio-httpd" :depends-on ("nio-server"))) > :depends-on (:nio)) > > Cheers, > Bill. > -- > William Bland: http://www.abstractnonsense.org/ > Lisp documentation: http://www.lispdoc.com/ > _______________________________________________ > nio-devel mailing list > nio-devel at common-lisp.net > http://common-lisp.net/cgi-bin/mailman/listinfo/nio-devel > -------------- next part -------------- An HTML attachment was scrubbed... URL: From risto.laakso at gmail.com Tue Oct 3 05:33:54 2006 From: risto.laakso at gmail.com (Risto Laakso) Date: Tue, 3 Oct 2006 08:33:54 +0300 Subject: [nio-devel] stressing nio-httpd In-Reply-To: <8229e4e80610021824r22044598g2577e9c36eca2477@mail.gmail.com> References: <8229e4e80610021824r22044598g2577e9c36eca2477@mail.gmail.com> Message-ID: <439fc7a30610022233x297e201bj7de1554a0ff0353@mail.gmail.com> 2006/10/3, Nonny Mouse : > Hi, > > I've been trying to stress the system a bit and i've come up against some > issues, if anyone can shed light on them that'd be great... > > I patched my local to add errno via sb-alien:get-errno, but couldn't find a > decent portable solution. > ---------------------------------------------------- > case 3 > > Tried tracking epoll_ctl returns in add-fd and getting EEXISTS for what > looks like every connection. > > ---------------------------------------------------- Hello, The epoll_ctl(2) man page says, that "EEXIST: op was EPOLL_CTL_ADD, and the supplied file descriptor fd is already in epfd." so it seems that the code is trying to add the fd twice ? There also a issue that the code will just add every incoming connection to the queue, which isn't necessarily a good idea, if the system is loaded. Maybe there should be a mechanism to see that if n connections are already being served, and if so, just drop additional connections until existing connections are closed.. Another slightly related issue is that, because the current design is single-threaded, if the thread is busy serving some connnection, it won't accept new connections until the serving has finished. Thus it might be better to have one thread accepting connections, and another one (or ones, if you have SMP) serving connections.. -r