libmicrohttpd
[Top][All Lists]
Advanced

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

Re: [libmicrohttpd] Performance problem under Windows


From: Martin Bisson
Subject: Re: [libmicrohttpd] Performance problem under Windows
Date: Sat, 12 Feb 2011 12:35:15 -0500
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7

On 10/02/2011 4:01 PM, Martin Bisson wrote:
On 09/02/2011 8:55 AM, Christian Grothoff wrote:

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.

Ok. I rebuilt libmicrohttpd-0.9.6 and tried, still the same problem. I changed the poll & select timeouts to 10 ms, no change. I tried my python script with a local Apache server, and I get low latency.

But still, with libmicrohttpd, I get latencies that are slightly above 1 s. So I really feel, like something is still waiting for 1 s somewhere. I identified that the waiting is after my request is sent and before my request-handling callback is called by libmicrohttpd, but I don't really how to identify the problem...

Any idea what to do next to get libmicrohttpd to respond faster?

Thanks in advance,

Martin

Hi,

I still have this 1 second latency problem. I tried different threading models, even calling MHD_run() myself, but still, same 1 second latency problem. Here are my 2 questions:

1) I would really appreciate if someone would run minimal_example.c (on port 8080), along with the python script attached with this e-mail, under Windows and tell me if they do have the same latency problem... Is my problem reproducible?

2) I guess my next step would be, with a debugger, to break during that 1 second waiting period and see in what function libmicrohttpd is "stuck". However, when I tried to debug minimal_example.c, no symbols are present and it exits with code 127 / 0177 / 0x7F. I tried to compile with "./configure CFLAGS=-g && make". Any pointers here on how to build and debug? I familiar with debugging under Linux/gdb, but I've never debugged anything built with MinGW. So any help would be appreciated.

Thanks again,

Martin

Attachment: test.py
Description: Text document


reply via email to

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