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

Excessive DeepCopy usage in remote state backend leads to performance degradation #35113

Closed
alexott opened this issue May 6, 2024 · 0 comments · Fixed by #35164
Closed

Excessive DeepCopy usage in remote state backend leads to performance degradation #35113

alexott opened this issue May 6, 2024 · 0 comments · Fixed by #35164
Labels
bug new new issue not yet triaged

Comments

@alexott
Copy link
Contributor

alexott commented May 6, 2024

Terraform Version

1.8.1

Terraform Configuration Files

Just a big number of resources defined (> 100k)

Debug Output

With DeepCopy in remote state's WriteState function, I get ~1 resource/sec on a plan with 300k object:

Tue Apr 30 13:40:21 CEST 2024
 161 databricks_notebook
Tue Apr 30 13:45:21 CEST 2024
 436 databricks_notebook
Tue Apr 30 13:50:22 CEST 2024
 709 databricks_notebook
Tue Apr 30 13:55:22 CEST 2024
 996 databricks_notebook

Without it, I'm getting close to 2 resources/second:

Tue Apr 30 15:00:27 CEST 2024
 191 databricks_notebook
Tue Apr 30 15:05:30 CEST 2024
 708 databricks_notebook
Tue Apr 30 15:10:31 CEST 2024
1218 databricks_notebook
Tue Apr 30 15:15:31 CEST 2024
1732 databricks_notebook

Expected Behavior

Performance doesn't degrade

Actual Behavior

Performance degrades with the number of resources in plan

Steps to Reproduce

just normal usage with plan/apply.

Additional Context

No response

References

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug new new issue not yet triaged
Projects
None yet
1 participant