5
在REE和MRI 1.9+,Ruby的垃圾收集器可以調整:Ruby內存配置在哪裏,以及如何檢查它是否被設置?
- http://www.rubyenterpriseedition.com/documentation.html#_garbage_collector_performance_tuning
- http://smartic.us/2010/10/27/tune-your-ruby-enterprise-edition-garbage-collection-settings-to-run-tests-faster/
- http://blog.evanweaver.com/articles/2009/04/09/ruby-gc-tuning/
但是,這些文章說,在那裏把這個配置。我想如果它是在環境中,ruby會在啓動時將它提取出來 - 但是,根據我的說法,無法檢查這個問題。這些設置不會顯示在我能找到的任何運行時常量中。
那麼,我在哪裏放置這個配置,我該如何仔細檢查它是否被使用?
感謝 - 但什麼關於第二個問題 - 我如何在運行時仔細檢查配置是否有效? (這真的是我的主要問題) – 2013-03-26 17:06:07
在Ruby 1.9+中,您可以使用['GC.stat'](http://ruby-doc.org/core-1.9.3/GC.html#method- c-stat)來檢查其中一些設置。還要注意REE是[報廢](http://blog.phusion.nl/2012/02/21/ruby-enterprise-edition-1-8-7-2012-02-released-end-of - 生命-迫在眉睫/) – 2013-03-26 17:11:12