From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,3e9e2e402ed75bc3 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII X-Received: by 10.66.231.41 with SMTP id td9mr4746356pac.35.1367621312094; Fri, 03 May 2013 15:48:32 -0700 (PDT) MIME-Version: 1.0 Path: bp1ni1481pbd.1!nntp.google.com!news.glorb.com!news.ecp.fr!news.jacob-sparre.dk!munin.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: aws vs ruby rails or php? how much faster? Date: Fri, 3 May 2013 17:48:29 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <87vc7fm3lp.fsf@adaheads.sparre-andersen.dk> <517627a4$0$32104$14726298@news.sunsite.dk> <1bjhu6xj0sh4e.1u1r23nzr3zrh$.dlg@40tude.net> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1367621311 19935 69.95.181.76 (3 May 2013 22:48:31 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Fri, 3 May 2013 22:48:31 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Date: 2013-05-03T17:48:29-05:00 List-Id: "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.