Can activating the GC::Profiler in ruby 1.9.2 in a production environment can cause performance issue? Is it safe to use it in a performance critical production application?
Simply activating GC::Profiler
shouldn't cause a performance drop, the question is however what you plan to do with it.
Compare it with Rails.config.log_level
. If you set this too high (like :notice
), it needs to write a lot of data to the log file, causing a much higher IO than needed and thus causing performance drops. That is why the logger is set to :debug
in production, to minimize IO operations.
So if you enable GC::Profiler
and only poll specific results in edge-case scenarios then I don't believe there should be a problem, it is when you start to overuse the profiler that things can start to slow down.
but this goes for everything, from overusing database queries, to overusing complex code to overusing images, etc...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With