tickets #181643
closedSwitch Redmine to Puma
0%
Description
Currently Redmine on progress.o.o runs with Unicorn. Puma is more modern and, going by short research in online forums, might help prevent slowdown and intermittent DoS we observe with request spikes lately.
We already include Puma with our Redmine package (it was used years ago, but the changelog does not explain why it was switched back to Unicorn - whatever the reason might have been, it's probably no longer relevant nowadays, Puma seems to be a commonly used web server with Redmine nowadays), so all it should need is adjusting the service unit file and AppArmor profiles. Afterwards Unicorn can be removed from the custom Gemfile and package requirements.
Updated by crameleon 11 days ago
So whilst that worked great in my test setup, in production it is atrociously slow compared to the previous Unicorn setup. I am trying with workers 2
and threads 2
which seems to be the recommendation with 2 cores (I also tried with threads 4
which is the result of the recommended calculation when migrating from Unicorn but that seemingly just caused more load).
Updated by crameleon 11 days ago
It seems enabling preload
(https://build.opensuse.org/package/rdiff/openSUSE:infrastructure:redmine/redmine?linkrev=base&rev=85) made it better.
Updated by crameleon 11 days ago · Edited
It's quite usable now indeed, but I think about doubling the CPU cores to allow for more workers:
https://gitlab.infra.opensuse.org/infra/salt/-/merge_requests/2459
Updated by crameleon 11 days ago
Following https://puma.io/puma/file.deployment.html again and this time ignoring the "Migrating from Unicorn" section and instead following "MRI", I changed threads
to the default of 5
(upon reading further, one thread executes Ruby code at a time, so the threads limit concurrent requests, making the Unicorn calculation of 2
indeed quite limiting) via https://build.opensuse.org/package/rdiff/openSUSE:infrastructure:redmine/redmine?linkrev=base&rev=89 - this makes it much more snappy. I will still pursue the increase of cores/workers as it's a reasonably minor increase of resources giving more room for request spikes (the load can be seen to jump up every so often).
Updated by crameleon 11 days ago · Edited
- Status changed from In Progress to Resolved
Done as well: https://progress.opensuse.org/projects/opensuse-admin/repository/salt/revisions/2da01001904e665af5ff450832af5f4160d6291e (and adjusted puma.rb to automatically set worker count to CPU count).