Activity
Are there any downsides to using load_async on everything if we know for a fact that we’ll be using the data during the request? It seems like a no-brainer if we can keep db connections in check?
Posted in Tuning Ruby for development
Posted in Tuning Ruby for development
Basically, I'm ok sacrificing ram for speed.
Here's what I have:
# Compile Ruby with jemalloc.https://www.levups.com/en/blog/2017/optimize_ruby_memory_usage_jemalloc_heroku_scalingo.html
export RUBY_CONFIGURE_OPTS="--with-jemalloc --with-openssl-dir=/usr/local/opt/openssl"
export CONFIGURE_OPTS="--with-jemalloc --with-openssl-dir=/usr/local/opt/openssl"Tune GC.
export RUBY_GC_HEAP_INIT_SLOTS=1000000 # 1M
export RUBY_GC_HEAP_FREE_SLOTS=500000 # 0.5M
export RUBY_GC_HEAP_GROWTH_FACTOR=1.1
export RUBY_GC_HEAP_GROWTH_MAX_SLOTS=10000000 # 10M
export RUBY_GC_MALLOC_LIMIT_MAX=1000000000 # 1G
export RUBY_GC_MALLOC_LIMIT_GROWTH_FACTOR=1.1