Tuning memory usage for production