Evg, I love open source, you definitely K.I.L.L.E.D the problem! :-D
I did many tests comparing MHD with NodeJS and now MHD is working fine on Windows. In my tests I used the MHD 32 bits and NodeJS 64 bits (5.1.1), and it was proposital, but MHD even in 32 bits worked like a charm and has a nice performance as NodeJS. I'm sending the result on bottom of this e-mail. And Evg, sorry if I'm being boring, but, can you send me the compiled 32 and 64 binaries? I can compile that, but I don't know if my environment is the better to compile MHD. The 32 bit binary that I compiled has 499KB, it isn't a problem, but I think that the size can be less. Thank you, and count on me in any help too! (y) === begin JMeter Thread Group Config === Number of Threads (Users): 1000 Ramp-Up Period (in seconds): 1 Loop Count (forvever unchecked): 100 === end JMeter Thread Group Config === === begin NodeJS 5.1.1 64 bits result === Samples: 100000 Average: 83 Median: 85 90% line: 93 95% line: 99 99% line: 113 Min: 0 Max: 126 Error: 0,00% Throughput: 5094,8/sec KB/sec: 910,5 === end NodeJS 5.1.1 64 bits result === === begin MHD 0x00094701 (with Evg and Christ fixes) 32 bits result === Samples: 100000 Average: 57 Median: 58 90% line: 63 95% line: 65 99% line: 78 Min: 0 Max: 515 Error: 0,00% Throughput: 4835,1/sec KB/sec: 769,7 === begin MHD 0x00094701 (with Evg and Christ fixes) 32 bits result === ps. I don't know what `Max: 515` column means, but the more important column is `Error`, and it is 0,00% to MHD too! :-) On Tue, Dec 8, 2015 at 9:05 AM, Evgeny Grin <[email protected]> wrote: > > 07.12.2015, 22:58, "silvioprog" <[email protected]>: > > Hello, I have good news in the test 2, however in test 3 ... > > @Evg, do I need to change the `FD_SETSIZE` and the MHD source before > compiling or in the `CMakeLists.txt` of my example? > > Define FD_SETSIZE to some large value (real limit is about 32k) before > including any headers. You can define it in command line parameters. > Or get latest SVN - how MHD really redefine FD_SETSIZE with WinSock (old > code for redefinition was non-working). > > > > But, make this small change in your JMeter config: > > https://dl.dropboxusercontent.com/u/135304375/snip1.png (I can send a new > jmx file if you prefer) > > and in the MHD example: > > * MHD_OPTION_CONNECTION_LIMIT, (unsigned int) 16000 * 2,* > > 1,84% erros. And a lot of: `Failed to create a thread: Not enough space`. > OK, so I disabled the "thread per connection": > > Seems that you are using 32-bit version which limit number of threads > because of lack of address space. > > > > > MHD_start_daemon(*MHD_USE_SELECT_INTERNALLY *| MHD_USE_DEBUG, PORT, NULL, > NULL, > &answer_to_connection, NULL, > MHD_OPTION_CONNECTION_TIMEOUT, (unsigned int) 240, > * MHD_OPTION_CONNECTION_LIMIT, (unsigned int) 16000 * 2,* > MHD_OPTION_END); > > > *Samples: 27255.* > *Error: 99,61%. LOL* > > And it locks the last requests. > > Sorry for my ignorance, but MHD_USE_SELECT_INTERNALLY should be the more > fast MHD option, then or I did something wrong in my test, or this MHD > option has a small bug on Windows. :-/ > > This is an expected behavior with FD_SETSIZE equals 64 and 1000 keep-alive > clients. First 62 clients occupied all handled by select() connections and > the rest of clients are failed. If you change connection to "close", number > of errors will be significantly lower. > -- Silvio Clécio
