Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More puma tuning #24781

Merged
merged 1 commit into from Sep 13, 2018
Merged

More puma tuning #24781

merged 1 commit into from Sep 13, 2018

Conversation

wjordan
Copy link
Contributor

@wjordan wjordan commented Sep 13, 2018

This set of tuning changes brings Puma's performance and memory-usage even with Unicorn on our production workload.

  • Use nakayoshi_fork to reduce copy-on-write memory usage
  • Adjust jemalloc tuning parameters for lower memory usage (use 2 arenas instead of one per cpu)
  • Reduce Puma threads-per-worker to 5
    • (I might experiment with higher values in the future, but for now 5 seems to be a stable setting.)
  • Use Puma fork for more stable request balancing and out-of-band GC

I tested out these changes on a single production server over the past 12 hours and the average request latency was indistinguishable from other Unicorn-based frontends, while the memory usage was equal or slightly better.

This PR still does not change the cdo-apps Chef attributes to use puma by default, that will be done in a separate PR.

- Use nakayoshi_fork to reduce copy-on-write memory usage
- Adjust jemalloc tuning parameters for lower memory usage
- reduce threads per worker to 5
- Use Puma fork for more stable request balancing and out-of-band GC
@wjordan wjordan merged commit 9dcee2e into staging Sep 13, 2018
@wjordan wjordan deleted the puma_updates branch September 13, 2018 20:26
Hamms added a commit that referenced this pull request Mar 21, 2023
…ly are using

Turns out, #24781 added some not-unicorn-specific uses of gctools, which means we probably are actually using it and don't want to merge this branch. Doing so in this commit anyway just to see
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants