Reputation: 2934
Would it make a difference versus the single core into terms of performance in Ruby on rails app
and if i have multi-core how i manage rails through multi-core
if multi-core processor same idea of distributed servers
Upvotes: 1
Views: 2452
Reputation: 192
Basically, you specify that your rails app run "8 processes" at once and each will use one core. The way I do it is by using phusion passenger [in my case, with nginx] and you may get it to work like
passenger_max_pool_size 8
passenger_max_instances_per_app 8
If you want to make sure your cores are all busy [and have enough RAM] then possibly set them to size 16'ish
Upvotes: 2
Reputation: 2463
Multicore servers only boost performance if the rails app is running in multithreaded mode of in multiprocess mode. Ruby currently supports 'green' threads, which are lightweight and not true processor threads. Rails has support for multithreading, but gem support could be lacking and would probably be unstable for production. To make the best use of a multicore server, running a web server like unicorn or passenger, which can spawn rails processes per core, would provide you the best performance boost
Upvotes: -1