-
Notifications
You must be signed in to change notification settings - Fork 1.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
[Segment Replication] Create a separate thread pool for Segment Replication events #8669
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -113,6 +113,8 @@ public static class Names { | |
public static final String TRANSLOG_SYNC = "translog_sync"; | ||
public static final String REMOTE_PURGE = "remote_purge"; | ||
public static final String REMOTE_REFRESH = "remote_refresh"; | ||
|
||
public static final String SEGMENT_REPLICATION = "segment_replication"; | ||
public static final String INDEX_SEARCHER = "index_searcher"; | ||
} | ||
|
||
|
@@ -182,6 +184,7 @@ public static ThreadPoolType fromType(String type) { | |
map.put(Names.TRANSLOG_SYNC, ThreadPoolType.FIXED); | ||
map.put(Names.REMOTE_PURGE, ThreadPoolType.SCALING); | ||
map.put(Names.REMOTE_REFRESH, ThreadPoolType.SCALING); | ||
map.put(Names.SEGMENT_REPLICATION, ThreadPoolType.SCALING); | ||
if (FeatureFlags.isEnabled(FeatureFlags.CONCURRENT_SEGMENT_SEARCH)) { | ||
map.put(Names.INDEX_SEARCHER, ThreadPoolType.RESIZABLE); | ||
} | ||
|
@@ -267,6 +270,10 @@ public ThreadPool( | |
Names.REMOTE_REFRESH, | ||
new ScalingExecutorBuilder(Names.REMOTE_REFRESH, 1, halfProcMaxAt10, TimeValue.timeValueMinutes(5)) | ||
); | ||
builders.put( | ||
Names.SEGMENT_REPLICATION, | ||
new ScalingExecutorBuilder(Names.SEGMENT_REPLICATION, 1, halfProcMaxAt10, TimeValue.timeValueMinutes(5)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How are we deciding on these values? Should we be trying out a few different values to see what works best with most common segment replication setups? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. +1 I think for segment replication, the thread queue should not be bounded or at least should be a fairly large value There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Rishikesh1159 : Identifying ideal maximum thread count is tricky and will depend on cluster load & usage. I think we need to set this to a number sufficient to handle the busiest of traffic/ingestion pattern without bottleneck on threads in pool. One way to get more insights on this number is to run an experiment
The count of max/avg thread usage will give us idea on this number. |
||
); | ||
if (FeatureFlags.isEnabled(FeatureFlags.CONCURRENT_SEGMENT_SEARCH)) { | ||
builders.put( | ||
Names.INDEX_SEARCHER, | ||
|
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 component is used during ingest to determine if pressure should be applied, not to perform segrep activities. I don't think we should use the pool 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.
yes makes sense, will update it