My code is really simple:

using HttpServer

gc_disable()

const Z = "HELLO WORLD"

http = HttpHandler() do req::Request, res::Response

    Response(Z)

end

server = Server( http )

run( server, 8000 )

And the testing is 

ab -n20000 http://127.0.0.1:8000/asdfasd

I also had to patch the HttpServer.jl to close the connection, since 
otherwise ab doesn't go past the first request.

Thank you for the links. I have read the performance tips briefly and have 
started with the profiling doc.

On Wednesday, August 19, 2015 at 4:35:09 PM UTC+3, Spencer Russell wrote:
>
> Can you include the code you’re using for the HTTP server and for testing 
> (maybe link to a gist if the code is larger than email-appropriate)?
>
> Also make sure you’ve checked out the performance tips FAQ: 
> http://docs.julialang.org/en/release-0.3/manual/performance-tips/
>
> The profiler is also useful for tracking down performance problems: 
> http://docs.julialang.org/en/release-0.3/manual/profile/
>
> -s
>
> On Aug 19, 2015, at 6:42 AM, [email protected] <javascript:> wrote:
>
> Hi there!
> I was trying to do some basic benchmark of Julia's HttpServer, however I 
> have some strange behaviour.
> When I ask ab to do 20k requests in a single thread, at around request 
> #16k Julia starts accepting connections quite slowly (around 20s). If I 
> request two threads, then ab fails with timeout on connecting (60s).
> I thought that the problem may be with the GC so I disabled it, but that 
> didn't help.
> I would be grateful for the tips on how to look into this more closely.
>
> (Julia 0.3.10 via brew on os x)
>
>
>

Reply via email to