-
Notifications
You must be signed in to change notification settings - Fork 82
[MODCLUSTER-757] improve internal_find_best_byrequests performance for high balancer members #608
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
Conversation
|
Can one of the admins verify this patch? If it is not dangerous to our systems, juts tell me to "run_tests". ( without the underscore and quotes 😃 ) |
|
@jfclere Please review. Also, this will probably need a forward-port PR to 2.x. |
jfclere
left a comment
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.
Please fix and make sure you follow the code convention (c and not C++) don't create variable in the middle of the code that won't compile with the minimum compiler.
| continue; /* wrong shared memory address */ | ||
| if (PROXY_WORKER_IS_USABLE(worker)) { | ||
| if (best == NULL) | ||
| return NULL; |
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.
that will break the logic (well the trace and a set), better break here.
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 is moving context_host_ok logic into internal_find_best_byrequests. context_host_ok already returned null if best from find_node_context_host is null here. So instead of repeating context_host_ok/find_node_context_host each iteration, find_node_context_host is called just once. So if best is null in one iteration, it would be null in all if we did a break to repeat iterations. Thus it seems we should just return here.
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.
We missed the piece
| } else { |
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.
Ah, yes; sorry, see what you mean now.
…r high balancer members
|
There are other place where context_host_ok() is used should we also look to them? |
|
My comments on https://issues.redhat.com/browse/MODCLUSTER-757 describe the tests and results. I simulated 500 balancer members in those tests and just did simple load tests from ab without any session cookie in the requests. Ensure any test load does not use or provide a session that could be stickied as stickied requests avoid internal_find_best_byrequests calls. |
|
Checking other places where context_host_ok/find_node_context_host, may be called, I see:
Those may be worth following up on if we want to get even more optimal performance but it should provide a much smaller performance gain compared to this in the end. But I filed https://issues.redhat.com/browse/MODCLUSTER-764 to track those points. |
https://issues.redhat.com/browse/MODCLUSTER-757