Performance and cost optimization of multi-tenant in-memory database clusters