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

Go SDK is bloated #1445

Closed
yarinm opened this issue Jan 26, 2021 · 4 comments
Closed

Go SDK is bloated #1445

yarinm opened this issue Jan 26, 2021 · 4 comments
Labels
area/providers impact/performance Something is slower than expected kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed

Comments

@yarinm
Copy link

yarinm commented Jan 26, 2021

I'm trying to upgrade from 2.6.1 to 2.7.7 and I noticed two things:

  1. My final binary size was increased by 250mb
  2. Circle CI builds started to fail consistently due to OOM when building the package (I'm using a 16gb machine and it's not enough)

From some testing it seems that each version gradually increases the pulumi-kubernetes in size and build times.

I know that @EvanBoyle is doing some work with reducing pulumi go modules size so that might help here as well.

Edit:
The major increase happens from 2.7.6 to 2.7.7 from 2.6.1 to 2.7.X increased in about 50mb

Builds usually fail at this point:

go: downloading github.com/pulumi/pulumi/sdk/v2 v2.18.2
go: downloading github.com/pulumi/pulumi-kubernetes/sdk/v2 v2.7.6
go: downloading github.com/pulumi/pulumi-random/sdk/v3 v3.0.1
go: downloading github.com/gofrs/uuid v3.3.0+incompatible
go build github.com/pulumi/pulumi-kubernetes/sdk/v2/go/kubernetes/extensions/v1beta1: /usr/local/go/pkg/tool/linux_amd64/compile: signal: killed
@lblackstone
Copy link
Member

I just tested the linked PR locally, and it cut ~170 MB off the binary size. Still testing the change, but we should make some progress on this in the near future.

@yarinm
Copy link
Author

yarinm commented Jan 27, 2021

@lblackstone Any idea why the binary size increased in about 200mb between 2.7.6 to 2.7.7?

@lblackstone
Copy link
Member

@lblackstone Any idea why the binary size increased in about 200mb between 2.7.6 to 2.7.7?

Yes, we added a bunch of types to support the upcoming multi-language component work. That change scales with the number of resources in the SDK, so providers like k8s with a lot of resources were most impacted by the change. We're evaluating ways to optimize the memory requirements as it's a known issue with our Go SDKs in general.

@lblackstone
Copy link
Member

This should be improved in https://github.com/pulumi/pulumi-kubernetes/releases/tag/v2.7.8

I'm going to close this out since we don't have further concrete improvements in mind at this time.

@lblackstone lblackstone added the resolution/fixed This issue was fixed label Apr 28, 2021
@lukehoban lukehoban added the kind/bug Some behavior is incorrect or out of spec label Jun 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/providers impact/performance Something is slower than expected kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed
Projects
None yet
Development

No branches or pull requests

4 participants