Hi reHa, On Wed, Nov 12, 2008 at 9:49 PM, reHa <[EMAIL PROTECTED]> wrote: > > Some questions about disabling GC: > > * Memory consuming action - will it kill server? > > * Lets assume that one of your libraries used by the action is calling > GC.start explicitly - the library "knows" it consumes a lot of memory > and tries to free it in the right time - what will happen?
Hell, for sure those are dangerous situations. But then I guess I would know about the memory consumption of my app, or measure it in a high usage scenario. I guess this is an issue for all apps, GC running or not: If you are running some code that needs much RAM all at the same time (so even the GC kicking in couldn't help) this can already kill your server. (And I have seen ActiveRecord queries taking up up to somewhere close to 1 GByte) So you should always know what memory requirements your app has. And if you are know that and know that you are on the right side of the tracks, then, I guess, you should be fine. In our app we have quite a strict upper limit on how many objects we have to deal with, so I guess I might feel safe :) > * Very small (not memory consuming) action - won't GC.start slow it > down significantly? (it's called every time) Yes, certainly. On my developer machine a GC run takes ~200msecs, which would turn fast actions in pretty slow ones :) So I would like to have the GC run somewhere in the rails kernel - *after* the response would be sent back to the client. But that, of course, can only be done by patching rails. And of course I wouldn't run that code on all actions, only on some anyways. > These are just some random questions about "bad" scenarios. Thanks for your response. Did anyone use techniques like that before? /eno ==================================================================== A wee piece of ruby every monday: http://1rad.wordpress.com/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

