Skip to content
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

Add auto analyze service tserver and master flags #25097

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

yifanguan
Copy link
Contributor

This pull request add auto analyze service tserver flags yugabyte-db/docs/content/preview/reference/configuration/yb-tserver.md and master flags to yugabyte-db/docs/content/preview/reference/configuration/yb-master.md

Copy link

netlify bot commented Nov 26, 2024

Deploy Preview for infallible-bardeen-164bc9 ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit b1374c0
🔍 Latest deploy log https://app.netlify.com/sites/infallible-bardeen-164bc9/deploys/67477607b70acb0008866aaf
😎 Deploy Preview https://deploy-preview-25097--infallible-bardeen-164bc9.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@ddhodge ddhodge added the area/documentation Documentation needed label Nov 26, 2024
Copy link
Contributor

@m-iancu m-iancu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added some notes together with @yifanguan to try and improve clarity. Some might not be an improvement, @yifanguan to review and apply selectively.
Otherwise looks good from technical perspective.


##### ysql_enable_auto_analyze_service

Enable the Auto Analyze service which automatically runs ANALYZEs to update table statistics for tables which have changed more than a configurable threshold.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Enable the Auto Analyze service which automatically runs ANALYZEs to update table statistics for tables which have changed more than a configurable threshold.
Enable the Auto Analyze service, which automatically runs ANALYZE to update table statistics for tables that have changed more than a configurable threshold.


{{< note title="Note" >}}

To fully enable Auto Analyze service, you need to enable `ysql_enable_auto_analyze_service` on all YB-Masters and YB-TServers, as well as `ysql_enable_table_mutation_counter` on all YB-TServers.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
To fully enable Auto Analyze service, you need to enable `ysql_enable_auto_analyze_service` on all YB-Masters and YB-TServers, as well as `ysql_enable_table_mutation_counter` on all YB-TServers.
To fully enable the Auto Analyze service, you need to enable `ysql_enable_auto_analyze_service` on all YB-Masters and YB-TServers, and `ysql_enable_table_mutation_counter` on all YB-TServers.

Default: false

##### ysql_enable_table_mutation_counter
Enable counting of mutations on a per-table basis. These mutations are used to automatically run ANALYZE as soon as the mutations of a table cross
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Enable counting of mutations on a per-table basis. These mutations are used to automatically run ANALYZE as soon as the mutations of a table cross
Enable mutation counting on a per-table basis. Mutations are used by the Auto Analyze service to run ANALYZE when the number of mutations of a table exceeds


##### ysql_enable_table_mutation_counter
Enable counting of mutations on a per-table basis. These mutations are used to automatically run ANALYZE as soon as the mutations of a table cross
a certain threshold (decided based on [ysql_auto_analyze_threshold](#ysql-auto-analyze-threshold) and [ysql_auto_analyze_scale_factor](#ysql-auto-analyze-scale-factor)).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
a certain threshold (decided based on [ysql_auto_analyze_threshold](#ysql-auto-analyze-threshold) and [ysql_auto_analyze_scale_factor](#ysql-auto-analyze-scale-factor)).
the threshold determined by the [ysql_auto_analyze_threshold](#ysql-auto-analyze-threshold) and [ysql_auto_analyze_scale_factor](#ysql-auto-analyze-scale-factor) settings.

##### ysql_auto_analyze_scale_factor

The fraction defining when sufficient mutations have been accumulated to run ANALYZE for a table.
ANALYZE runs when the mutation count becomes larger than `ysql_auto_analyze_scale_factor * <table_size> + ysql_auto_analyze_threshold`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ANALYZE runs when the mutation count becomes larger than `ysql_auto_analyze_scale_factor * <table_size> + ysql_auto_analyze_threshold`.
ANALYZE runs when the mutation count exceeds `ysql_auto_analyze_scale_factor * <table_size> + ysql_auto_analyze_threshold`.


##### ysql_cluster_level_mutation_persist_interval_ms

Interval at which the reported node level table mutation counts are persisted to the underlying auto-analyze mutations table.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the "auto-analyze mutations table"


##### ysql_cluster_level_mutation_persist_rpc_timeout_ms

Timeout for the rpcs used to persist mutation counts in the auto-analyze mutations table.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Timeout for the rpcs used to persist mutation counts in the auto-analyze mutations table.
Timeout for the RPCs used to persist mutation counts in the auto-analyze mutations table.


##### ysql_node_level_mutation_reporting_interval_ms

Interval at which the node level table mutation counts are sent to the auto analyze service which tracks table mutation counts at the cluster level.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Interval at which the node level table mutation counts are sent to the auto analyze service which tracks table mutation counts at the cluster level.
Interval, in milliseconds, at which the node-level table mutation counts are sent to the Auto Analyze service, which tracks table mutation counts at the cluster level.


##### ysql_node_level_mutation_reporting_timeout_ms

Timeout for the node level mutation reporting rpc to auto-analyze service.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Timeout for the node level mutation reporting rpc to auto-analyze service.
Timeout, in milliseconds, for the node-level mutation reporting RPC to the Auto Analyze service.


##### ysql_enable_auto_analyze_service

Enable the Auto Analyze service which automatically runs ANALYZEs to update table statistics for tables which have changed more than a configurable threshold.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Enable the Auto Analyze service which automatically runs ANALYZEs to update table statistics for tables which have changed more than a configurable threshold.
Enable the Auto Analyze service, which automatically runs ANALYZE to update table statistics for tables that have changed more than a configurable threshold.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/documentation Documentation needed
Projects
Status: In progress
Development

Successfully merging this pull request may close these issues.

3 participants