I found some more interesting posts:
- Memory leaks in my site
- Rails memory usage case study
- bleak_house
- Finding open file descriptors: ‘lsof’ is a neat utility for listing open ports, sockets and files on a per process basis.
- The WeakRef and WeakHash.
Still I put it as following: I believe Ruby has a serious memory leak problem that is not been taken seriously. It is not even only about the memory leak. It is the GC that takes to long once the memory reaches a certain seize. Once our Application uses more then 2 GB of Memory the GC takes more then 50 secs to do its job. Then we have to do a restart of our Application because our Application should not be unresponsive for the User for 50 secs or more. PS: We got 12 GB of memory for Ruby on our server.
You can fine tune the garbage collector slightly…like turn it off and only GC when you find it ‘convenient’ — but I’d say that it needs help, too 🙂
Also you can specify (before compiling ruby) how often it runs. I left some recent thoughts on “gc.c” on the core list, but…anyway good luck!
-Roger
Also you could go to gc.c and enable “force_collect” and then do some memory management ‘on your own’ (kinda like C# unsafe or whatever it’s called). That might help.
I agree, the garbage collection needs some work.