-
Notifications
You must be signed in to change notification settings - Fork 628
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
ISPN-9091 Determine available CPUs taking CGroup quotas into account #5929
ISPN-9091 Determine available CPUs taking CGroup quotas into account #5929
Conversation
This is wrong. Closing temporarily |
8519b01
to
7286baf
Compare
This now uses the same logic adopted by Java 10+ taking into account:
|
7286baf
to
643a463
Compare
643a463
to
e925837
Compare
Hints for testing: |
e925837
to
b6caf48
Compare
@tristantarrant It appears to be working as expected 👍. On Jdk >= 10 should we not just return |
Yes, but the multi-release jar work is going into my JDK 10+ PR. Once this is in I will adapt #5940 to do just that |
|
||
private static int determineProcessors() { | ||
int javaProcs = Runtime.getRuntime().availableProcessors(); | ||
int userProcs = Integer.getInteger("infinispan.activeprocessorcount", javaProcs); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we always use the value returned from the setting "infinispan.activeprocessorcount" if it is set?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it does so only if it is less than the available processors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, from the name I assumed it would be use this setting always type of thing. Just side note but with non linux would always use this value if it is set btw.
https://issues.jboss.org/browse/ISPN-9091