How to tweak the memory usage.