Saturday, November 22, 2008

Glassfish is looking speedy

Let me start by saying that most benchmarks should be taken with a grain of salt, so please do the same here.

I work on Project Laika, and for our deployments we are looking to switch to JRuby. We already have java code hanging around, and it looks like we will need some more soon (I'm thinking it will be easier to deal with SOAP web services in java and calling the classes from JRuby). I wanted to run some numbers to make sure that our performance wouldn't fall through the floor.

The Setup

I decided to pit Mongrel 1.1.5 running on MRI 1.8.6 against Glassfish v3 Prelude 1 and JRuby 1.1.5 on Java 5. I'm running Rails 2.0.2 in both setups (I know we are behind the times). I ran them both on OS X 10.5.5 and had the Rails apps hit the same MySQL database.

I used ab to grab the numbers. I had it hit the site 1000 times with 10 concurrent requests. I hacked the Laika app slightly so that you didn't have to log in.

The Test

I wanted to get a feel for how the app would perform, so I did two simple tests: dynamic content from a typical page and static content. The dynamic content was the patient template library in Laika which contains code that you'd expect in a Rails app: AR pulling info from the DB and putting it into ERB templates. I also pulled down the Rails 404 page to get a feel for serving static content. This is probably less meaningful, as you'll probably have Apache or Nginx serve up your static stuff.

The Results

Glassfish, hands down. The results are the average number of milliseconds it took to serve each request.


It beat Mongrel in both static and dynamic content easily. Glassfish v3 also makes it ridiculously easy to deploy Rails apps. You can use the Glassfish gem, and serve up your app with a single command. I installed the Glassfish server, so I could run JEE apps alongside my Rails stuff, there is a single command where you point the app server to the root directory of your app and you're done.

With Rails 2.2 now out and offering thread safety, and JRuby being the only interperter that can take advantage of it... Glassfish and JRuby are really worth checking out.

27 comments:

Unknown said...

I merely have a glimpse here and appear nice to appear out this world wide world wide journal. flush content writing hand and extremely cooperative web location bad credit payday loans. i might like most of we've got got got a bent to tend to tend to tend to tend to organization neck of the woods unit to undertake to travel seeking out these diversity of things, here we've got got got a bent to tend to tend to tend to unit able to observe everything. I’m with the content standing associate degreed do deference him as associate honest provider. Thanks for your work and you too.

marko said...

Nonetheless, online payday advance is the most well known as the credit has the idea of snappiness and rapid. Loan payday advances are of incredible use if there should be an occurrence of direness.check cashing corona

marko said...

You can even track alterations in rates thusly. There are loads of tips on the most proficient method to realize what different dealers are the same number of as. Yippee and google are perfect for this procedure. Chek out their encourages and you will have the capacity to check whether they redesign. payday loans

marko said...

The magnificence of 1500 Loans is that any terrible credit individuals are permitted to appreciate taking such sort of advance. This advance is not including the credit confirmation process. One additionally thing is that you have alternative to get brisk stores through these credits without vowing any security. cash advance loans

marko said...

On normal, a client will pay $30 per $100 advance. On the off chance that you are taking a gander at a bank overdraft charge of $35 or a late Visa installment expense of comparative worth, then you could secure your ledger with $200 loan for less cash. On the off chance that you are one who piles on various bank or leaser expenses, the reserve funds is monstrous. cash advance

Unknown said...

In the event that you have to acquire cash yet have poor credit, don't lose hope. A great many people can fit the bill for some kind of individual credit paying little heed shockingly history. Realize where to search for an individual credit, and what financing alternatives are accessible on the off chance that you have sub prime credit. chicago auto title loans online

marko said...

A major piece of the battle to pay down obligation is to keep new obligation from collecting somewhere else. The individuals who utilization Mastercards may concentrate on paying irregular yet utilize a second card to keep up somewhere else. payday loans

MUSA77 said...

In the event that an individual was gone on to court because of the defaulted improvement, the middle expense of harms owed was well more than 3 times the beginning credit total. Between tenet fairness, charges, intrigue and court costs, a transient credit twisted up being truly stinging. Cash Advance San-diego

Unknown said...

Along these lines, there will be no amazements with regards to paying back your credit without bothers. Keep in mind that numerous individuals utilizing vehicle title credits are doing this if all else fails or as a transient answer for getting fast money, and you absolutely would prefer not to get included with any budgetary loan specialist who could exploit your monetary circumstance. You ought to dependably look for the administrations of different experts for lawful, record and assessment guidance before you sign anything. Auto Title Loans Chicago

JON said...

Like other transient advances, the title characteristics too are liberal inferable from the higher interest rate. Title credits fulfill passing needs. Right away at this very moment gets hold of points of interest, he pays the title progress and recovers the title to his auto. Cash Advance San-diego

Unknown said...

I got the fax numbers to my payday credit affiliations and sent them see on who to contact concerning the reimbursement of my advances. On the off chance that you do this make a point to join your record number and sorted out endeavor trusts number so they can fittingly find your record. Payday Loans

Unknown said...

The credit supplier holds the title to the vehicle and not the vehicle itself. The borrower in like way has the opportunity to utilize the vehicle in the way he picks, if tries are made never-endingly to keep the vehicle in mind blowing condition. www.usacheckcashingstore.com/san-diego

Unknown said...

Regardless, be right with the eager handle, your wonderful position mass is not by any office the alone mass envolved in your application. Coffer costs, charges,search costs, accreditation, opening making prepared to now and warrantees affirmation to other than be tended to. clearly, thats change stock all together. Cash Advance

Unknown said...

Change - No one brand change. Changing jobs is admired as one of the added demanding activity events. If you are already fatigued abundant by the weight of your debts again the aftermost affair you charge is added accent of starting a new job and aggravating to band with new assignment colleagues.
www.usapaydayloanstore.com/chicago

Unknown said...

A address by the Customer Focus babysitter group, claims that the cardinal of bodies demography out Payday Loans has added by 400 per cent over the aftermost 4 years. It is estimated that £1.2 billion is adopted anniversary year now, with 1.2 actor bodies demography an boilerplate of 3.5 loans per year, with anniversary accommodation about £300. This is a amazing growth, decidedly back absorption ante on this blazon of borrowing ambit amid 2 and 5000 per cent.
online cash advance in fresno ca

Unknown said...

Abstract: Banks are in the business of lending to risky and hard-to-value businesses. This
paper show that both the price and non-price terms of bank loans reflect observable
components of borrower risk. As expected, riskier borrowers-smaller borrowers, borrowers ...
Payday Loans

jhon said...

Your accommodation deposits and deductions are automated - depending on the time your loans are approved, the bulk loaned can be deposited to your annual on the aforementioned day or aural 24 hours. Monthly deductions for payments too.
payday loans

Unknown said...

These fees may accommodate but are not bound to processing fees and/or a collapsed costs charge. Accomplish abiding you are acquainted of all added accuse complex afore entering an acceding with the lender.
check cashing near me

Unknown said...

After you have fully and truthfully answered all of the questions on the application a determination will be made regarding the approval or denial for the loan. Different companies rely on different systems when researching applicants. Reasons for denial may include the following.
Check Cashing Corona

Justin said...

Searching for some essential cash administration counsel? Yet, before that, asking why is it vital to deal with one's cash? Essentially, dealing with your cash fastidiously can prompt obligation help and money related opportunity. Payday Loans

Paulo said...

It might appear like an incomprehensible assignment since banks have tight loaning criteria contrasted with other financing sources, however there is a little trap to getting a credit from a bank. cash advance carson

Paulo said...

Likewise, the financier who guarantees low shutting expenses will most likely be profiting on a higher rate, and he'll likely attempt to offer you on marking down that higher rate, by paying a rate of the advance sum. This is a typical strategy bank credit officers use, and it is an exceptionally poor system in practically every case for you to purchase a rate. Cash Advance

Paulo said...

The reason is on the grounds that the proprietor has no insurance from repossession and for the most part cannot pay the high cost of getting the home returned. Trailer abandonment is diverse in light of the fact that the loan specialist will give you time or make installment plans with you. check cashing

Robbert said...

The Mitsubishi L200 is an extraordinary Japan truck (minimal pickup truck). Style, trustworthiness, solace and extraordinary energy to force overwhelming weights are the attractions of this Japan. Mitsubishi L200 is still extremely mainstream since its dispatch on 1978. cash advance

Robbert said...

Merchants need to take into consideration repairing the auto and exchanging it at a benefit, if it's even a sufficient auto to trouble with. It is a great deal more normal for merchants just to foist these autos off on wholesalers and let them bother with it all. This is not the path for a private gathering to get the greatest moolah for his utilized auto. check cashing chula-vista

Robbert said...

Choose the best place to store the vehicle. Keep in mind, this is the place the auto will sit for a drawn out stretch of time. Contingent on what will be finished with the vehicle; there are distinctive sorts of storerooms. For somewhere in the range of, an individual carport will be adequate for keeping in a workable area.check cashing

Alex daina said...

Along these lines you will likewise know precisely what sum you have to pay back to the payday credit organizations. Payday Loans