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

Also consider memory usage in adaptive parallelism #1759

Merged
merged 8 commits into from
Oct 17, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
comment
  • Loading branch information
makalaaneesh committed Oct 17, 2024
commit 0c39c43069b5ff7824c21ca6a284b94f03d70023
39 changes: 39 additions & 0 deletions yb-voyager/src/tgtdb/yugabytedb.go
Original file line number Diff line number Diff line change
Expand Up @@ -1178,6 +1178,45 @@ func (yb *TargetYugabyteDB) IsAdaptiveParallelismSupported() bool {
return yb.isQueryResultNonEmpty(query)
}

/*
Sample output of yb_servers_metrics:
yugabyte=# select uuid, jsonb_pretty(metrics), status, error from yb_servers_metrics();

uuid | jsonb_pretty | status | error

----------------------------------+-----------------------------------------------------+--------+-------

bf98c74dd7044b34943c5bff7bd3d0d1 | { +| OK |
| "memory_free": "0", +| |
| "memory_total": "17179869184", +| |
| "cpu_usage_user": "0.135827", +| |
| "cpu_usage_system": "0.118110", +| |
| "memory_available": "0", +| |
| "tserver_root_memory_limit": "11166914969", +| |
| "tserver_root_memory_soft_limit": "9491877723",+| |
| "tserver_root_memory_consumption": "52346880" +| |
| } | |
d105c3a6128640f5a25cc74435e48ae3 | { +| OK |
| "memory_free": "0", +| |
| "memory_total": "17179869184", +| |
| "cpu_usage_user": "0.135189", +| |
| "cpu_usage_system": "0.119284", +| |
| "memory_available": "0", +| |
| "tserver_root_memory_limit": "11166914969", +| |
| "tserver_root_memory_soft_limit": "9491877723",+| |
| "tserver_root_memory_consumption": "55074816" +| |
| } | |
a321e13e5bf24060a764b35894cd4070 | { +| OK |
| "memory_free": "0", +| |
| "memory_total": "17179869184", +| |
| "cpu_usage_user": "0.135827", +| |
| "cpu_usage_system": "0.118110", +| |
| "memory_available": "0", +| |
| "tserver_root_memory_limit": "11166914969", +| |
| "tserver_root_memory_soft_limit": "9491877723",+| |
| "tserver_root_memory_consumption": "62062592" +| |
| } | |
*/
func (yb *TargetYugabyteDB) GetClusterMetrics() (map[string]NodeMetrics, error) {
result := make(map[string]NodeMetrics)

Expand Down
Loading