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][ASH]Fix PG pulling of tserver compaction events #20923

Closed
1 task done
hbhanawat opened this issue Feb 5, 2024 · 0 comments
Closed
1 task done

[YSQL][ASH]Fix PG pulling of tserver compaction events #20923

hbhanawat opened this issue Feb 5, 2024 · 0 comments
Assignees
Labels
area/ysql Yugabyte SQL (YSQL) kind/bug This issue is a bug priority/medium Medium priority issue

Comments

@hbhanawat
Copy link
Contributor

hbhanawat commented Feb 5, 2024

Jira Link: DB-9905

Description

Currently the tserver compaction wait events are not being collected and are not being store in the ASH buffer.

Issue Type

kind/bug

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 the area/ysql Yugabyte SQL (YSQL) label Feb 5, 2024
@yugabyte-ci yugabyte-ci added kind/bug This issue is a bug priority/medium Medium priority issue labels Feb 5, 2024
abhinab-yb added a commit that referenced this issue Feb 6, 2024
…amples to ASH

Summary:
D31146 / 14bbef1 introduced more
tserver wait events in YCQL, Flush, Compaction, Raft and Consensus.

This diff populates the circular buffer with these wait events.

Jira: DB-9905

Test Plan:
Manual Testing

Start a yb-sample-apps YCQL read write workload

```
java -jar yb-sample-apps.jar --workload CassandraKeyValue --nodes 127.0.0.1:9042 --num_writes -1 --num_reads -1
```

Start a cluster with these gflags

```
bin/yb-ctl start --tserver_flags="TEST_yb_enable_ash=true,ysql_pg_conf_csv='yb_ash_sampling_interval=100',memstore_size_mb=1,TEST_ash_debug_aux=true"
```

Wait for a few minutes, connect to ysqlsh and fire this query

```
yugabyte=# select
  query_id, wait_event_component, wait_event_class, wait_event, wait_event_aux, count(*)
from yb_active_session_history
group by query_id, wait_event_component, wait_event_class, wait_event, wait_event_aux
order by query_id, wait_event_component, wait_event_class, wait_event_aux;
       query_id       | wait_event_component |  wait_event_class  |         wait_event         | wait_event_aux | count
----------------------+----------------------+--------------------+----------------------------+----------------+-------
 -3453713637993789781 | Postgres             | TServerWait        | CatalogRead                |                |     1
 -3453713637993789781 | Postgres             | YsqlQuery          | QueryProcessing            |                |     3
 -3453713637993789781 | TServer              | Common             | OnCpu_Active               | Perform        |     1
 -1081940071252633265 | TServer              | Common             | OnCpu_Active               | CQLProcessCall |   115
 -1081940071252633265 | TServer              | Common             | OnCpu_Passive              | CQLProcessCall |   577
 -1081940071252633265 | TServer              | Common             | OnCpu_Active               | Write          |   210
 -1081940071252633265 | TServer              | Common             | Rpc_Done                   | Write          |    26
 -1081940071252633265 | TServer              | Common             | OnCpu_Passive              | Write          |   158
 -1081940071252633265 | TServer              | Consensus          | Raft_ApplyingEdits         | Write          |   121
 -1081940071252633265 | TServer              | Consensus          | Raft_WaitingForReplication | Write          |  1053
 -1081940071252633265 | YCQL                 | Client             | YBC_WaitingOnDocdb         | CQLProcessCall |  1924
 -1081940071252633265 | YCQL                 | Client             | YBC_LookingUpTablet        | CQLProcessCall |     6
 -1081940071252633265 | YCQL                 | CqlQueryProcessing | CQL_Execute                | CQLProcessCall |    30
 -1081940071252633265 | YCQL                 | CqlQueryProcessing | CQL_Write                  | CQLProcessCall |     6
                    0 | TServer              | Common             | OnCpu_Active               | CQLProcessCall |     9
                    0 | TServer              | Common             | OnCpu_Passive              | Heartbeat      |     1
                    0 | TServer              | Common             | OnCpu_Active               | Read           |    75
                    0 | TServer              | Common             | OnCpu_Passive              | Read           |   556
                    0 | TServer              | Common             | OnCpu_Passive              | Write          |    27
                    0 | TServer              | Common             | OnCpu_Active               | Write          |     3
                    0 | TServer              | Common             | OnCpu_Passive              |                |   168
                    0 | TServer              | Common             | OnCpu_Active               |                |    74
                    0 | YCQL                 | Client             | YBC_WaitingOnDocdb         | Perform        |     4
                    1 | TServer              | Common             | Idle                       | RaftWAL        | 17045
                    1 | TServer              | Consensus          | WAL_Append                 | RaftWAL        |  1858
                    1 | TServer              | Consensus          | WAL_Sync                   | RaftWAL        |  1177
                    2 | TServer              | RocksDB            | RocksDB_WriteToFile        | Flush          |     8
                    3 | TServer              | RocksDB            | RocksDB_Compaction         | Compaction     |    45
  1957997667337333449 | TServer              | Common             | OnCpu_Passive              | CQLProcessCall | 13524
  1957997667337333449 | TServer              | Common             | OnCpu_Active               | CQLProcessCall |  2163
  1957997667337333449 | TServer              | Common             | Rpc_Done                   | Read           |   421
  1957997667337333449 | TServer              | Common             | OnCpu_Active               | Read           |  4643
  1957997667337333449 | TServer              | RocksDB            | RocksDB_NewIterator        | Read           |   343
  1957997667337333449 | TServer              | TabletWait         | MVCC_WaitForSafeTime       | Read           |    68
  1957997667337333449 | YCQL                 | Client             | YBC_LookingUpTablet        | CQLProcessCall |    96
  1957997667337333449 | YCQL                 | Client             | YBC_WaitingOnDocdb         | CQLProcessCall |  6413
  1957997667337333449 | YCQL                 | CqlQueryProcessing | CQL_Read                   | CQLProcessCall |   107
  1957997667337333449 | YCQL                 | CqlQueryProcessing | CQL_Execute                | CQLProcessCall |   211
(38 rows)

```

We can see various wait events related to YCQL, Flush, Compaction, Raft and Consensus

Reviewers: jason

Reviewed By: jason

Subscribers: hbhanawat, amitanand, yql

Differential Revision: https://phorge.dev.yugabyte.com/D32190
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/bug This issue is a bug priority/medium Medium priority issue
Projects
None yet
Development

No branches or pull requests

3 participants