While researching Unicorn configuration options I came across this snippet..
GC.respond_to?(:copy_on_write_friendly=) and
GC.copy_on_write_friendly = true
If I undertand correctly, it optimizes how Unicorn handles memory allocation and resource sharing between workers?
I use Unicorn to power my Sinatra application on server with Ruby 1.9.3. Are there any downsides to including the copy_on_write_friendly setting in my unicorn config?
That's not a configuration option, it's a Ruby code snippet that tells it to set copy_on_write_friendly if the GC object has that method. For example, in ruby mainline 1.9.2p290:
The only Ruby interpreter that supports that option to my knowledge is Ruby Enterprise Edition. There's a bit about it here: http://www.rubyenterpriseedition.com/faq.html