RunOnFlux/flux

Run docker containers with the --cpu limits

dramirezRT opened this issue · 4 comments

Hi,
I have been checking in my node and I noticed the applications aren't being limited to their specifications regarding CPUs available or CPU time.

Can you please update the starting of the containers with the application's CPU specifications?

They are limited as defined https://github.com/RunOnFlux/flux/blob/master/ZelBack/src/services/dockerService.js#L501

Is this value verified on nodes?
When I run docker ps -q | xargs docker inspect | grep -e Cpus -e Name the value for the the amount of vCPUs is not reflected i.e CpusetCpus, neither the NanoCpus value

Could it be maybe a typo of "NanoCpus" instead of "NanoCPUs" in here? https://github.com/RunOnFlux/flux/blob/master/ZelBack/src/services/dockerService.js#L501

json name is NanoCpus but in config correct is NanoCPUs
example:

docker inspect --format='{{.HostConfig.NanoCpus}}' fluxnode_PresearchNode1680205731478
300000000

moby/moby#27958

Ok, yeah you are right. I just double checked with the library too
https://docs.docker.com/engine/api/v1.37/#tag/Container/operation/ContainerCreate

I also redeployed one app and verified the data. Everything seems fine.
Sorry for the false alarm 😅