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

x/telemetry: cmd/go: report maximum support micro architecture by the host of the compiler #65627

Open
Jorropo opened this issue Feb 9, 2024 · 3 comments
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. telemetry x/telemetry issues Telemetry-Proposal
Milestone

Comments

@Jorropo
Copy link
Member

Jorropo commented Feb 9, 2024

Proposal Details

More and more architectures are gaining sub-architecture levels under ${GO${GOARCH^^}} variables.

Often higher levels add new instructions and tweak semantics which allows the compiler to emit better code (which would be incompatible with previous cpus).

It would be nice to know what CPUs should be targeted. For example if we discover that 40% of cpus support amd64 v4 considering avx512 routines would be useful.

The main issue with this approach is that the cpu compiling and the cpu running code aren't the same. However I don't think anyone (including me) want to collect telemetry from end binaries.

@Jorropo Jorropo added the telemetry x/telemetry issues label Feb 9, 2024
@gopherbot gopherbot added this to the Unreleased milestone Feb 9, 2024
@Jorropo Jorropo changed the title x/telemetry: add maximum support micro architecture x/telemetry: report maximum support micro architecture by the host of the compiler Feb 9, 2024
@Jorropo Jorropo changed the title x/telemetry: report maximum support micro architecture by the host of the compiler x/telemetry: cmd/go: report maximum support micro architecture by the host of the compiler Feb 9, 2024
@thanm thanm added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Feb 12, 2024
@thanm
Copy link
Contributor

thanm commented Feb 12, 2024

@pjweinb @hyangah @findleyr per owners

@findleyr
Copy link
Contributor

Thanks for filing this issue, our first telemetry proposal outside the telemetry team (!). In the future, we hope people will fill out the telemetry proposal template, though I know that the process needs documentation, so let's start with what you've provided.

I think one missing piece of information (for me, a naive observer) is the set of unique counters that would be collected. We don't need to decide on the exact format now, but suppose the schema is something like build/goamd64:{v1,v2,v3,v4}. Can you enumerate all of the possible unique values you'd want to collect?

@Jorropo
Copy link
Member Author

Jorropo commented Feb 13, 2024

That a good question, ideally I would want all the best supported ${GO${GOARCH^^}} values on all archs as more and more architectures now have microarchitecture level:

However a glance at https://telemetry.go.dev/ suggest only amd64 and arm64 are used in any significant number in the wild.

So it is probable that the values for GORISCV64 support would be unique. (bad)

I don't really see value in tracking GOARM64 either as near all the arm64 reports are on darwin and afaik all the apple m{1,2,3} support the same extensions so we wouldn't learn anything right now.

GOAMD64 has good variety, there is a wide variety of generations of products in use today and various products within the same generations can support different extensions (new low power intel chips still only support v2 for example).


TL;DR:
build/goamd64:{v1,v2,v3,v4} LGTM.

I don't exactly know the telemetry syntax, but build/goamd64 suggest to me this reads the GOAMD64 variable. I'm not asking for the micro architecture level people are using in the wild today to compile their program, I'm asking for the best level their CPU would support.

I guess most peoples don't even know GOAMD64 exists as it has none to very little impact in the real world so all the samples would be v1 as it's the default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. telemetry x/telemetry issues Telemetry-Proposal
Projects
Status: No status
Development

No branches or pull requests

4 participants