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

Include system memory to StatementStats #40

Merged
merged 1 commit into from
Feb 10, 2022
Merged

Conversation

miniway
Copy link
Member

@miniway miniway commented Feb 9, 2022

From Trino 369, it will not separate user and system memories trinodb#10574 . So it should be fine to include system memory to StatementStats as a workaround

@miniway miniway requested a review from takezoe February 9, 2022 04:15
@@ -618,7 +618,7 @@ private static StatementStats toStatementStats(QueryInfo queryInfo)
.setElapsedTimeMillis(queryStats.getElapsedTime().toMillis())
.setProcessedRows(queryStats.getRawInputPositions())
.setProcessedBytes(queryStats.getRawInputDataSize().toBytes())
.setPeakMemoryBytes(queryStats.getPeakUserMemoryReservation().toBytes())
.setPeakMemoryBytes(queryStats.getPeakUserMemoryReservation().toBytes() + queryStats.getPeakNonRevocableMemoryReservation().toBytes())
Copy link
Member

Choose a reason for hiding this comment

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

getPeakNonRevocableMemoryReservation() was added in 337: trinodb@11b7d19

Copy link
Member Author

Choose a reason for hiding this comment

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

I've changed it to getPeakTotalMemoryReservation here. As we don't use evocableMemory (spill), the values will be the same. In 350, we can use getPeakNonRevocableMemoryReservation.

Copy link
Member

@takezoe takezoe left a comment

Choose a reason for hiding this comment

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

LGTM

@miniway miniway merged commit 33ae708 into hotfix-317 Feb 10, 2022
@miniway miniway deleted the system_memory branch February 10, 2022 01:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants