"Yannick Duch�ne (Hibou57)" wrote in message news:op.wwhg52xpule2fv@cardamome... Le Thu, 02 May 2013 23:13:24 +0200, Randy Brukardt a �crit: >> A bit of background: Janus/Ada uses it's own task management, so all >> tasks >> run inside of a single OS process/thread. In our web server running on >> Windows 2K, we tried to use asynchonrous socket I/O to prevent unintended >> blocking from socket calls. But the effect was that the server ran 10 >> times >> slower than using busy-waited socket I/O; effectively W2K used only a >> single >> OS thread to implement then asynchronous sockets and that effectively >> serialized everything going in and out of the server. > >I don't understand how this can make it working ten times slower. W2K must >be eating something in the while, which is not related to the asynchronous >I/O. Or else, I don't understand. It's as I explained; the "asynchronous sockets" were apparently implemented by a single Windows thread. So if multiple I/O were done more or less at the same time (which is very common on a web server that's receiving requests and sending replies (files)), Windows did each one of them in order -- the second one had to wait for the first to finish before it was even started. The net effect was to turn the entire server into a single-threaded program, even though the server itself never blocked. The speed effect seemed like a factor of ten or so; with the supposedly asynchronous sockets, it could only handle one or two simultaneous requests. The busy-waited version can handle up to 20 requests at a time, although the size of our DSL connection tends to limit the number of successful connections to 8-12 before everything slows to a crawl. It will be interesting to see how this behaves on Debian using GNAT. (This is essentially the worst case for porting Ada code; different compiler on a different target with different bit sizes.) Randy.