On Fri, 07 Aug 2015 21:16:53 GMT, Etienne Cimon wrote:
Yes, I think you can try using a log file with time stamp so that the specific cause can be traced. I'm also curious to know if libasync is also problematic
I replaced http-server with nginx, and replaced the 500 requests with 50000 serving the same 13-bytes file. Results as follows:
Vibe
Requests per second: 16983.8
Conversation size: 416 bytes
GET /file.txt HTTP/1.1
User-Agent: vibe.d/0.7.23 (HTTPClient, +http://vibed.org/)
Connection: keep-alive
Accept-Encoding: gzip, deflate
Host: 127.0.0.1
HTTP/1.1 200 OK
Server: nginx/1.6.2 (Ubuntu)
Date: Sat, 08 Aug 2015 15:40:31 GMT
Content-Type: text/plain
Content-Length: 13
Last-Modified: Fri, 07 Aug 2015 07:10:12 GMT
Connection: keep-alive
ETag: "55c459d4-d"
Accept-Ranges: bytes
Hello world!
AB (with -k):
Requests per second: 36735.56
Conversation size: 371 bytes
GET /file.txt HTTP/1.0
Connection: Keep-Alive
Host: 127.0.0.1:8090
User-Agent: ApacheBench/2.3
Accept: */*
HTTP/1.1 200 OK
Server: nginx/1.6.2 (Ubuntu)
Date: Sat, 08 Aug 2015 15:42:36 GMT
Content-Type: text/plain
Content-Length: 13
Last-Modified: Fri, 07 Aug 2015 07:10:12 GMT
Connection: keep-alive
ETag: "55c459d4-d"
Accept-Ranges: bytes
Hello world!
AB (without -k)
Requests per second: 24213.99
Conversation size: 342 bytes
GET /file.txt HTTP/1.0
Host: 127.0.0.1:8090
User-Agent: ApacheBench/2.3
Accept: */*
HTTP/1.1 200 OK
Server: nginx/1.6.2 (Ubuntu)
Date: Sat, 08 Aug 2015 15:44:02 GMT
Content-Type: text/plain
Content-Length: 13
Last-Modified: Fri, 07 Aug 2015 07:10:12 GMT
Connection: close
ETag: "55c459d4-d"
Accept-Ranges: bytes
Hello world!
Setting settings.defaultKeepAliveTimeout = 0.msecs();
results in lower requests per second and in an exception after a few thousand requests:
std.exception.ErrnoException@../../.dub/packages/vibe-d-0.7.24-rc.2/source/vibe/core/drivers/libevent2.d(281): Failed to bind socket. (Address already in use)
I tried using libasync, and I get an exception everytime at the 100th request(!?).
object.Exception@../../.dub/packages/vibe-d-0.7.24-rc.2/source/vibe/stream/operations.d(202): Reached EOF before reaching end marker.
What kind of log can help you? I can provide a callgrind log file.