|
From: | Martin Bisson |
Subject: | Re: [libmicrohttpd] Performance problem under Windows |
Date: | Thu, 10 Feb 2011 06:20:37 -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 |
Thanks for your answer. On 09/02/2011 8:55 AM, Christian Grothoff wrote:
Even 12ms is still a bit high -- could that be your Python script? ;-).
I don't think so, it is pretty straight forward... But it might be! I attached it to this e-mail just in case...
The 12ms server is something like a AMD-K6, 450 Mhz CPU, pretty old machine... So I would gladly put the blame on that old thing! :)
I guess my next step is to try to rebuild a more recent version of libmicrohttpd. I didn't because I didn't have the proper setup under Windows. I'm using Visual Studio 2010 for my application, so I created the import lib for the pre-built version of 0.4.5, but I guess I going to try to get a Cygwin build environment, with the proper dependencies (gcrypt & cie...?).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...
I'll see if this works, if not I guess I'll try to lower the timeout in select/poll. I'm not familiar with debugging/stepping into code compiled with different compilers, but I guess I'll have to take a look into that!
If you can give me any pointers on what I'm going to attempt, please let me know.
Thanks again for your answer, Mart
request.py
Description: Text document
[Prev in Thread] | Current Thread | [Next in Thread] |