-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Recovery buffer size 16B smaller #50100
Recovery buffer size 16B smaller #50100
Conversation
G1GC will use humongous allocations when an allocation exceeds half the chosen region size, which is minimum 1MB. By reducing the recovery buffer size by 16 bytes we ensure that the recovery buffer is never allocated as a humongous allocation.
Pinging @elastic/es-distributed (:Distributed/Recovery) |
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.
Does this really matter much for recoveries? We only have a very limited number of these arrays in existence at any given time anyway and heavily reuse them don't we? (not that I see any downside to the change otherwise :) just wondering)
We generate one such byte array per shard recovery on source. Not a lot of activity, but still I felt like the right thing to do here was to make the buffer 16 bytes smaller since it is unlikely to affect recovery speed. A separate issue is that as far as I can see we allocate new byte arrays currently on the target for every chunk, since |
This is correct. I have been working on a mechanism to prevent these allocations (probably for peer recovery file chunks and index operations). It should be opened pretty soon. |
|
Scratch my last comment, it looks like that async thing is only for testing simulation purposes. |
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 convinced this will have much if any practical impact but I don't see a downside either
=> LGTM :)
G1GC will use humongous allocations when an allocation exceeds half the chosen region size, which is minimum 1MB. By reducing the recovery buffer size by 16 bytes we ensure that the recovery buffer is never allocated as a humongous allocation.
G1GC will use humongous allocations when an allocation exceeds half the chosen region size, which is minimum 1MB. By reducing the recovery buffer size by 16 bytes we ensure that the recovery buffer is never allocated as a humongous allocation.
G1GC will use humongous allocations when an allocation exceeds half the
chosen region size, which is minimum 1MB. By reducing the recovery
buffer size by 16 bytes we ensure that the recovery buffer is never
allocated as a humongous allocation.