* aws vs ruby rails or php? how much faster? @ 2013-04-21 9:02 johannes falcone 2013-04-21 21:27 ` Shark8 2013-04-22 7:22 ` Jacob Sparre Andersen 0 siblings, 2 replies; 26+ messages in thread From: johannes falcone @ 2013-04-21 9:02 UTC (permalink / raw) curious esp since template uses tasklets? multithreaded? ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: aws vs ruby rails or php? how much faster? 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 1 sibling, 0 replies; 26+ messages in thread From: Shark8 @ 2013-04-21 21:27 UTC (permalink / raw) On Sunday, April 21, 2013 3:02:49 AM UTC-6, johannes falcone wrote: > curious > > > > esp since template uses tasklets? multithreaded? Good question. ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: aws vs ruby rails or php? how much faster? 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 ` (2 more replies) 1 sibling, 3 replies; 26+ messages in thread From: Jacob Sparre Andersen @ 2013-04-22 7:22 UTC (permalink / raw) johannes falcone <visphatesjava@gmail.com> writes: > curious > > esp since template uses tasklets? multithreaded? When we (Thomas L�cke, Kim Rostgaard Christensen and I) tested it, AWS was more than 1000 times faster than both Ruby on Rails and PHP [1]. AWS is fast enough to trigger a race-condition bug in ApacheBench. Thomas has written about this on his blog. Greetings, Jacob [1] The test was done with plain-from-the-package configurations on a Debian system. -- �Verbing weirds language.� -- Calvin ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: aws vs ruby rails or php? how much faster? 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:04 ` johannes falcone 2013-04-22 21:17 ` Yannick Duchêne (Hibou57) 2 siblings, 1 reply; 26+ messages in thread From: johannes falcone @ 2013-04-22 19:35 UTC (permalink / raw) On Monday, April 22, 2013 12:22:42 AM UTC-7, Jacob Sparre Andersen wrote: > johannes falcone <visphatesjava@gmail.com> writes: > > > > > curious > > > > > > esp since template uses tasklets? multithreaded? > > > > When we (Thomas Løcke, Kim Rostgaard Christensen and I) tested it, AWS > > was more than 1000 times faster than both Ruby on Rails and PHP [1]. > > > > AWS is fast enough to trigger a race-condition bug in ApacheBench. > > Thomas has written about this on his blog. > > > > Greetings, > > > > Jacob > > > > [1] The test was done with plain-from-the-package configurations on a > > Debian system. > > -- > > »Verbing weirds language.« -- Calvin nice anyone setting up an e commerce site on aws? like bn.com or amazon.com or ebay.com? something that can run on a 48g ram server with 32 cpu and peopple be liek holy crap we get how many user and how many request a second? cuz on rails we get like 15 ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: aws vs ruby rails or php? how much faster? 2013-04-22 19:35 ` johannes falcone @ 2013-04-22 20:26 ` Shark8 2013-04-22 20:53 ` johannes falcone 0 siblings, 1 reply; 26+ messages in thread From: Shark8 @ 2013-04-22 20:26 UTC (permalink / raw) On Monday, April 22, 2013 1:35:12 PM UTC-6, johannes falcone wrote: > anyone setting up an e commerce site on aws? > like bn.com or amazon.com or ebay.com? Not to my knowledge. > something that can run on a 48g ram server with 32 cpu and peopple be liek holy crap we get how many user and how many request a second? > > cuz on rails we get like 15 I'm not parsing that well. 15 users? 15 Requests/sec? ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: aws vs ruby rails or php? how much faster? 2013-04-22 20:26 ` Shark8 @ 2013-04-22 20:53 ` johannes falcone 0 siblings, 0 replies; 26+ messages in thread From: johannes falcone @ 2013-04-22 20:53 UTC (permalink / raw) On Monday, April 22, 2013 1:26:52 PM UTC-7, Shark8 wrote: > On Monday, April 22, 2013 1:35:12 PM UTC-6, johannes falcone wrote: > > > anyone setting up an e commerce site on aws? > > > like bn.com or amazon.com or ebay.com? > > > > Not to my knowledge. > > > > > something that can run on a 48g ram server with 32 cpu and peopple be liek holy crap we get how many user and how many request a second? > > > > > > cuz on rails we get like 15 > > > > I'm not parsing that well. 15 users? 15 Requests/sec? 15 r /s ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: aws vs ruby rails or php? how much faster? 2013-04-22 7:22 ` Jacob Sparre Andersen 2013-04-22 19:35 ` johannes falcone @ 2013-04-22 20:04 ` johannes falcone 2013-04-23 7:42 ` Maciej Sobczak 2013-04-22 21:17 ` Yannick Duchêne (Hibou57) 2 siblings, 1 reply; 26+ messages in thread From: johannes falcone @ 2013-04-22 20:04 UTC (permalink / raw) On Monday, April 22, 2013 12:22:42 AM UTC-7, Jacob Sparre Andersen wrote: > johannes falcone <visphatesjava@gmail.com> writes: > > > > > curious > > > > > > esp since template uses tasklets? multithreaded? > > > > When we (Thomas Løcke, Kim Rostgaard Christensen and I) tested it, AWS > > was more than 1000 times faster than both Ruby on Rails and PHP [1]. > > > > AWS is fast enough to trigger a race-condition bug in ApacheBench. > > Thomas has written about this on his blog. > > > > Greetings, > > > > Jacob > > > > [1] The test was done with plain-from-the-package configurations on a > > Debian system. > > -- > > »Verbing weirds language.« -- Calvinsa is there any problem running a fleet of AWS behind a load balancer? do the sessions still work? if in rare case 1 aws on 1 box not enuf? ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: aws vs ruby rails or php? how much faster? 2013-04-22 20:04 ` johannes falcone @ 2013-04-23 7:42 ` Maciej Sobczak 2013-04-23 7:53 ` Thomas Løcke 0 siblings, 1 reply; 26+ messages in thread From: Maciej Sobczak @ 2013-04-23 7:42 UTC (permalink / raw) W dniu poniedziałek, 22 kwietnia 2013 22:04:23 UTC+2 użytkownik johannes falcone napisał: > is there any problem running a fleet of AWS behind a load balancer? And why there should be any problems? We are using AWS servers behind nginx, which can also act as a load balancer. It works like a charm from the very first day when it was set up. > if in rare case 1 aws on 1 box not enuf? If your service is doing anything useful apart from serving static content, then you will have some more components down the stream to take care of. In other words, don't worry about AWS, all the bottlenecks will be elsewhere. -- Maciej Sobczak * http://www.msobczak.com * http://www.inspirel.com ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: aws vs ruby rails or php? how much faster? 2013-04-23 7:42 ` Maciej Sobczak @ 2013-04-23 7:53 ` Thomas Løcke 0 siblings, 0 replies; 26+ messages in thread From: Thomas Løcke @ 2013-04-23 7:53 UTC (permalink / raw) On 04/23/2013 09:42 AM, Maciej Sobczak wrote: > In other words, don't worry about AWS, all the bottlenecks will be elsewhere. /agree -- Thomas Løcke | thomas@12boo.net | http://12boo.net ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: aws vs ruby rails or php? how much faster? 2013-04-22 7:22 ` Jacob Sparre Andersen 2013-04-22 19:35 ` johannes falcone 2013-04-22 20:04 ` johannes falcone @ 2013-04-22 21:17 ` Yannick Duchêne (Hibou57) 2013-04-23 6:18 ` Thomas Løcke 2 siblings, 1 reply; 26+ messages in thread From: Yannick Duchêne (Hibou57) @ 2013-04-22 21:17 UTC (permalink / raw) Le Mon, 22 Apr 2013 09:22:42 +0200, Jacob Sparre Andersen <sparre@nbi.dk> a écrit: > johannes falcone <visphatesjava@gmail.com> writes: > >> curious >> >> esp since template uses tasklets? multithreaded? > > When we (Thomas Løcke, Kim Rostgaard Christensen and I) tested it, AWS > was more than 1000 times faster than both Ruby on Rails and PHP [1]. > > AWS is fast enough to trigger a race-condition bug in ApacheBench. > Thomas has written about this on his blog. What kind of request was tested with this benchmark? Was this static content delivery? Dynamic content? If this was dynamic content, then how was it defined, as there is no way to have a PHP reference file implemented in Ada (too much different)? That's not a surprise to me well designed Ada outperformed PHP and Ruby, but I still would like more details. -- “Syntactic sugar causes cancer of the semi-colons.” [1] “Structured Programming supports the law of the excluded muddle.” [1] [1]: Epigrams on Programming — Alan J. — P. Yale University ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: aws vs ruby rails or php? how much faster? 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 7:10 ` Yannick Duchêne (Hibou57) 0 siblings, 2 replies; 26+ messages in thread From: Thomas Løcke @ 2013-04-23 6:18 UTC (permalink / raw) On 04/22/2013 11:17 PM, Yannick Duchêne (Hibou57) wrote: > What kind of request was tested with this benchmark? Was this static > content delivery? Dynamic content? If this was dynamic content, then how > was it defined, as there is no way to have a PHP reference file > implemented in Ada (too much different)? > > That's not a surprise to me well designed Ada outperformed PHP and Ruby, > but I still would like more details. It was an in-house test we did to figure out how different frameworks performed. We tested both templating systems and purely static content. The differences were massive. Compared to Ruby, PHP and Python, AWS was so much faster, that testing it hardly made any sense. We didn't go out of our way to optimize anything. All frameworks were running in out of the box mode. The assumption was that a decent framework should be able to perform without forcing the user to learn about all sorts of arcane tricks to make it go faster. Also we assumed that X amount of time used to optimize a framework would result in fairly similar performance gains across the board. What we did not do was test things that relied on the performance of external systems, such as databases. We focused very narrowly on the straight-up performance of serving simple static and templated content over plain HTTP. This was mostly a benchmark of the frameworks ability to handle huge loads of HTTP requests. A few years ago I did a test[1] against node.js, mainly to prove that the threading model of AWS was not as inferior to the event model of node.js as many claimed. That test was equally simple and un-scientific, but it did get the point across. Please note that this test is very old and that node.js has since surpassed AWS. It still stands though that using a threaded webserver does not necessarily equal slow performance. It would be interesting to do some of these tests in a more controlled manner, and in an open forum where it is known what and how tests are done. Also we could learn more about AWS, and perhaps take a look at how we can make it go even faster. :o) [1] http://wiki.ada-dk.org/aws_vs_node.js -- Thomas Løcke | thomas@12boo.net | http://12boo.net ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: aws vs ruby rails or php? how much faster? 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 7:10 ` Yannick Duchêne (Hibou57) 1 sibling, 1 reply; 26+ messages in thread From: johannes falcone @ 2013-04-23 6:45 UTC (permalink / raw) On Monday, April 22, 2013 11:18:12 PM UTC-7, Thomas Løcke wrote: > On 04/22/2013 11:17 PM, Yannick Duchêne (Hibou57) wrote: > > > What kind of request was tested with this benchmark? Was this static > > > content delivery? Dynamic content? If this was dynamic content, then how > > > was it defined, as there is no way to have a PHP reference file > > > implemented in Ada (too much different)? > > > > > > That's not a surprise to me well designed Ada outperformed PHP and Ruby, > > > but I still would like more details. > > > > > > It was an in-house test we did to figure out how different frameworks > > performed. We tested both templating systems and purely static content. > > > > The differences were massive. Compared to Ruby, PHP and Python, AWS was > > so much faster, that testing it hardly made any sense. > > > > We didn't go out of our way to optimize anything. All frameworks were > > running in out of the box mode. The assumption was that a decent > > framework should be able to perform without forcing the user to learn > > about all sorts of arcane tricks to make it go faster. Also we assumed > > that X amount of time used to optimize a framework would result in > > fairly similar performance gains across the board. > > > > What we did not do was test things that relied on the performance of > > external systems, such as databases. We focused very narrowly on the > > straight-up performance of serving simple static and templated content > > over plain HTTP. This was mostly a benchmark of the frameworks ability > > to handle huge loads of HTTP requests. > > > > A few years ago I did a test[1] against node.js, mainly to prove that > > the threading model of AWS was not as inferior to the event model of > > node.js as many claimed. That test was equally simple and > > un-scientific, but it did get the point across. Please note that this > > test is very old and that node.js has since surpassed AWS. It still > > stands though that using a threaded webserver does not necessarily > > equal slow performance. > > > > It would be interesting to do some of these tests in a more controlled > > manner, and in an open forum where it is known what and how tests are > > done. Also we could learn more about AWS, and perhaps take a look at > > how we can make it go even faster. :o) > > > > [1] http://wiki.ada-dk.org/aws_vs_node.js > > > > -- > > Thomas Løcke | thomas@12boo.net | http://12boo.net If node.js is faster then why doesn't everyone use node.js? In a nutshell is javascript enough to program a dynamic website? What do you think of aolserver or naviserver vs aws? ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: aws vs ruby rails or php? how much faster? 2013-04-23 6:45 ` johannes falcone @ 2013-04-23 6:55 ` Thomas Løcke 2013-04-23 9:57 ` Dmitry A. Kazakov 0 siblings, 1 reply; 26+ messages in thread From: Thomas Løcke @ 2013-04-23 6:55 UTC (permalink / raw) On 04/23/2013 08:45 AM, johannes falcone wrote: > If node.js is faster then why doesn't everyone use node.js? > In a nutshell is javascript enough to program a dynamic website? > What do you think of aolserver or naviserver vs aws? Speed isn't everything Johannes. If I need to serve 100 request per second, and my chosen platform can do 150, then I no longer need to worry about performance. I can focus on more important things, such as security, stability, modularity, safety and the general functionality of the application. Since it is much easier to write safe, secure and stable code in Ada compared to something like Javascript/PHP, the choice of Ada is a no-brainer to me. Node.js might be faster, but it relies on an inherently horrible programming language that is prone to errors and _very_ hard to maintain when the application grows beyond a few thousand lines. I don't know anything about aolserver and naviserver, so I can't comment on those. :o) -- Thomas L�cke | thomas@12boo.net | http://12boo.net ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: aws vs ruby rails or php? how much faster? 2013-04-23 6:55 ` Thomas Løcke @ 2013-04-23 9:57 ` Dmitry A. Kazakov 0 siblings, 0 replies; 26+ messages in thread From: Dmitry A. Kazakov @ 2013-04-23 9:57 UTC (permalink / raw) On Tue, 23 Apr 2013 08:55:13 +0200, Thomas L�cke wrote: > On 04/23/2013 08:45 AM, johannes falcone wrote: >> If node.js is faster then why doesn't everyone use node.js? >> In a nutshell is javascript enough to program a dynamic website? >> What do you think of aolserver or naviserver vs aws? > > Speed isn't everything Johannes. Very true. Speed is about latencies, which are important only for hard real time. For a Web services payload is a more important factor. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: aws vs ruby rails or php? how much faster? 2013-04-23 6:18 ` Thomas Løcke 2013-04-23 6:45 ` johannes falcone @ 2013-04-23 7:10 ` Yannick Duchêne (Hibou57) 2013-04-23 7:45 ` Thomas Løcke 2013-04-23 10:08 ` Dmitry A. Kazakov 1 sibling, 2 replies; 26+ messages in thread From: Yannick Duchêne (Hibou57) @ 2013-04-23 7:10 UTC (permalink / raw) Le Tue, 23 Apr 2013 08:18:12 +0200, Thomas Løcke <thomas@12boo.net> a écrit: > A few years ago I did a test[1] against node.js, mainly to prove that > the threading model of AWS was not as inferior to the event model of > node.js as many claimed. Asynchronous I/O can be achieved with Ada too, and that does not implies tasking, just wrapping what the OS provides for that. For the event driven‑model, that's a topic I don't know, so I'm not sure to understand what it means (neither I see if something prevent it to be designed in Ada). Looking at the two snippets, I could not avoid thinking that's more comparing implementation of basic control flow and binding to system calls than comparing anything else. Also, that's too small to tell anything about a real sized application. Node.js may be fast with than very tiny example, but if that's really JavaScript, then that's probably still unmaintainable as things become more complex and big. I wonder if this kind of benchmark really tells anything (the one with AWS vs Node.js). -- “Syntactic sugar causes cancer of the semi-colons.” [1] “Structured Programming supports the law of the excluded muddle.” [1] [1]: Epigrams on Programming — Alan J. — P. Yale University ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: aws vs ruby rails or php? how much faster? 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 1 sibling, 1 reply; 26+ messages in thread From: Thomas Løcke @ 2013-04-23 7:45 UTC (permalink / raw) On 04/23/2013 09:10 AM, Yannick Duchêne (Hibou57) wrote: > I wonder if this kind of benchmark really tells anything (the one with > AWS vs Node.js). It does say one thing: AWS is not slow. What I set out to do was to show that it is not necessarily slow to use threads, as the node.js people claimed it would be. AWS handles a whole slew of connections just fine. Besides that, this test doesn't really tell anything about anything. :o) -- Thomas Løcke | thomas@12boo.net | http://12boo.net ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: aws vs ruby rails or php? how much faster? 2013-04-23 7:45 ` Thomas Løcke @ 2013-04-23 7:51 ` Yannick Duchêne (Hibou57) 0 siblings, 0 replies; 26+ messages in thread From: Yannick Duchêne (Hibou57) @ 2013-04-23 7:51 UTC (permalink / raw) Le Tue, 23 Apr 2013 09:45:43 +0200, Thomas Løcke <thomas@12boo.net> a écrit: > On 04/23/2013 09:10 AM, Yannick Duchêne (Hibou57) wrote: >> I wonder if this kind of benchmark really tells anything (the one with >> AWS vs Node.js). > > > It does say one thing: AWS is not slow. What I set out to do was to > show that it is not necessarily slow to use threads Obviously, there may even be green‑threads if that's OK and if that really present an opportunity to save something. That's a matter of runtime and compiler implementation, not an issue with the tasking model on its own. > Besides that, this test doesn't really tell anything about anything. > > :o) :-p -- “Syntactic sugar causes cancer of the semi-colons.” [1] “Structured Programming supports the law of the excluded muddle.” [1] [1]: Epigrams on Programming — Alan J. — P. Yale University ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: aws vs ruby rails or php? how much faster? 2013-04-23 7:10 ` Yannick Duchêne (Hibou57) 2013-04-23 7:45 ` Thomas Løcke @ 2013-04-23 10:08 ` Dmitry A. Kazakov 2013-04-23 11:30 ` Yannick Duchêne (Hibou57) 1 sibling, 1 reply; 26+ messages in thread From: Dmitry A. Kazakov @ 2013-04-23 10:08 UTC (permalink / raw) On Tue, 23 Apr 2013 09:10:39 +0200, Yannick Duch�ne (Hibou57) wrote: > Asynchronous I/O can be achieved with Ada too, and that does not implies > tasking, just wrapping what the OS provides for that. Oh, it does. I don't know what you guys are talking about, but asynchronous I/O is intimately related to tasking. If you have tasks you normally don't need asynchronous I/O, you do it in a blocking way. If you have one task or less tasks than I/O requests pending, you do I/O asynchronously. With many simultaneous requests you should go asynchronous because the number of tasks is limited. An OS can handle far less simultaneous tasks than simultaneous I/O requests/channels. For either HD or sockets you could do I/O synchronously (blocking) or asynchronously (non-blocking). -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: aws vs ruby rails or php? how much faster? 2013-04-23 10:08 ` Dmitry A. Kazakov @ 2013-04-23 11:30 ` Yannick Duchêne (Hibou57) 2013-05-02 21:13 ` Randy Brukardt 0 siblings, 1 reply; 26+ messages in thread From: Yannick Duchêne (Hibou57) @ 2013-04-23 11:30 UTC (permalink / raw) Le Tue, 23 Apr 2013 12:08:15 +0200, Dmitry A. Kazakov <mailbox@dmitry-kazakov.de> a écrit: > On Tue, 23 Apr 2013 09:10:39 +0200, Yannick Duchêne (Hibou57) wrote: > >> Asynchronous I/O can be achieved with Ada too, and that does not implies >> tasking, just wrapping what the OS provides for that. > > Oh, it does. I don't know what you guys are talking about, but > asynchronous > I/O is intimately related to tasking. Yes it is, but as you said, it save tasks. The application doing asynchronous I/O, does not even need to run multiple tasks, just only one which is its own task, as the second may be required task can be provided by the OS (and may be just interrupts, depending on the kind of I/O). When I said “does not implies tasking”, I wanted to underline the same as you did, that it does not cost tasks. > If you have tasks you normally don't need asynchronous I/O, you do it in > a > blocking way. > > If you have one task or less tasks than I/O requests pending, you do I/O > asynchronously. > > With many simultaneous requests you should go asynchronous because the > number of tasks is limited. An OS can handle far less simultaneous tasks > than simultaneous I/O requests/channels. > > For either HD or sockets you could do I/O synchronously (blocking) or > asynchronously (non-blocking). > -- “Syntactic sugar causes cancer of the semi-colons.” [1] “Structured Programming supports the law of the excluded muddle.” [1] [1]: Epigrams on Programming — Alan J. — P. Yale University ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: aws vs ruby rails or php? how much faster? 2013-04-23 11:30 ` Yannick Duchêne (Hibou57) @ 2013-05-02 21:13 ` Randy Brukardt 2013-05-03 0:13 ` Shark8 ` (2 more replies) 0 siblings, 3 replies; 26+ messages in thread From: Randy Brukardt @ 2013-05-02 21:13 UTC (permalink / raw) [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1: Type: text/plain, Size: 2357 bytes --] "Yannick Duchêne (Hibou57)" <yannick_duchene@yahoo.fr> wrote in message news:op.wvzrlknsule2fv@cardamome... Le Tue, 23 Apr 2013 12:08:15 +0200, Dmitry A. Kazakov <mailbox@dmitry-kazakov.de> a écrit: >> On Tue, 23 Apr 2013 09:10:39 +0200, Yannick Duchêne (Hibou57) wrote: >> >>> Asynchronous I/O can be achieved with Ada too, and that does not implies >>> tasking, just wrapping what the OS provides for that. >> >> Oh, it does. I don't know what you guys are talking about, but >> asynchronous >> I/O is intimately related to tasking. > >Yes it is, but as you said, it save tasks. The application doing >asynchronous I/O, does not even need to run multiple tasks, just only one >which is its own task, as the second may be required task can be provided >by the OS (and may be just interrupts, depending on the kind of I/O). When >I said "does not implies tasking", I wanted to underline the same as you >did, that it does not cost tasks. True enough, but the *implementation* of asynchronous I/O matters just as much. 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. So we had to remove that and return to the busy-waited sockets. [Two notes: the program uses Ada tasks; we just have to use the busy-waited sockets to avoid blocking the entire server if nothing is ready; the busy-wait loop contains a delay to allow other tasks to run if there is nothing to do. Tuning these loops to the way sockets I/O works (either the data is available immediately, or it is going to take a bunch of milleseconds before it will show up) keeps the overhead to a minimum. Second, I don't know if this is true on newer versions of Windows, I've never had reason to test it. The web server still runs on the 900 MHZ W2K server (soon to be retired in favor of a new Debian machine - with 3GHZ with 8 virtual cores - a rather different environment). Randy. ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: aws vs ruby rails or php? how much faster? 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 7:09 ` Dmitry A. Kazakov 2 siblings, 1 reply; 26+ messages in thread From: Shark8 @ 2013-05-03 0:13 UTC (permalink / raw) On Thursday, May 2, 2013 3:13:24 PM UTC-6, Randy Brukardt wrote: > > The web server still > runs on the 900 MHZ W2K server (soon to be retired in favor of a new Debian > machine - with 3GHZ with 8 virtual cores - a rather different environment). Out of curiosity, how much of that was directly-portable? ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: aws vs ruby rails or php? how much faster? 2013-05-03 0:13 ` Shark8 @ 2013-05-03 22:41 ` Randy Brukardt 0 siblings, 0 replies; 26+ messages in thread From: Randy Brukardt @ 2013-05-03 22:41 UTC (permalink / raw) "Shark8" <onewingedshark@gmail.com> wrote in message news:14ba012e-aa71-4fa4-a582-f51a4f1e1f09@googlegroups.com... > On Thursday, May 2, 2013 3:13:24 PM UTC-6, Randy Brukardt wrote: >> >> The web server still >> runs on the 900 MHZ W2K server (soon to be retired in favor of a new >> Debian >> machine - with 3GHZ with 8 virtual cores - a rather different >> environment). > > Out of curiosity, how much of that was directly-portable? Can't tell you yet, I haven't tried to actually do it. So far, I've been working on getting an cleaned-up sockets library working on both systems. (The original implementation was based on Claw.Sockets, which is too Windows-specific to use outright. NCSockets was the "portable" translation of that, but it never really was finished, which I'm doing now. Tero has already built most of a Debian 64-bit version of NCSockets, so I'm starting with that and the Claw.Sockets implementation. When done, Tero will have these on his website; and they'll be BSD-licensed, including the sample programs.) Randy. ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: aws vs ruby rails or php? how much faster? 2013-05-02 21:13 ` Randy Brukardt 2013-05-03 0:13 ` Shark8 @ 2013-05-03 1:02 ` Yannick Duchêne (Hibou57) 2013-05-03 22:48 ` Randy Brukardt 2013-05-03 7:09 ` Dmitry A. Kazakov 2 siblings, 1 reply; 26+ messages in thread From: Yannick Duchêne (Hibou57) @ 2013-05-03 1:02 UTC (permalink / raw) 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… -- “Syntactic sugar causes cancer of the semi-colons.” [1] “Structured Programming supports the law of the excluded muddle.” [1] [1]: Epigrams on Programming — Alan J. — P. Yale University ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: aws vs ruby rails or php? how much faster? 2013-05-03 1:02 ` Yannick Duchêne (Hibou57) @ 2013-05-03 22:48 ` Randy Brukardt 0 siblings, 0 replies; 26+ messages in thread From: Randy Brukardt @ 2013-05-03 22:48 UTC (permalink / raw) [-- 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. ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: aws vs ruby rails or php? how much faster? 2013-05-02 21:13 ` Randy Brukardt 2013-05-03 0:13 ` Shark8 2013-05-03 1:02 ` Yannick Duchêne (Hibou57) @ 2013-05-03 7:09 ` Dmitry A. Kazakov 2013-05-03 7:11 ` Dmitry A. Kazakov 2 siblings, 1 reply; 26+ messages in thread From: Dmitry A. Kazakov @ 2013-05-03 7:09 UTC (permalink / raw) On Thu, 2 May 2013 16:13:24 -0500, Randy Brukardt wrote: > Second, I don't know if this is true on newer > versions of Windows, I've never had reason to test it. I have a HTTP server that uses socket-select based on GNAT sockets. I am too lazy to test it for 1K+ clients. If anybody has time and desire, he is welcome. Not in Ada. In C++ we have an application wich uses socket-select at large scale 3.5K sockets under Windows (Server 200 I believe). No problems so far. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: aws vs ruby rails or php? how much faster? 2013-05-03 7:09 ` Dmitry A. Kazakov @ 2013-05-03 7:11 ` Dmitry A. Kazakov 0 siblings, 0 replies; 26+ messages in thread From: Dmitry A. Kazakov @ 2013-05-03 7:11 UTC (permalink / raw) On Fri, 3 May 2013 09:09:40 +0200, Dmitry A. Kazakov wrote: > Not in Ada. In C++ we have an application wich uses socket-select at large > scale 3.5K sockets under Windows (Server 200 I believe) Server 2008 -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de ^ permalink raw reply [flat|nested] 26+ messages in thread
end of thread, other threads:[~2013-05-03 22:48 UTC | newest] Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 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 2013-05-03 7:09 ` Dmitry A. Kazakov 2013-05-03 7:11 ` Dmitry A. Kazakov
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox