-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Frozen default cache size #71844
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
Frozen default cache size #71844
Conversation
This commit adds a default cache size to frozen tier of the greater of 90% and total disk size minus 100 GB. Additionally, configuring a frozen cache is now warned against on nodes with multiple data paths.
Pinging @elastic/es-distributed (Team:Distributed) |
Dedicated frozen nodes can survive less headroom than other data nodes. This commits introduces a separate flood stage threshold for frozen as well as an accompanying max_headroom setting that caps the amount of free space necessary on frozen. Relates elastic#71844
Some functionality will no longer work with multiple data paths and in order to run integration tests for that, we need the capability to force a single data path for those tests. Relates elastic#71844
@elasticmachine run elasticsearch-ci/2 |
Some functionality will no longer work with multiple data paths and in order to run integration tests for that, we need the capability to force a single data path for those tests. Relates #71844
Some functionality will no longer work with multiple data paths and in order to run integration tests for that, we need the capability to force a single data path for those tests. Relates #71844
Nodes with a frozen cache no longer supports multiple data paths. This simplifies cache sizing and avoids the need to support multiple cache files. Relates elastic#71844
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've left only minor comments, o.w. looking good.
<<data-frozen-node,`data_frozen`>> role. | ||
|
||
IMPORTANT: You can only configure these settings on nodes that use a single |
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.
Perhaps more of a question to the docs team: I wonder if we should have two "important" notices following each other, or whether it should be all folded into one.
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 tried to find other places with two, but found none and did find some where it could have been split into two. So I collapsed it to one in 1b8ede4
Setting.Property.NodeScope | ||
); | ||
|
||
private static boolean isDedicatedFrozen(Settings settings) { |
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 surprised this method did not already exist.
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.
Maybe add this method to DiscoveryNode
?
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 centralized this to DiscoveryNode
in 616940c
this.cacheSize = SNAPSHOT_CACHE_SIZE_SETTING.get(settings).getBytes(); | ||
FsInfo.Path pathInfo; | ||
try { | ||
pathInfo = FsProbe.getFSInfo(environment.nodePaths()[0]); |
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.
environment.nodeDataPaths()[0]
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.
Fixed in 7280ae8
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.
LGTM
must have one or more nodes with a shared cache available. By default, | ||
dedicated frozen data tier nodes (nodes with the `data_frozen` role and no other | ||
data roles) have a shared cache configured using the greater of 90% of total | ||
disk space and total disk space subtracted a headroom of 100GB. |
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 wonder if inserting an example here would help.
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.
Good idea, added examples in 53f5982
<<data-frozen-node,`data_frozen`>> role. | ||
|
||
IMPORTANT: You can only configure these settings on nodes that use a single | ||
<<path-settings,data path>> |
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.
<<path-settings,data path>> | |
<<path-settings,data path>>. |
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.
Fixed this when turning it into one IMPORTANT note in 1b8ede4
double value = (double) randomIntBetween(1, 100) / 100; | ||
RelativeByteSizeValue parsed = RelativeByteSizeValue.parseRelativeByteSizeValue(Double.toString(value), "test"); | ||
assertThat(parsed.getRatio().getAsRatio(), | ||
equalTo(value)); |
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.
nit: fits on the same line as the previous one
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.
Thanks, see 3160c5f
Setting.Property.NodeScope | ||
); | ||
|
||
private static boolean isDedicatedFrozen(Settings settings) { |
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.
Maybe add this method to DiscoveryNode
?
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.
LGTM
try { | ||
totalFsSize = FsProbe.getTotal(Environment.getFileStore(environment.nodeDataPaths()[0])); | ||
} catch (IOException e) { | ||
throw new IllegalStateException("unable to probe size of filesystem [" + environment.nodePaths()[0] + "]"); |
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.
also change to environment.nodeDataPaths
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.
Thanks, sorry for missing that one 1b3e031
Nodes with a frozen cache no longer supports multiple data paths. This simplifies cache sizing and avoids the need to support multiple cache files. Relates #71844
Nodes with a frozen cache no longer supports multiple data paths. This simplifies cache sizing and avoids the need to support multiple cache files. Relates elastic#71844
Dedicated frozen nodes can survive less headroom than other data nodes. This commits introduces a separate flood stage threshold for frozen as well as an accompanying max_headroom setting that caps the amount of free space necessary on frozen. Relates #71844
Dedicated frozen nodes can survive less headroom than other data nodes. This commits introduces a separate flood stage threshold for frozen as well as an accompanying max_headroom setting that caps the amount of free space necessary on frozen. Relates elastic#71844
Dedicated frozen nodes can survive less headroom than other data nodes. This commits introduces a separate flood stage threshold for frozen as well as an accompanying max_headroom setting that caps the amount of free space necessary on frozen. Relates #71844
This commit adds a default cache size to frozen tier of the greater of 90% and total disk size minus 100 GB.
Changes: * Renames 'full copy searchable snapshot' to 'fully mounted index.' * Renames 'shared cache searchable snapshot' to 'partially mounted index.' * Removes some unneeded cache setup instructions for the frozen tier. We added a default cache size with #71844.
Changes: * Renames 'full copy searchable snapshot' to 'fully mounted index.' * Renames 'shared cache searchable snapshot' to 'partially mounted index.' * Removes some unneeded cache setup instructions for the frozen tier. We added a default cache size with #71844.
Changes: * Renames 'full copy searchable snapshot' to 'fully mounted index.' * Renames 'shared cache searchable snapshot' to 'partially mounted index.' * Removes some unneeded cache setup instructions for the frozen tier. We added a default cache size with #71844.
This commit adds a default cache size to frozen tier of the greater of
90% and total disk size minus 100 GB.
Will follow-up with two other items: