is pulumi supposed to slow to an absolute crawl wh...
# general
g
is pulumi supposed to slow to an absolute crawl when you hit ~ 200 aws resources
l
No it shouldn’t. We have customers with thousands of resources in a single stack. Can you tell a bit more which AWS resources you are deploying?
g
Hey Ringo
Mostly aws media services stuff such as mediaconnect, medialive, some directly using
aws
provider, a couple bits using
aws-native
(which is buggy as heck with media services resources, lots of 500 errors from the aws api) and some using cloudformation.Stack. I'd say about 9 mediapackage channels, 9 medialive channels, 30 or so mediaconnect flows, as well as 2 cloudfront distributions, some roles, some secrets. With all the bits & pieces that wire up the major parts it comes to 250 resources, i'm sure 1/5 to 1/10 of those are my custom components. Most interesting is that the same thing takes 1.5 minutes on my coworkers machine, who is in australia. Our backend is an s3 bucket in australia. I timed a call to fetch the state json file and it takes 6.5 seconds to fetch it on my machine i'm not ready to make a strong statement on what i think i'm observing, take the following with a grain of salt because I don't trust my memory. I have noticed that, depending on what i'm trying to update, the preview portion of
pulumi up
can take anywhere from a minute to 5, then on
yes
the preparatory phase up to 15min where nothing is updated, then finally it begins updating resources and that part appears to go reasonably well although ive noticed that resources may have updated and then pulumi can sit another 20-60 seconds extra. I did notice that when I was fiddling with the cloudformation.Stacks the times swung quite a lot, and somehow I think when it had nothing to update it got slower
i'm not sure if it's a proximity thing or my machine
versions are:
Copy code
pulumi v3.92.0

@pulumi/pulumi: 3.91.1
@pulumi/aws: 6.6.1
@pulumi/aws-native: 0.82.0
@pulumi/awsx: 2.0.3
@pulumi/random: 4.14.0
g
Avoid AWS native, cloudformation is painfully slow, if you can avoid Cloudformation entirely it is not worth it. I've been working with Cloudformation 5 years and it does not feel any faster, so any other service dependent on it will experience slowness. awsiamRole role1 created (0.77s) aws-nativeiamRole role2 created (48s) • │ │ ├─ awsiamRole role1 deleted (1s) • │ │ └─ aws-nativeiamRole role2 deleted (42s)
g
cant avoid sadly
the terraform provider for media services is very old & incapable, i'm doing a refresher course on golang so i can maybe submit some fixes
and aws's own cloud control api throws 500
so it's gotta be cloudformation
either way it's not meant to take 20+ minutes so something is definitely going wrong, im going to do a trace this afternoon to see if it's doing that goofy thing where it writes to the state file for each resource in series, downloading & uploading it each time
was a bug in previes versions of pulumi, wondering if it's regressed somehow
g
I see
e
that goofy thing where it writes to the state file for each resource in series, downloading & uploading it each time
was a bug in previes versions of pulumi, wondering if it's regressed somehow
That is still the case. You can disable it with an envvar PULUMI_SKIP_CHECKPOINTS.
g
i'll try
I guess we don't have any sort of 'active' state system that can exchange diffs instead of the whole state file hey? nvm i'll go read
oh lord 1.5 minutes vs 7.5 for a different stack
zzzz
I'm guessing that we cant manage locks & state in separate backends can we
e
? You can have state in as many backends as makes sense for your use cases. Not sure what the question is here?
I guess we don't have any sort of 'active' state system that can exchange diffs instead of the whole state file hey
😞 sadly not. It's come up a few times of building a new state system that does this, but it's a lot of work to get right.
g
? You can have state in as many backends as makes sense for your use cases. Not sure what the question is here?
I'm not sure what I was asking either lol
sadly not. It's come up a few times of building a new state system that does this, but it's a lot of work to get right.
indeed it is definitely not trivial
c
Regarding "_that goofy thing where it writes to the state file for each resource_", what seems like a reasonable fix has been suggested in this issue. Is this on Pulumi's radar at all to fix?