-
Notifications
You must be signed in to change notification settings - Fork 73
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
Fixes #18981: Slow computation of dynamic groups on large system #3577
Fixes #18981: Slow computation of dynamic groups on large system #3577
Conversation
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.
Appart for some little enhancement in comments, this seems to be a good PR with limited risk and clear gain. Nice !
} | ||
updateManager ! GroupUpdateMessage.DynamicUpdateResult(processId, modId, startTime, DateTime.now, results.toMap) | ||
|
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.
There should be a debug-level log message here telling how much parallelism is used for groups without dependencies
@@ -441,6 +445,7 @@ class LDAPBasedConfigService( | |||
rudder.generation.delay=0s | |||
rudder.generation.trigger=all | |||
node.accept.duplicated.hostname=false | |||
rudder.compute.dyngroups.max.parallelism=1 |
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.
I think that for consistancy sack, it should be like rudder.generation.max.parallelism
, ie accepting either an integer like here, or xF
, with F
a float and x
the character x
, meaning F time the number of CPU available
. The same parsing logic can be used (and can even be factored out in an utility object, which would also ensure to always return an integer at least equals to 1
).
And with that, setting it to x0.5
(ie, number CPU / 2
) seems to be a good default.
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's not really generation, as it is to compute dynamic groups (so also done outside of policy generation)
i'll change the xF
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.
I'm not sure i'd like to change the default to something larger than 1, as it depends on the size of the LDAP connection pool which is 2 by default
PR updated with a new commit |
val error = (e.fullMsg + s"Error when updating dynamic group '${id.value}'") | ||
logger.error(error) | ||
// e.fullMsg.foreach(ex => | ||
// logger.error("Exception was:", ex) |
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.
this comment should be removed
4078275
to
d65eda3
Compare
PR updated with a new commit |
This PR is not mergeable to upper versions. |
OK, squash merging this PR |
f016e6a
to
074cb46
Compare
https://issues.rudder.io/issues/18981