Inconsistent performance

Steven Grimm sgrimm at
Thu Apr 19 18:29:31 UTC 2007

Lexington Luthor wrote:
> memcached is certainly not causing your performance problem. Both java 
> and ruby have garbage collectors which can cause huge latency problems 
> particularly if every 30ms matters to you. I don't know about ruby but 
> java's GC can not be turned off in your code, so you will likely have 
> GC-related latency problems. Some VM language implementations e.g. 
> CPython will let you turn off the GC though.

On a multi-CPU machine, I'd recommend switching to Java's concurrent 
garbage collector, which in most cases basically eliminates long GC 
delays. It does cost more total CPU time than the non-concurrent 
collectors but it makes things much smoother.

What does CPython do if you turn off GC? Does the process just keep 
getting bigger and bigger until the machine runs out of memory? Python 
used reference-counting internally last I looked; if you turn off 
garbage collection, how does it ever free up objects with circular 
references? Or do you just have to be careful not to create circular 
references in that case?


More information about the memcached mailing list