Skip to content
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

Use all available cores #781

Closed

Conversation

markbeierl
Copy link
Contributor

When determining what cores are available, we should use the total number from the system, not from the current process

Addresses #780

When determining what cores are available, we should
use the total number from the system, not from the
current process
@omecproject
Copy link

Can one of the admins verify this patch?

@gab-arrobo
Copy link
Collaborator

@markbeierl, have you tested the behavior of this PR when deploying multiple UPF instances in the same host?

@markbeierl
Copy link
Contributor Author

Yes, I have tested it, and repeated tests show my affinity staying at [1-15] instead of increasing with subsequent runs.

@markbeierl
Copy link
Contributor Author

Although, to note, we have no method of controlling the UPFs affinity when there is more than one on the physical host, so they both fight for processor 0 in that case.

@gab-arrobo
Copy link
Collaborator

@sureshmarikkannu, please review this PR. Thanks!

@gab-arrobo
Copy link
Collaborator

@markbeierl, you may need to rebase your PR and make the commit(s) appending the -s flag to pass the DCO check

@sureshmarikkannu
Copy link
Contributor

@markbeierl , Sorry for the delayed review. I want to test multiple scenarios to understand the impact of this change and also want to understand the UPF behavior when we deploy multiple instances of UPF.
Please find my observations below,

  1. performance tests with single UPF instance: I run TCP/UDP tests with this patch and all looks good, no issues observed.
  2. performance tests with multiple UPF instance: I do see that the same core was assigned for both UPF instances (bess worker threads) which impacts the throughput. Also please note that i do see same behavior without this patch as well (which means psutil.Process().cpu_affinity() returns the entire set of CPU's available in the system).

So in summary when we scale the UPF, we need to utilize the core's carefully in order to not intersect with other UPF's.
We need to use specific set of cores per instance (maybe based on the cores allocated for the UPF pod) for allocating the worker threads.

@gab-arrobo, @markbeierl Let me know your thoughts.

@gab-arrobo
Copy link
Collaborator

close as explained in #780

@gab-arrobo gab-arrobo closed this Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants