libmicrohttpd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libmicrohttpd] Performance problem under Windows


From: Christian Grothoff
Subject: Re: [libmicrohttpd] Performance problem under Windows
Date: Wed, 9 Feb 2011 14:55:23 +0100
User-agent: KMail/1.13.5 (Linux/2.6.32-trunk-vserver-amd64; KDE/4.4.5; x86_64; ; )

On Tuesday 08 February 2011 17:03:10 Martin Bisson wrote:
> Hi,
> 
> I'm using libmicrohttpd Windows build (the latest I found is
> libmicrohttpd-0.4.5-w32.zip) and I'm having some performance problems.
> 
> I wrote a simple Python script that does sequential (only one thread)
> HTTP POST requests in order to measure how fast a single client can make
> requests (sort of a measure of latency).  Using a slight modification of
> the simple server found at http://www.gnu.org/software/libmicrohttpd/
> running on the same computer as the Python script, I get a little more
> than 1 second per request.  If I use the same script to send the request
> to an Linux Apache server on another computer on my LAN, I get around 12
> ms per request.

Even 12ms is still a bit high -- could that be your Python script? ;-).

> I find the "little more than 1 second per request" a little suspicious.
> I looked at the code in daemon.c and both the select() and the poll()
> calls use a 1 second timeout...  I was wondering if there might be a
> problem with that under Windows...?  Or is the 1 second per request an
> expected latency for libmicrohttpd with client & server on the same
> computer?

Well, I don't know how the 1s timeout in select relates to your performance 
issue (have you tried changing it to 10s and seeing if performance goes down 
accordingly), but what I can say is that MHD has no expected latency -- it 
should be "instant" (as far as your OS/hardware can deliver).  

Now, 0.4.5 is of course ancient and various issues have been introduced and 
fixed since (see ChangeLog), so I don't know if you're possibly hitting one of 
those.  
 
> Has anyone had this problem under Windows or can anyone point me to
> solution path?

I'd first try updating to the 0.9.x-series.  Nils Durner should know if a W32-
binary exists for those already...

Happy hacking,

Christian



reply via email to

[Prev in Thread] Current Thread [Next in Thread]