Support configurable heap size for ES