Create a gist now

Instantly share code, notes, and snippets.

@jim /
Created Aug 11, 2010

What would you like to do?
export RUBY_HEAP_MIN_SLOTS=1000000 export RUBY_HEAP_SLOTS_INCREMENT=1000000 export RUBY_HEAP_SLOTS_GROWTH_FACTOR=1 export RUBY_GC_MALLOC_LIMIT=1000000000 export RUBY_HEAP_FREE_MIN=500000; "$@"

burke commented Nov 5, 2010

Unless I'm missing some weird intricacy of how bash works, I'm pretty sure this sets those variables for any other scripts you call in your shell session too (which might be what you wanted). You could try if it isn't.


jim commented Nov 5, 2010

I'm far from a bash expert, but my understanding is that exports in scripts only affect child processes of that script, but not the parent environment. This was a surprise to me.

If I run rmem on the command line and then run env, I don't see these settings. But I can get them to 'stick' by running . rmem.

My testing has confirmed this, but I could easily have missed something about how bash works.

burke commented Nov 5, 2010

Huh, cool. I didn't know that. Thanks for the blog post! I'm still playing around with settings a bit, but I'm down from 25 minutes to about 410 seconds :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment