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

colexec: clean up vectorized stats #53153

Merged
merged 1 commit into from
Aug 25, 2020
Merged

Conversation

yuzefovich
Copy link
Member

@yuzefovich yuzefovich commented Aug 20, 2020

Release note (sql change): selectivity information has been removed
from EXPLAIN ANALYZE diagrams which would be present if the query was
executed via the vectorized engine because it has been quite confusing
and probably not helpful information.

Release note (sql change): stall time has been renamed to
IO + execution time in EXPLAIN ANALYZE diagrams for the queries that are
executed via the vectorized engine.

@yuzefovich yuzefovich requested review from asubiotto and a team August 20, 2020 21:35
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Contributor

@asubiotto asubiotto left a comment

Choose a reason for hiding this comment

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

Reviewed 5 of 10 files at r1.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @asubiotto and @yuzefovich)


pkg/sql/colexec/execpb/stats.go, line 54 at r1 (raw file):

	batchesOutputQueryPlanSuffix     = "batches output"
	tuplesOutputQueryPlanSuffix      = "tuples output"
	ioIncludedTimeQueryPlanSuffix    = "IO + execution time"

Are you sure it includes execution time? I'm under the impression it's only IO.


pkg/sql/colexec/execpb/stats.proto, line 29 at r1 (raw file):

  google.protobuf.Duration time = 4 [(gogoproto.nullable) = false,
                                  (gogoproto.stdduration) = true];
  reserved 5;

Why not just rename 5? The semantics are the same and it would avoid having to bump distsql version.

Copy link
Member Author

@yuzefovich yuzefovich left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @asubiotto)


pkg/sql/colexec/execpb/stats.go, line 54 at r1 (raw file):

Previously, asubiotto (Alfonso Subiotto Marqués) wrote…

Are you sure it includes execution time? I'm under the impression it's only IO.

It's only IO in the row engine, in the vectorized we measure the time differently, so it'll include both IO (cFetcher waiting for next KV) and execution (cFetcher decoding things).


pkg/sql/colexec/execpb/stats.proto, line 29 at r1 (raw file):

Previously, asubiotto (Alfonso Subiotto Marqués) wrote…

Why not just rename 5? The semantics are the same and it would avoid having to bump distsql version.

Done. I did that initially as well but then decided to change to a different value just to be safe, but I've now remembered that I tried renaming a field and it worked like a charm in mixed-version cluster.

Copy link
Contributor

@asubiotto asubiotto left a comment

Choose a reason for hiding this comment

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

Reviewed 3 of 10 files at r1, 4 of 4 files at r2.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @yuzefovich)


pkg/sql/colexec/execpb/stats.go, line 54 at r1 (raw file):

It's only IO in the row engine

I don't think that's true (if you consider "decoding" = "execution time"). rowFetcherStatCollector starts timing before the call to NextRow and stops the timer after. I vote to keep it as just IO, I think it's less confusing because we can't define "execution" time when stalling.

Copy link
Member Author

@yuzefovich yuzefovich left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @awoods187 and @jordanlewis)


pkg/sql/colexec/execpb/stats.go, line 54 at r1 (raw file):

Previously, asubiotto (Alfonso Subiotto Marqués) wrote…

It's only IO in the row engine

I don't think that's true (if you consider "decoding" = "execution time"). rowFetcherStatCollector starts timing before the call to NextRow and stops the timer after. I vote to keep it as just IO, I think it's less confusing because we can't define "execution" time when stalling.

cc @awoods187 @jordanlewis on naming

There was some discussion here https://cockroachlabs.slack.com/archives/C8HD41C82/p1594249854088100?thread_ts=1594243319.067000&cid=C8HD41C82.

Maybe simply "IO time" is less confusing than "IO + execution time", but the latter is more precise IMO.

@asubiotto
Copy link
Contributor

Hmm, I guess I'm happy with whatever you all agreed on. I prefer "IO time" if we can't separate execution in terms of decoding rows, but I might be too close to the code to see the bigger picture.

Copy link
Contributor

@asubiotto asubiotto left a comment

Choose a reason for hiding this comment

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

:lgtm: I leave the choice up to you

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @awoods187 and @jordanlewis)

@yuzefovich
Copy link
Member Author

I don't think separating IO from execution in colBatchScan is worth it, but I'll wait for others to share their thoughts here as well.

Release note (sql change): `selectivity` information has been removed
from EXPLAIN ANALYZE diagrams which would be present if the query was
executed via the vectorized engine because it has been quite confusing
and probably not helpful information.

Release note (sql change): `stall time` has been renamed to `IO time`
in EXPLAIN ANALYZE diagrams for the queries that are executed via the
vectorized engine.
@yuzefovich
Copy link
Member Author

After discussing with Jordan, we decided to go with Alfonso's suggestion and just to use simply "IO time" since it's less confusing. I'll wait for a green CI and then will merge this.

@yuzefovich
Copy link
Member Author

TFTR!

bors r+

@craig
Copy link
Contributor

craig bot commented Aug 24, 2020

Build failed (retrying...):

@craig
Copy link
Contributor

craig bot commented Aug 25, 2020

Build succeeded:

@craig craig bot merged commit 72cb52d into cockroachdb:master Aug 25, 2020
@yuzefovich yuzefovich deleted the cleanup-stats branch August 25, 2020 02:07
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.

3 participants