diff --git a/ChangeLog b/ChangeLog index 54d131c..d036b49 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,10 @@ +2012-02-08 11:52:30 +0100 Georg Hopp + + * found the file handle lost...made a first workaround and added an todo. (HEAD, master) + 2012-02-08 10:21:04 +0100 Georg Hopp - * changed request handling. @TODO: I still seem to have the problem that the file handles are not closed and freed correctly as the service refuses connections after about a 1000. (HEAD, master) + * changed request handling. @TODO: I still seem to have the problem that the file handles are not closed and freed correctly as the service refuses connections after about a 1000. 2012-02-07 14:20:00 +0100 Georg Hopp diff --git a/doc/ab-stress-2012-02-08.txt b/doc/ab-stress-2012-02-08.txt new file mode 100644 index 0000000..ef5e40c --- /dev/null +++ b/doc/ab-stress-2012-02-08.txt @@ -0,0 +1,56 @@ +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 localhost (be patient) +Completed 200000 requests +Completed 400000 requests +Completed 600000 requests +Completed 800000 requests +Completed 1000000 requests +Completed 1200000 requests +Completed 1400000 requests +Completed 1600000 requests +Completed 1800000 requests +Completed 2000000 requests +Finished 2000000 requests + + +Server Software: testserver +Server Hostname: localhost +Server Port: 11212 + +Document Path: / +Document Length: 322 bytes + +Concurrency Level: 100 +Time taken for tests: 250.130 seconds +Complete requests: 2000000 +Failed requests: 0 +Write errors: 0 +Non-2xx responses: 2000003 +Total transferred: 902001353 bytes +HTML transferred: 644000966 bytes +Requests per second: 7995.86 [#/sec] (mean) +Time per request: 12.506 [ms] (mean) +Time per request: 0.125 [ms] (mean, across all concurrent requests) +Transfer rate: 3521.62 [Kbytes/sec] received + +Connection Times (ms) + min mean[+/-sd] median max +Connect: 0 5 1.8 5 23 +Processing: 3 7 1.9 7 29 +Waiting: 1 6 1.7 5 23 +Total: 8 12 2.3 12 36 + +Percentage of the requests served within a certain time (ms) + 50% 12 + 66% 13 + 75% 13 + 80% 14 + 90% 15 + 95% 17 + 98% 19 + 99% 22 + 100% 36 (longest request) + diff --git a/src/socket/accept.c b/src/socket/accept.c index 928a4f5..dc58484 100644 --- a/src/socket/accept.c +++ b/src/socket/accept.c @@ -13,7 +13,15 @@ socketAccept(Sock this, char remoteAddr[16]) /* Set the size of the in-out parameter */ len = sizeof(this->addr); + /** + * @TODO: Uhh, this is bad. we open a new socket additionally to + * the one we get from the accept call. + * i have to change the socket constructor to be able to create + * the data structure without creation of a socket at all. + * For now i simply close the socket here.... :D + */ sock = new(Sock, this->log, this->port); + close(sock->handle); /** * @TODO: change port to remote port on success */