When I googled, there were some answers saying that in kubernetes, 100ms cpu means that you are going to use 1/10 time of one cpu core, and 2300ms cpu means that you are going to use 2 cores fully and 3/10 time of another cpu core. Is it correct?
I just wonder if multiple threads can run in parallel on multiple cores at the same time when using under 1000ms cpu requests in kubernetes.
Regarding first part, it's true that you can use part of CPU resource to run some tasks. In Kubernetes documentation - Managing Resources for Containers you can find information that you can specify minimal resources requirements -
requests
to run pod andlimits
which cannot be exceeded.It's well described in this article
CPU Requests/Limits:
Regarding second part, you can use multiple threads in parallel. Good example of this is Kubernetes Job.
Especially part about Parallel execution for Jobs
You can also check Parallel Processing using Expansions to run multiple
Jobs
based on a common template. You can use this approach to process batches of work in parallel. In this documentation you can find example with description how it works.