-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pinning Photon vcpu to specific cpu cores #367
Comments
photon thread will not automatically migrate to other vCPU. So you can bind the vCPU (OS thread) to specific core, for instance, using taskset or cpu affinity |
thank you and noted. as a follow up question on photon workpool. If I have a workpool of 4 vcpus, and migrate tthreads to the workpool by specifying the vcpu_num/idx to migrate to for each thread, e.g thread 1 to vcpu 1, thread 2 to vcpu 2, can i achieve the same thing? Meaning vcpu1 is always running on the same core for the duration of the workpool? |
workpool creates std::thread internally, so there is no way you can add some control into it. But you can still set cpu core affinity afterward. You can traverse each vcpu and get their pthread id, and bind to cores before your workload ever started |
Got it, thanks! |
You also have the option to create |
Hi all,
Is it possible to setup multiple Photon threads and pin them to specific cpu cores for the lifetime of the application?
The text was updated successfully, but these errors were encountered: