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

[YSQL][ActiveHistory] Create YB AUH extension with circular buffer #19127

Closed
1 task done
hbhanawat opened this issue Sep 17, 2023 · 0 comments
Closed
1 task done

[YSQL][ActiveHistory] Create YB AUH extension with circular buffer #19127

hbhanawat opened this issue Sep 17, 2023 · 0 comments
Assignees
Labels
area/ysql Yugabyte SQL (YSQL) kind/enhancement This is an enhancement of an existing feature priority/medium Medium priority issue

Comments

@hbhanawat
Copy link
Contributor

hbhanawat commented Sep 17, 2023

Jira Link: DB-7925

Description

- Create an extension YB AUH that has a background postgres worker which will be used to poll postgres and tserver wait events 
- The extension and the background worker should be enabled by a gflag. Initially, it should be disabled. 
-  Create a circular buffer in shared memory

Warning: Please confirm that this issue does not contain any sensitive information

  • I confirm this issue does not contain any sensitive information.
@hbhanawat hbhanawat added area/ysql Yugabyte SQL (YSQL) status/awaiting-triage Issue awaiting triage area/active-history Active history of sessions labels Sep 17, 2023
@yugabyte-ci yugabyte-ci added kind/enhancement This is an enhancement of an existing feature priority/medium Medium priority issue labels Sep 17, 2023
@yugabyte-ci yugabyte-ci removed area/active-history Active history of sessions status/awaiting-triage Issue awaiting triage labels Sep 17, 2023
@hbhanawat hbhanawat added the area/active-history Active history of sessions label Sep 18, 2023
@yugabyte-ci yugabyte-ci removed the area/active-history Active history of sessions label Oct 13, 2023
abhinab-yb added a commit that referenced this issue Nov 6, 2023
…uffer and background worker

Summary:
Create a new extension `yb_auh`. The extension is going to be the backbone of the Active Universe History project. It contains the circular buffer which will store the wait events and the background worker which will poll the local tserver and the PG backends for the wait events. This is implemented as an extension so that it is loosely coupled with the core postgres files.

In the future, the extension will also contain a view which can be used to query the circular buffer and some hooks which will be used to set and unset some AUH parameters during the execution of a YSQL query.

New Gflags introduced -

- `enable_yb_auh`: If true, enables Active Universe History extension. Default is `false`.
- `yb_auh.circular_buffer_size`: Size of circular buffer in KB. Default is `16 MB`. This is a postgres conf flag.
- `yb_auh.sampling_interval`: Duration (in milliseconds) between each sample. Default is `1000 ms`. This is a postgres conf flag.
- `yb_auh.sample_size`: Number of wait events captured in each sample. Default is `500`. This is a postgres conf flag.

`enable_yb_auh` is defined in `pggate_flags.h` and not in `pg_wrapper.cc` because this flag will be used in `pg_session.cc` in the future.

The code does nothing as of now. We will add tests in the future when the code is more complete.
Jira: DB-7925

Test Plan: Jenkins: compile only

Reviewers: hbhanawat, amitanand, myang, jason

Reviewed By: jason

Subscribers: jason, yql

Differential Revision: https://phorge.dev.yugabyte.com/D29238
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ysql Yugabyte SQL (YSQL) kind/enhancement This is an enhancement of an existing feature priority/medium Medium priority issue
Projects
None yet
Development

No branches or pull requests

3 participants