I have an existing ruby on rails (2.3.5) web application working on my company's intranet (around total 5000 users, and 50 concurrent users) deployed on AIX box. Mongrel server is being used to serve requests. Application is not that complex. Normal pages require 3-4 seconds of database operations and 2-3 seconds for view rendering. Now, we have requirement to release AIX box, and move to system having websphere 7 installed. By policy, we can't install two servers on same machine. So we will have to deploy our app on Websphere 7 (which already has around 10 java applications hosted). We have converted our rails app to WAR using warbler and able to deploy it to Websphere 7. Following are our concerns regarding its performance and scalability. 1. First, request to serve web page takes too much time. I guess thats because of JVM loading. Can we decrease this time? 2. We have enabled threadsafe mode by enabling this line in production.rb. config.threadsafe! Is this enough to serve the purpose of handling concurrent web requests. How many concurrent requests would it handle. 3. If we have config.threadsafe! enabled, will there be any effect of changing these lines in warble.rb # config.webxml.jruby.min.runtimes = 2 # config.webxml.jruby.max.runtimes = 4 4. Initial heap size and maximum heap size is set to 256 and 1792. And this websphere instance is also hosting around 10 other web applications. Would this be enough for our jruby application. Unfortunately, we are not allowed to change this value. 5. What about concurrent web request handling? With these settings, is there any benchmark/stats of how many concurrent requests would be easy to handle by application. Can anyone please guide for better production deployment options/settings or other options to increase scalability. Any ideas/suggestions?
on 2012-09-06 09:22
on 2012-09-06 09:37
Muhammad F. wrote in post #1074891: > 2. We have enabled threadsafe mode by enabling this line in > production.rb. > config.threadsafe! > Is this enough to serve the purpose of handling concurrent web requests. > How many concurrent requests would it handle. Enabling this with jruby.min and max runtimes set to 1 enables making best use of the multi-cores of your server with real-threading (just ensure your code is thread-safe). For 50 concurrent users, it should work anyways. > 3. If we have config.threadsafe! enabled, will there be any effect of > changing these lines in warble.rb > > # config.webxml.jruby.min.runtimes = 2 > # config.webxml.jruby.max.runtimes = 4 With config.threadsafe! enables, suggest to use: config.webxml.jruby.min.runtimes = 1 config.webxml.jruby.max.runtimes = 1 > 5. What about concurrent web request handling? With these settings, is > there any benchmark/stats of how many concurrent requests would be easy > to handle by application. Refer my update at http://www.ruby-forum.com/topic/4405518 & http://www.ruby-forum.com/topic/3792762 for my suggestions and the kind of throughput I could achieve with specific h/w.
on 2012-09-06 13:06
On Thu, Sep 6, 2012 at 8:22 AM, Muhammad F. <lists@ruby-forum.com> wrote: > > Can anyone please guide for better production deployment > options/settings or other options to increase scalability. > > Any ideas/suggestions? > > Deploy your app to a virtual machine instance that best replicates your intended target platform. Configure the system so that it mimics the constraints of your operations team. Then profile it independently to get a feel for how it will handle real world use. You could simulate real world use by using the rails log from your old install to prepare actual data. How does the memory & cpu profile of your current app compare under load?
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.