add memory and cpu shares support