Hello ,i have a operator question. We want to achi...
# troubleshooting
u
Hello ,i have a operator question. We want to achieve cost savings by overselling memory, so we set
kubernetes.taskmanager.memory.limit-factor:2.0
But
taskmanager.memory.process.size
is set to
spec.taskManager.resource.memory
. When
spec.taskManager.resource.memory=2gi
, the Pod Physical Memory is 4.00 GB, but because
taskmanager.memory.process.size
is also 2gi ,This results in the maximum memory space that users can use always being 2gi.How to configure it so that users can use 4gi memory?
Copy code
private void setResource(Resource resource, Configuration effectiveConfig, boolean isJM) {
        if (resource != null) {
            var memoryConfigOption =
                    isJM
                            ? JobManagerOptions.TOTAL_PROCESS_MEMORY
                            : TaskManagerOptions.TOTAL_PROCESS_MEMORY;
            if (resource.getMemory() != null) {
                effectiveConfig.setString(
                        memoryConfigOption.key(), parseResourceMemoryString(resource.getMemory()));
            }

            configureCpu(resource, effectiveConfig, isJM);
        }
    }