-
Notifications
You must be signed in to change notification settings - Fork 18
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
Increase provider performance - move to no-fork/forkless architecture (free from Terraform CLI) #226
Comments
hm, i thought that's what i did with |
yeah, you are right. I checked also the stack trace (not for every resource), but there is no terraform cli invoked, upjet controller directly calls the go code of the terraform provider. I did some really simple performance tests with a single Keycloak Provider pod in version I scripted a loop which inserts per run:
I ran it ~750x in a single thread, these are the results: ![]() ![]() ![]() ![]() (0.5 quantile) All of that took ~40min for ~6000 Resources Pod took up to 2,5 GB RAM That seems a bit too slow and resource intensive compared to the other providers that moved to forkless (mentioned in this Blog Post) Am I missing something ? Any idea what exactly slow´s it down? |
Do the resources depend on each other? In the past i had experiences with keycloak where many API calls took a long time under certain circumstances (especially if you are using user federation via AD/LDAP) There should also be reconcile settings for that case, we can experience with those, maybe we miss something there |
Thanks for that hint. I removed AD/LDAP user federation from keycloak. All of that took again ~40min for ~6000 Resources Pod took up to 3,3 GB RAM I see a lot of those errors in the log:
There are a lot of retries per second, probably due to that error: Regarding to your proposal to modify reconcile settings, are you referring to those: And propose to change the values here? provider-keycloak/cmd/provider/main.go Lines 105 to 116 in 590ace8
If I increase
and furthermore these errors:
I think it would make sense to drill down why the error I this happening when two controllers(-threads) race to update a resource ? |
Currently the provider runs into limitations when it comes to many resources (thousands of resources). These thresholds can be quickly reached when it comes to users, roles & groups
Therefore it would make sense to increase provider performance (at least for certain resources) by moving to no-fork/forkless architecture (free from Terraform CLI)
Currently the no-fork architecture approach can not be generated by upjet code generation. The migration process is unique for all providers.
Prerequisite is that we use Upjet in v1.0.0 or above.
As a PoC we should choose one resource to move to no-fork architecture:
externalname.go
. For an example see provider-upjet-aws externalname.go (TerraformPluginFrameworkExternalNameConfigs and TerraformPluginSDKExternalNameConfigs)Another benefit of no-fork architecture besides increased performance is that the terraform license change is not affecting us anymore. Because it will not use Terraform CLI anymore.
More Information:
The text was updated successfully, but these errors were encountered: