Passenger 5 compared to unicorn / thin / puma / etc.

I was looking for performance tests for the new passenger 5, when I read here , it became faster.

I tried to find other sources confirming this, but no luck. Has anyone tried to install it and see the difference?

Thanks,

+7
ruby ruby-on-rails nginx passenger
source share
4 answers

Passenger 5 is better judged by the selected criteria, because it has a built-in level of caching ("turbocaching"), which can avoid actually running your application code for identical requests in a short period of time; this will not cause your actual application code to run faster. This level of caching is active only in certain situations with limited access and is unlikely to bring much benefit in the vast majority of real cases. If you are not careful, the caching level may actually break your application - I have demonstrated some security because of the caching layer in Phusion during the 5 beta phase (which they fixed due to the fact that the cache level was not almost the same in the cache same). IMO, Raptor / Passenger 5 tests are deceptive marketing fuzz, and the caching level exists primarily to win Hello World tests, and you probably should just ignore them.

However, the speed of your application server is practically slow at the scale of your overall application performance . Passenger is a great platform because it is extremely convenient, well-documented, has an absolutely fantastic installer and handles a lot of annoying shit for you out of the box. You must use Passenger if you need the functionality that it provides and do not want to spin a ton of configuration content. If this is not suitable for your use case, use something else that does.

If every last microsecond interests you, you should measure the performance of your application under different web servers and different workloads, and then choose the one that works best. Otherwise, use what you like best, and then switch as soon as performance becomes a real problem.

Footnote: If you are using Passenger 5, be sure to read the article on Turbocaching security changes to make sure that you did not accidentally make your application vulnerable to stealing user data (or otherwise introduce errors) through the turbo pumping level.

+21
source share

I recently migrated my application from Puma to Passenger. I have to say that I am really pleased with this move, especially since I accept it at Heroku.

Since I upgraded to Ruby 2.2, I had memory problems with Puma due to Heroku (512M) memory limit. I tried a couple of different configurations, but to no avail. Since I switched to Passenger, I saw that memory usage was reduced to almost half what I consumed with Puma with the same number of server instances (3 in my case).

As for the response time, it seems to be pretty much the same as before, but with these memory improvements. Although, I reduced the number of Heroku speakers to handle the same number of requests.

In conclusion, in my personal experience, Passenger helped me significantly reduce the memory used by the application, but it did not help improve the average response time. Another good point about Heroku pricing is that it helped me significantly reduce the cost of my hosting.

I know this post is not comprehensive, without any tests, etc. But I thought that maybe you will be interested to know about the transition from Puma to passenger.

Hope this helps :)

+11
source share

First of all, let's just be clear when we talk about server performance, the question is how well the server scales as usage grows. If your server has one or more users, for most applications you will get the same end-user experience, no matter which server you use, because the bottleneck will be the performance of Ruby, not the application server.


For medium and large applications:

So let's talk about scaling. The more power and processor power you have, the more you can scale. Most servers are faster than the processor. Thus, the key is to minimize the amount of RAM used for each request. Each request that the server receives will be processed by a process or thread. Processes use a lot of RAM, threads use very little RAM. Therefore, the goal is to have many threads and multiple processes.

Puma and Passenger Enterprise are multi-threaded servers that will scale approximately the same. (Passenger guidelines say that each process requires 5 MB less RAM, but this is insignificant.) The passenger (free version) itself is single-threaded and will not be , as well as a paid version of Passenger Enterprise or like Puma.

So, if you want maximum performance, you choose between Puma and Passenger Enterprise. The question then becomes whether Passenger Enterprise is a cost of financial costs, and Puma is worth the cost of technical expertise. The answer depends on what is in your brain (s), what is in your bank account (s) and your total opportunity cost.

The passenger company has several useful tools that hold your hand if you are not an expert system administrator. Puma also has some tools, but they are not as strong as Passenger Enterprise provides. Puma requires system-level expertise if you want the same control and understanding that Passenger Enterprise does. (You can also use Puma without all the bells and whistle of the Passenger Company, but I want to keep this apples-to-apples comparison).

Personally, I am a low-level guy who likes to set up servers, so I prefer to trade my time rather than my money for an awesome Ruby server. Therefore, I use Puma. If you are not interested in setting up low-level materials (or if you are a company that sells software licenses, cheaper than development administrators), it may be more profitable for you to pay a Passenger Enterprise license.


For a guy who works with a $ 5 VPS (or a similar low-level, low-traffic environment):

What I said above is more for applications with higher traffic on servers with significant resources. You are just trying to get by with the basics, so this really does not apply to you.

Think of Puma and the passenger company as giant planes that can move a lot of people very quickly. Thus, you need more than your small application. You really need a server equivalent to the Honda Civic. To do this, you should consider either the free version of Passenger or Thin. Use a free passenger if you need easy setup and decent tools. Use thin ones if you want to get the same performance, but want to design a server.

In this case, I see no reason to use anything other than a free Passenger if you are not looking for a call.

+3
source share

As others have said, passenger alone does not make your application faster. The passenger himself has become much faster in version 5, but the application server is only part of the response time. If your application is slow, it does not matter how fast the Passenger is.

Having said that, Passenger distinguishes itself from other application servers by actively helping you speed up your application . A passenger turbocomputer is one of the ways a passenger helps you. In the article, a fast static dynamic site with Raptor demonstrates a good use case for a turbo tank. The Passenger also provides an optimization guide that provides tips for optimizing your application using Passenger settings.

+1
source share

All Articles