Picture of admin

Some Numbers at Last

  • Posted By admin on April 04, 2005

So, a few weeks ago I made an offhanded post here about my new-found love for Rails. I’d been skipping off the surface of Ruby for a while, trying to decide if it, or Python, or Groovy, or something else, ought to fill out the empty slot in my tool belt. (I’ll save the “why LISP isn’t on this list” post for another time.) Rails seemed like an excellent way to put Ruby through a workout, and I had the right sized project to try it out with.

The project itself is not open-source; the client is now and shall remain anonymous. But they are paying me my going rate to do this work, which makes it a commercial Rails project, and it will in the future be installed into some rather large organizations. I can’t really say much about what the application’s domain is, but I can lay out the general principles of the app.

The application must support multiple users, in the order of 10-100 concurrently. The load isn’t particularly high, but the application will be treated like a desktop app (more specifically, a spreadsheet replacement) so it has to be responsive. The application is for managing pieces of a large machine process. There are lots of types of components to be managed, and the relationships between them can be quite complicated. There are no one-to-one relationships in the model, but plenty of one-to-many and many-to-many. In addition to managing the components, the application has to allow for the addition of entirely new categories of components as well as a variety of customizable fields. Finally, the authorization rules call for a breadth of user roles with a complex mapping of permissions to those roles.

I’ve finally gotten around to running the profiling numbers and doing some comparison between the two systems. I won’t spoil the suspense by listing my conclusions up front—you’ll have to scroll through the rest of the post to see them. But, first, let me set the stage: the original application is based on the Java/JSTL/Spring/Hibernate/MySQL stack. I used ACEGI for the security, SpringMVC for the web controller, and was using Hibernate 2.x for the O/RM. To increase performance, I was using the default output caching from SpringMVC and data caching in Hibernate. The re-implementation is in Rails on top of MySQL. The authorization is done through a custom observer and a custom authorization class, which uses a declarative rules file for permission mapping. For performance, I’m using a combination of page caching, action caching, and cache sweepers (observers whose job it is to expire cached pages).

Now, for the comparisons:

Time to Implement I made a comment about this in the previous posts on the topic, and that comment has been quoted widely out in the wide blogosphere as a classic example of Rails hype. So, let me make it plain: any time you re-write an application, it will go almost infinitely faster because you already have a firm grasp on the problem domain. Such was the case for me in my re-write; we’d spent so much time on the domain model and the database schema that the second time through the application, everything already made perfect sense to me. Any comparison of how long it took to implement one or the other is bogus, since the only fair comparison would be to implement two roughly functionally equivalent projects in the two different stacks and measure the competitive results. Since I have not done that, making statements about how it only took 5 days to re-implement the site are almost meaningless. What I can say is that I had more fun implementing it the second time, but that’s just personal preference.

Lines of Code This one is a lot more interesting. Folks will tell you all the time that there is a running debate about the meaningfulness of LOC comparisons. They’re right; there is a running debate. I just think it’s moot. For my money, the fewer lines of code I have to write to get a piece of functionality, as long as those lines are clear in meaning, the better off I am. Obfuscated Perl programs don’t make the grade; I can write some really concise Perl code and not have any idea, three months later, what the heck I was doing. But if the code is legible, its intent obvious, then more concise is better, pure and simple.

Bear in mind that this comparison is somewhat unfair. The Rails version of the app has been in development for an extra month (meaning a month’s worth of new features added) while the Java version has been stagnant since the switch. Since the Rails version started out as an experiment, I don’t have a clear history of the codebase to be able to produce a version that is identical in features to the Java version. Therefore, I’ve made the comparison based on the current state of the app vs. the abandoned Java version.

The LOC counts used here do not include comments or unit tests, nor do they include simple punctuation lines (lines with just a “}” or “end”).

Without further ado:

Lines of Code Rails: 1164 Java: 3293

Number of Classes: Rails: 55 Java: 62

Number of Methods: Rails: 126 Java: 549

Configuration Lines Rails: 113 Java: 1161

Those numbers are beyond striking. The configuration count alone is enough to make me think long and hard about what I’ve been doing lately. Let me forestall any criticism about my “agenda”, by the way. Somebody recently said that I must have an “anti-Java” or an “anti-Spring” agenda. That is far from the truth, since my Spring: A Developer’s Notebook hits shelves any day now. I don’t want people to stop using Spring, or Java. In fact, I want lots and lots of Java developers to use Spring and lots and lots of non-Java developers to start using Java so they can start using Spring. But one of the things I like most about Spring (its concise configuration) is still, well, huge, compared to the same app in Rails.

Performance This is where everybody really wants to see the numbers. So, for the sake of total specificity, the following numbers were generated on a 1.5GhZ Mac OSX (10.3.7) PowerBook with a 4200rpm hard drive and 1GB of RAM. The Java app is running on Jakarta Tomcat v 5.0.28, while the Rails app is running in Lighttp with FastCGI. The setups are standard for each application stack.

Since both stacks have different caching mechanisms, with different degrees of difficulty to manage them, I’ll start the performance comparison with a walk through the application without using the caching systems. To generate the first number, I walked through every screen in the application (using the screens available in the Java version to form a subset of the screens available in the newer Rails version) hitting pages that have not been cached yet. This starts from logging in, then hitting every available piece of functionality once. These numbers do not include the time it took me (the user) to navigate to the next request, only the time to process the requests. Both applications had roughly equivalent logging turned on (obviously, it can’t be exact, but without the logging, I couldn’t provide measurements). Here’s what I found out.

To walk the entire application feature set, once, in Rails, without caching, took 41.801s. To walk the exact same feature set in the Java app took 58.369s. These numbers are averages over five attempts with each app, with full restart between to give the cleanest runs possible. Those summary numbers are deceiving, though. What I found was that, the less complex the feature, the faster the Java app served it relative to the Rails app. The more complex the feature, the slower the Java app served it relative to the Rails app. Some of that difference might be changes to the model during the re-implementation based on a better understanding of the domain. Regardless, that difference comes out to show the Rails app at ~30% faster than the Java version when caching isn’t taken into account. If I am generous and say that half of the difference is due to optimizations in the model, that still leaves us a 15% better performance in Rails.

The caching story is interesting. The default caching mechanism for Rails is either page caching (caching the output of the rendering to a physical html file and letting the server serve it directly instead of invoking Rails the next time it is requested) or action caching (similar, except the output is cached in memory or another kind of store and Rails is invoked to process the request). On the Java side, there is JSP pre-compilation, Spring output caching and of course Hibernate data caching. I used a simple load tester to test a couple of pieces of functionality in the application. For each URL, I ran the test without a pre-existing cache of the response, then again with it, 100 times each, and then determined the number of requests per second.

Functionality 1: Rails, 100 runs, no pre-existing cache: 75.59 request/second. Rails, 100 runs, pre-existing cache: 1754.39 requests/second. Java, 100 runs, no pre-existing cache: 71.89 requests/second. Java, 100 runs, pre-existing cache: 80.06 requests/second.

Functionality 2: Rails, 100 runs, no pre-existing cache: 62.50 r/s. Rails, 100 runs, pre-existing cache: 1785.15 r/s. Java, 100 runs, no pre-existing cache: 80.06 r/s. Java, 100 runs, pre-existing cache: 88.97 r/s.

These numbers are not a great comparison, because there is tons more I can do to increase the cache performance of the Java application. No doubt whatsoever (I just hadn’t gotten around to it by the time I abandoned it). What is interesting, though, is that the Rails page caching maxes out . The server can’t serve the pages any faster than that. And with the Rails cache_sweeper observer pattern, it is dead-simple to use this hyper-fast caching whenever possible (obviously, highly dynamic pages can’t be cached, but that’s the case with that kind of page in any application stack). If you switch to the action caching (which allows all the filters to be executed) the Rails app still ends up in the 800-1000 requests/second range.

Conclusions So what do I think? I think that the application I’m working on is perfectly suited for Rails and Rails is perfectly suited for it. I think that I have had more fun working on the Rails app than the Java version. However, I think that the Java version is just as capable, and could be just as performant, as the Rails app. To me, the eye-opening revelation isn’t “Rails is faster than Java/Spring/Hibernate”. It’s “Rails can be very fast”. I think that there is a lot to be said for Rails, and it deserves much of the press it is getting. However, I don’t think its a Java-killer. I think there are plenty of applications, and development teams, that are better suited to Java and its immense universe of available support libraries. I certainly am not going to stop developing in and learning about Java just because I’ve discovered Rails. On the other hand, I am going to spend more of my time trying to find projects that I can use Rails on.

I’m extremely interested in how these numbers strike folks, and whether there are other comparisons that you would find useful. So interested, in fact, that I’m risking blog-spamming by turning comments back on. So, if you have some other comparisons you would find useful, or some insight onto these numbers, or even some things you think I ought to try to make the comparisons better, let me know. I can’t promise I’ll tackle them all, but I think it will be interesting.

Comments
  1. Tomas JoginApril 04, 2005 @ 03:07 AM
    Thanks for writing this, and thanks for doing so with a sober mind (instead of pissing your pants of enthusiasm and spoiling the whole thing). While all the numbers you've mentioned are interesting, the two things that I really think are more important than the others (because I think they're representative overall, not just in this particular case) are these: 1. The Java configuration is almost the same size as the *entire* Rails application. 2. The Rails caching is very impressive, but, more importantly, much much more importantly, is that it's *incredibly* easy to set up and manage. Setting up advanced (and obviously very well performing) caching and sweeping in Rails is child's play. My personal opinion (or perhaps it's a theory) is that it's not really a question of whether or not Rails is capable of handling your app, but rather if the (somewhat extended Rails implementation of the) ActiveRecord pattern is. If you don't need the flexibility of DataMapper, then by all means, use Rails to build your app. You'll have more fun doing it, it will perform just as well, and you'll write much less code.
  2. Sascha EbachApril 04, 2005 @ 07:43 AM
    Ok, this went wrong. It seems like my second post shows first now. I will just do it over, please delete the last one. --- Nice write up. I think this comparison shows nicely that a "dynamic" language can be as performant as a statically compiled language. I think it doesn't matter if your app were written in C, C#, JAVA, Ruby, PHP, Perl, Python or whatever. You will be able to tweak the performance in any of those. So what this nice article really is, is a testament that you shouldn't pick a language like Java only because of "performance" reason hoping it will "scale" better. If performance is out of the question as a parameter for the choice of language things like libraries, ease of development, concise code come to play. What I read in your post is "Yeah, Rails can be as fast as Java an its frameworks and it can do so with half the code, and it makes even more fun to do it" when I read between the lines ;) I often work alone and for me it is essential that when I come back to a program after 12 months that I have 1500 LOC rather than 3000. This stuff makes a real difference to me and it also dictates what price I can make for my customers.
  3. Mike SpilleApril 04, 2005 @ 10:29 AM
    It sounds like you've proven that you have a serious caching bug in your Java code :-) More seriously - 3K SLOC and
  4. Justin GehtlandApril 04, 2005 @ 10:43 AM
    Mike -- I'm not sure what the rest of your comment was going to say, but if it wasn't clear so far, yes, there was more that needed to be done on increasing the performance of the Java app, and yes, the time-to-implement comparison is bogus (see the lines in the post that say "the time-to-implement comparison is bogus" ;-) ) but the point I was trying to get across was a direct head-to-head comparison between two apps. I don't think the overall size of the app is all that important, especially given the way most web apps work. If we were talking about some kind of monolithic app, that would be different, but for small or medium size web apps, what these numbers say to me is that Rails has the potential to be every bit as fast, and sometimes faster, as a Java implementation, so that vector shouldn't be a major contributor to the decision-making process.
  5. MarkApril 04, 2005 @ 11:52 AM
    One of the issues that you're seeing with regards to speed has to do with Tomcat. Tomcat is meant as a reference implementation of a J2EE servlet runner, and _not_ as an optimized-for-speed app server. Go ahead and download a copy of Resin (caucho.com), throw your application on there, and you'll see a significant speed boost. My other suggestion is that the difference in speed is due to JDBC through Hibernate vs. (whatever native code Rails is calling). I would run your application through Oracle, with Oracle's provided JDBC drivers, and see how fast your application runs as well. Lastly, ditch the JSTL. Tomcat is especially bad at generating good Java code when reading in JSTL; Resin is marginally better but still lacking. Unless you plan on designer-types making changes to the JSP pages, why would you add on another layer of code abstraction?
  6. MasonApril 04, 2005 @ 10:09 PM
    JSTL/Spring/Hibernate != ruby on rails. If RoR is doing the job better, then it's better. But that doesn't mean it's INHERANTLY better at all things, jus this particuar thing that you are doing. For example, I tried using Ruby On Rails vs. Java OpenGL to render a 3-D image... man Ruby on rails SUCKED! The JOGL was, like, 15 lines TOTAL, but the ruby-on-rails was something close to 2 million lines and the performace wasn't even close!
  7. Justin GehtlandApril 04, 2005 @ 10:24 PM
    Mark -- Good points on omcat. I've downloaded Resin and (see later post) will be trying it out. As for the JDBC difference, well, there's not much I can say there other than I don't think I'll have time to port the app to Oracle to test it that way. Finally, yes, the JSTL is there specifically to allow end customers to change the UI easily. Mason -- Umm, would it be impolite to merely say, "duh"? I'm pretty sure I stated, with a fair degree of oomph, that I don't think Rails is a Java-killer, but that what this comparison showed me was that Rails didn't just suck out loud, but was in fact a fairly performant, and fun to work with, web application framework that I will be happy to try again. I'll keep in mind your suggestion to avoid it for my OpenGL rendering, though. Thanks for the heads up!
  8. KarlApril 04, 2005 @ 10:29 PM
    Resin or Orion, either one is supposed to give orders of magnitude higher performance than Tomcat. http://www.orionserver.com/benchmarks/benchmark.html
  9. relative^ambitionApril 04, 2005 @ 10:57 PM
    excellent comparison... thanks for doing the research
  10. Greg McCoyApril 04, 2005 @ 11:21 PM
    I loved the article but I really wish you would lay off the Perl bashing. If you cannot make sense of your Perl code after 3 months, I believe you are doing something wrong or being too clever. You seem smart enough - judging from your prose - to know any language is a candidate for abuse. I am giddy with anticipation about learning why LISP doesn't suit you. Of course, in that context you have much more company. Keep writing and stay flexible.
  11. Justin GehtlandApril 04, 2005 @ 11:27 PM
    Greg -- sorry, I had hoped I was making myself clear in that statement about Perl. I was referring specifically to the style of Perl programming where people go out of their way to write really complex logic in seven characters or less. Perl itself is a great language. Obfuscated Perl, well, you know how I feel.
  12. MattApril 04, 2005 @ 11:49 PM
    Thanks for the good and fair comparison. Have you considered a re-write of the Java app now that the functionality is well defined and you have even had a chance to think through some approaches? With a couple of re-writes on each framework, you will essentially be solving a commodity problem. At that point, count LOC, and measure performance. Commodity problems are good for showing people good solutions to some types of problems. Think square rigs versus steamships. You might still not have a good answer for which framework offers a better solution for rapid prototyping , but the performance and abstraction efficiency would be pretty clear. MAS
  13. GeorgeApril 05, 2005 @ 01:45 AM
    If you tested performance on Sun VM you need to specify the -server switch. This is a HUGE mistake often made by newbie benchmarkers. The server VM is much faster than the default client VM. Have a look at http://www.shudo.net/jit/perf/ the Java client VM is much slower than the server VM. C# is slower. I haven't worked with the Mac JVM but I don't think this is representative as most Java server apps run on Linux.
  14. ZsoltApril 05, 2005 @ 02:26 AM
    I would like to know what kind of crack is your mac smoking…. I did a quick test on my 1.25GHz iBook, I have the latest lighttpd with the latest rails installed. These are the steps that I took: 1. rails test to generate the "test" skeleton app 2. cd test and script/generate controller simple index 3. set up lighttpd fastcgi with RAILS_ENV = ‘production� and start 4. run the apache benchmark utility (comes with apache) ab -n 1000 http://127.0.0.1:8080/simple/index It results in (average of 3 runs) 25 requests/s and this just returns a static html result, no db or template manipulation involved. This is baseline Rails performance in production mode. To test baseline lighttpd performance I benchmarked the 404.html in the public dir of the rails app: ab -n 10000 http://127.0.0.1:8080/404.html It results in (average of 3 runs) 1750 requests/s Is a 1.5 GHz Powerbook really 3 times faster in Rails performance than a 1.25 Ghz iBook G4?? Perhaps other mac user could perform this simple benchmark and report their numbers?
  15. Justin GehtlandApril 05, 2005 @ 02:30 AM
    I'd like to see other people's numbers as well, but I assure you, our numbers come from the same place, I used ab to do my testing as well.
  16. ZsoltApril 05, 2005 @ 02:40 AM
    The lighttpd results on the iBook are comparable with the results you got on your powerbook for cached static pages. So I think the performance difference matches the difference in clock speed. But the Ruby performance is at least 3 times slower... I recompiled and reinstalled the ruby-fastcgi C bindings just to be sure, but got the same result. I switched to the DRb session store, this improved performance significantly, the simple controller executed 40 req/s. But stil, the performance difference is too large. I will do the same test on a Linux machine, if people are interested I can publish the results here.
  17. Justin GehtlandApril 05, 2005 @ 02:49 AM
    Zsolt -- Sure, I think that would be great. Tomorrow, I'll do the bare-bones test you did and post the results as well.
  18. Justin GehtlandApril 05, 2005 @ 03:16 AM
    Hey Zsolt -- I'm too brain dead at this late hour to have figured out the difference problem. Those numbers were for 100 runs with a pre-existing cache of the page, and without it. The 100 runs without it just average in one run without the cache involved. So, overall, the non-cached-at-all would be way slower (down around the 25/s). I was just trying to show the difference the cache makes for Rails. Now that I've figured that out, I have to get to bed. If it wasn't so late, I'd have figured out your question a lot sooner. Sorry for the confusion!
  19. LyndonApril 05, 2005 @ 03:43 AM
    Why is this meme being Groundhogged all over again? ROR is a competitor of PHP's, not J2EE. Ruby is a higher level language than java, so why is it surprising LOC are greater in the java app? Write the same thing in C and see the line count compared to java. I've got a J2EE webapp that lets you specify a complete app in an XML file, it include template engine, statemachine for page flow, Rhino JS for logic and automatic ResultSet to XML conversion, I bet its more RAD than ROR but is that a fair comparision?
  20. red_rainApril 05, 2005 @ 03:50 AM
    Performance of Java on the Mac is not that great, unfortunately. Apple hasn't gone through the hassles of porting the Sun HotSpot Server VM to OS X. And that VM *can* make a big difference, depending on your code. On a couple of benchmarks, an old dual 300MHz Sun Ultra 2 beat my dual 800MHz G4, the Sun running the HS server VM, the Mac Apple's port of HS client. The size difference confirms one of my biggest gripes with the Java+XML infernal couple, though.
  21. ZsoltApril 05, 2005 @ 04:00 AM
    So this means that in the 100 requests in the without pre-existing cache scenario, the first request the rails stack generates the cache file and the remaining 99 requests are served by lighttpd? If this is the case, then I don't need to throw away my iBook :)
  22. ZsoltApril 05, 2005 @ 04:18 AM
    Just to add a note about caching, I think many applications benefit from the kind of static caching Rails employs, but there are some that don't benefit at all, like any app that needs to personalize the pages for the current user. What would be an ideal solution (employed by oscache in it's jsp tags for example) is to cache the personalized pages per user, either putting the key in the user's session or some other methods. It should be doable in Rails perhaps by extending the fragment caching to take into consideration the current user session. ps. sorry for spamming your blog :)
  23. Dave GriffithsApril 05, 2005 @ 04:19 AM
    Hi, did you "warm up" the Java server to make sure all the required methods were JIT-compiled? Java servers are always slow at first because the JVM typically interprets methods the first few hundred times they are called (and interpretation will put it on a par with Ruby). Then when those methods hit the threshold you have the overhead of JIT-compilation (which can be slow). I'm not sure what the equivalent on Sun's JVM is, but on IBM's JVM you should try setting IBM_MIXED_MODE_THRESHOLD=0 and then doing one walk through to get everything JIT-compiled before doing your real test.
  24. TomApril 05, 2005 @ 07:55 AM
    Your article inspired me to start reading about Ruby and I'm a bit two fold on it. For one, I like writing consise code and inner classes are frustrating me tremendously. But there is this thing were consise is getting a bit too consise. In the little code sniplets in the docu it looks all nice, but when writing a big if expression I love the { in Java which syncs me back (no, I do not adhere to the Sun style). The same goes for ;, for some reason I like terminators ;-) And a similar argument goes for conditions behind the statement, I know it sound a lot like a natural language, but a great candidate for overlooking, especially if the line is just a tad longer. Fortunately these features do not need to be used and as a whole I must say I like Ruby, but I think I will be more in the Groovy camp. Thanks for the comparison.
  25. TomApril 05, 2005 @ 07:59 AM
    Oh, one addition: what I really really liked is the $ @ and @@ prefixes. I've been using l, i, and c in a.o. Java for ages to denote scope. I really don't understand why people are prefixing their variables with types (Hungarian notation), especially in OO languages where each object is a type.
  26. GeorgeApril 05, 2005 @ 09:25 AM
    Somebody needs to rerun these tests on Linux, Solaris 10 or Windows where Sun's server VM can be used. The client VM you are using is very slow compared to the server JVM. Too many people are jumping to conclusions about a 15% performance gap between Ruby and Java. It is more than likely that this will be reversed using the 1.5 Server VM. Something is to try is to test with JRockit (BEA's JDK) http://commerce.bea.com/products/weblogicjrockit/5.0/jr_50.jsp BTW setting the compile threshold for the Java JIT to zero doesn't gain you anything, in fact it may slow you down as the optimizer has less time to profile your code before compiling it into native code. For the record you can compile everything on startup on Sun VMs using -Xcomp (not particularly useful though). If you want to tweak the Sun VM rather use -XX:+AggressiveHeap. As I said earlier you need to use the -server switch as the first argument (pity this is not available on Mac).
  27. Justin GehtlandApril 05, 2005 @ 09:47 AM
    As noted in a post I made yesterday, I'll be re-running the tests in Resin on this Mac, but also in Resin on Windows, and posting the results. I expect that the Java version will come out faster in both cases. That doesn't detract from my original point, which was : hey, wow, Rails is plenty fast enough for me! But, for the sake of thoroughness, I'll post the new numbers when I have them. Hopefully, Lyndon won't be offended. :)
  28. ZsoltApril 05, 2005 @ 11:40 AM
    I would like to see the numbers when you totally disable caching on both apps. So far I have mostly seen a lighttpd - full Java stack comparison. We want to see the baseline performance :)
  29. Justin GehtlandApril 05, 2005 @ 11:50 AM
    Zsolt -- yeah, the reason I haven't run that comparison yet is it is so hard to find all the different places that caching exists in the Java stack that turning it all off is a tedious chore. That's why I ran the numbers I did. If I can find the time to try it your way, I will, as I agree it would be useful. However, the "first walk" comparison in the article is close, since I never revisit any page and therefore never invoke any of the output caching.
  30. KrisApril 05, 2005 @ 01:31 PM
    Will you be making the source open?
  31. aaaApril 05, 2005 @ 01:56 PM
    this time give line counts for java also "excluding getters setters"
  32. Justin GehtlandApril 05, 2005 @ 02:49 PM
    Sure -- Java LOC without accessors: 3033 Kris -- no, I can't make it open source. I'd be more than happy to, but as I said, this is a proprietary app for a paying customer. If somebody really wants to go do a Rails Petstore, I'd be happy to contribute, though.
  33. Keith DonaldApril 05, 2005 @ 06:26 PM
    It's a bit of a pity you chose to do this for a "closed source" project. I think we all would be much better served had your efforts been opened up for all to see and critique and learn from. For example, I imagine at least some portion the differences in LoC came about due to fundamental differences in architecture between the two versions of the app, and not soley because one version was Ruby and another was Java.
  34. Justin GehtlandApril 05, 2005 @ 06:35 PM
    I agree -- I wish it were otherwise too, or that I had set out to do this in the first place, in which case all of this could have been done better. Ad I've said, if someone wants to organize a Petstore, I'm all in.
  35. ZsoltApril 06, 2005 @ 01:24 AM
    I am starting to see a pattern here.... In the other LoC war, Tadalist is closed source, Blablalist is open source... Justin's applications are both closed source. There are no objective ways to decide who is right when the claims are made on a closed source app.
  36. ParadoxApril 06, 2005 @ 08:25 PM
    I can't believe people are saying they should revise Java linecounts to excluse getters and setters. Ruby's getters and setters are included where applicable. Why should Java get special treatment? I have a TextMate macro to automate getter and setter generation, so I don't have to write the code. Does that mean I can now exclude those from linecounts? I don't think so. Every line of code we generate or write needs to be maintained. You're allready getting Hibernate directives excluded because they're in comments which is a bonus.
  37. Geert BevinApril 08, 2005 @ 09:22 AM
    I did some number crunching on Java alone, just for fun: http://rifers.org/blogs/gbevin/2005/4/8/myth_java_cant_scale_down
  38. AnonymousJune 15, 2005 @ 04:24 PM
    Justin -- Thanks for taking the time to do this, and write it up for the public. Please ignore the people saying you should have done it this way or that way. Some of us recognize your work for what it is: a volunteer's effort to inform the community using lessons learned on a paid project. Plus, I don't see any of the detractors offering to pay you to build an open Rails petstore. :-)
  39. MattAugust 19, 2005 @ 05:04 PM
    Zsolt, I got almost identical results on my 1.3Ghz iBook, with both Lighttp and Apache2 FastCGI. Around 25req/sec for the most basic page with no DB access and without even using a template/view. Turning on action caching didn't help much, and whole page caching isn't an option due to dynamic/personalised content in all our main templates. Frankly I'm appalled at this performance, and have to wonder where in Rails the bottleneck is. I really love using Rails but I'm now starting to get very nervous about its scalability - I want to deploy it for a fairly high-load website. Currently we manage fine with PHP on a single server, but with Rails it looks like we're going to need a whole cluster to acheive the same performance - not good! Does anyone have any Rails performance tips? What FastCGI settings should I use? Has anyone actually taken a profiler to the framework?
  40. btyeungSeptember 10, 2005 @ 01:11 AM
    Thanks for doing this writeup. I found it informative and will agree that there are many factors in improving performance. It appears that you are open to considering multiple factors and I think the majority of the audience appreciates that.
  41. Tom LOctober 10, 2005 @ 12:56 PM
    What about resource counters aside from response time? Memory used/CPU used/etc? I think those would be interesting. Are both apps actually saturating the boxes in your tests? Also, and this is probably outside the scope of what you're doing, perhaps a more mainstream platform? Are the performance characteristics different on an x86 OS (Linux or Windows)? I see other posts from people about various JVMs and app servers... I assume those things are all factors that could affect performance. For me personally, it's also nice to know that with Java you're working in an environment where you have a lot of choice in terms of app servers, platforms, and JVMs if you're running into problems. Do you feel there is an equivalent environment with RoR? If FastCGI looks like a bottleneck, do you have a lot of other options? This is all great stuff - very helpful. Thank you for what you've done already.
  42. [...] ntion argues about performance/development time comparison of frameworks. Here’s the performance comparison between JAVA and RoR. In the article, he says that implementation [...]
  43. [...] « Java libraries Ruby thoughts When I first read YARJC: Yet another Rails vs. Java Comparison , my initial thought was: “Darn, all that Java knowled [...]
  44. Eric KramerJanuary 30, 2006 @ 01:56 AM
    Nice job on the benchmarking. I personally find your "developer's impressions" of RoR vs. the J2EE approach valuable. I think that's what you wanted us all to get out of this anyway. Thanks again.
  45. Benjamin FrancisoudApril 06, 2006 @ 01:20 AM
    Since you change your blog look, this article is unreadable :( Can you do something please ?
  46. Melody Conditioning CompressorMay 01, 2006 @ 05:33 PM
    I use Firefox in Ubuntu :(
  47. Doggy Hard StyleMay 11, 2006 @ 10:46 AM
    I'm working...
  48. Studiare EsamiMay 17, 2006 @ 01:02 PM
    There is some strange behaviour with this :(
  49. Engagement De Fable EffexorMay 17, 2006 @ 03:11 PM
    Thanks for taking the time to do it :(
  50. mosiakogaApril 25, 2007 @ 12:21 AM
  51. mixylooxApril 26, 2007 @ 09:25 AM
  52. almenOnApril 27, 2007 @ 06:32 AM

    ???

  53. mixtreeApril 27, 2007 @ 09:19 PM

    Busty Brunette Mature[/url] Babe Eve Angel In The Shower Showing Off Her Pussy[/url] Amateur Plays With Her Gigantic Knockers[/url] Jap Threesome Action From Ai Sawaki[/url] Tart Blowjob Action[/url] American Girl Giving Head To Stranger[/url] 18yearold Teen Fucking And Getting Pussy Creampie[/url] Celebrity Angelina Jolie In Sexy Hot Lesbian[/url] alison posing in tiny shorts[/url] Pussy Latina Satisfying American Stud[/url]

    [url=http://superdiosas-com-h6tf3lqgri.blogspot.com]superdiosas-com/urlmaturehit-com/urlgigavids-com/urljasara-com/urlshavedgoat-com/urldevil-galleries-com/urlpicpost-com/urldoctorbootygood-com/urlwetcircle-com/urlsearchgalleries-com/urldigitalmpegs-com/urlpinkpornstars-com/urlcoedcherry-com[/url]

  54. mixtroooApril 27, 2007 @ 10:44 PM

    Guys And A Chick In Passionate Threesome Action[/url] Ladies In Hard Action With Guy[/url] Amateur Teen Twins Having 3Some Sex Action[/url] Cutie Mika Tan Gets Her Ass Licked And Fucked Hard[/url] Bride Deep Anal Fucked[/url] Shemale In Feather Outfit Shows Her Big Round Ass[/url] Lane Gorgeous Teen Secretary Gets Deep Anal Fucked[/url] Babe In A Fishnet Body Stocking[/url] In A Double Anal Gangbang With Four Huge Black Cocks[/url] Blonde Shemale Nude Posing[/url]

    [url=http://sexnemo-com-mocgf7.blogspot.com]sexnemo-com/urlsearchvids-com/urlvoyeurzine-com/urlbigtitpatrol-com/urltoons-fuck-com/urlfat-tgp-com/urlmadthumbs-com/urlredway-org/urlbeavermovies-com/urlbigtitsfans

    -com/urlallsitesaccess-com/urlteentera-com/urlebonyblack-net/urlgigavids-com[/url]

  55. HelloWorldApril 28, 2007 @ 10:26 AM

    Peace people

    We love you