Skip to main content
Ask A Question
Youโ€™re not receiving notifications from this thread.

How do I take advantage of multiple CPUs on a DigitalOcean droplets?

Servers โ€ข Asked by Karim Tarek

Hello ๐Ÿ‘‹

I've a two Rails apps hosted on a droplet that has multiple CPUs.
Honstly I don't know what does that mean for the app and if I need to do any thing to take advantage of that or does Rails already does that? Please advice ๐Ÿ˜Š

Thanks โ˜ฎ๏ธ

Basically, you specify that your rails app run "8 processes" at once and each will use one core. The way it can be done is by using phusion passenger (with Nginx) and set the following parameters
passenger_max_pool_size 8;
passenger_max_instances_per_app 8;

That should keep however many cores you have busy :)

Thanks @James, any idea how to set those params if I deploy using Hatch?
I guess I'm gonna have to SSH, so where should I put those?

@karim I don't know anything about hatch, I just use straight servers without the bells/whistles. But the configuration declarative should go in your nginx host block.

Thanks @James, it looks like I'm gonna have to do some digging then :)
I really appreciate your feedback.

For more info, check this out Passenger/Nginx reference

Login or Create An Account to join the conversation.

Subscribe to the newsletter

Join 30,005+ developers who get early access to new screencasts, articles, guides, updates, and more.

    By clicking this button, you agree to the GoRails Terms of Service and Privacy Policy.

    More of a social being? We're also on Twitter and YouTube.