From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: aws vs ruby rails or php? how much faster?
Date: Fri, 3 May 2013 17:48:29 -0500
Date: 2013-05-03T17:48:29-05:00 [thread overview]
Message-ID: <km1erv$jev$1@munin.nbi.dk> (raw)
In-Reply-To: op.wwhg52xpule2fv@cardamome
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2032 bytes --]
"Yannick Duch�ne (Hibou57)" <yannick_duchene@yahoo.fr> wrote in message
news:op.wwhg52xpule2fv@cardamome...
Le Thu, 02 May 2013 23:13:24 +0200, Randy Brukardt <randy@rrsoftware.com>
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.
next prev parent reply other threads:[~2013-05-03 22:48 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-21 9:02 aws vs ruby rails or php? how much faster? johannes falcone
2013-04-21 21:27 ` Shark8
2013-04-22 7:22 ` Jacob Sparre Andersen
2013-04-22 19:35 ` johannes falcone
2013-04-22 20:26 ` Shark8
2013-04-22 20:53 ` johannes falcone
2013-04-22 20:04 ` johannes falcone
2013-04-23 7:42 ` Maciej Sobczak
2013-04-23 7:53 ` Thomas Løcke
2013-04-22 21:17 ` Yannick Duchêne (Hibou57)
2013-04-23 6:18 ` Thomas Løcke
2013-04-23 6:45 ` johannes falcone
2013-04-23 6:55 ` Thomas Løcke
2013-04-23 9:57 ` Dmitry A. Kazakov
2013-04-23 7:10 ` Yannick Duchêne (Hibou57)
2013-04-23 7:45 ` Thomas Løcke
2013-04-23 7:51 ` Yannick Duchêne (Hibou57)
2013-04-23 10:08 ` Dmitry A. Kazakov
2013-04-23 11:30 ` Yannick Duchêne (Hibou57)
2013-05-02 21:13 ` Randy Brukardt
2013-05-03 0:13 ` Shark8
2013-05-03 22:41 ` Randy Brukardt
2013-05-03 1:02 ` Yannick Duchêne (Hibou57)
2013-05-03 22:48 ` Randy Brukardt [this message]
2013-05-03 7:09 ` Dmitry A. Kazakov
2013-05-03 7:11 ` Dmitry A. Kazakov
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox