Welcome to the Linux Foundation Forum!

How to grammatically allocate VCore to threads

Hi

Suppose I have 3 threads and I set their affinity to a single VCore. I want to be able to give thread 1 and 2 25% each of the VCore and thread 3 50%. Is that possible? I know through cgroup, it is possible to allocate fraction of VCore to processes. I want to be able to do that to threads with OS APIs. I want to avoid doing this by using sleep in threading code at application level. In a multi-tenant server side scenario, I have multiple tenants sharing a VCore. If I use cgroup with each tenant being a process, there will be too many processes. So I want manage tenant's CPU resource at thread level.

Thanks

Sign In or Register to comment.