You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think the right formula to compute the number of vCPU allocated to the container is the following:
CPUFILE_QUOTA="/sys/fs/cgroup/cpu/cpu.cfs_quota_us"
CPUFILE_PERIOD="/sys/fs/cgroup/cpu/cpu.cfs_period_us"
vCPUS_CONTAINER_QUOTA=`cat $CPUFILE_QUOTA`
vCPUS_CONTAINER_PERIOD=`cat $CPUFILE_PERIOD`
###
### Set the amount of CPU's available to the docker container
###
if [[ $vCPUS_CONTAINER == "-1" ]]
then
vCPUS=$vCPUS_HOST
else
vCPUS=`echo "$vCPUS_CONTAINER_QUOTA / $vCPUS_CONTAINER_PERIOD" | bc`
fi
Could you please check?
Regards,
Renaud
The text was updated successfully, but these errors were encountered:
Hi,
I built a container with the scripts and executed it on K8S.
I have an error on vCPU computing when running on IBM K8S cluster. I give 2 CPU to the Informix container.
The value of vCPU_CONTAINER returned by the container (in the script "calculate_onconfig.sh") is 40000.
When I run the same command in a docker on my laptop (CentOS), I get the following values.
I think the right formula to compute the number of vCPU allocated to the container is the following:
Could you please check?
Regards,
Renaud
The text was updated successfully, but these errors were encountered: