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

terraform execution in westeurope is slow #5067

Closed
ahelal opened this issue Dec 4, 2019 · 3 comments
Closed

terraform execution in westeurope is slow #5067

ahelal opened this issue Dec 4, 2019 · 3 comments
Labels

Comments

@ahelal
Copy link

ahelal commented Dec 4, 2019

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform (and AzureRM Provider) Version

  • terraform 0.12.12
  • Azure provider 1.36.1 also with 1.34.0

Affected Resource(s)

All

Terraform Configuration Files

https://gist.github.com/ahelal/e0fdaa02cb9ad7da9bfcde97e03acdd1

Expected Behavior

I run the code on two regions westus2 and westeurope from VM on azure I expect execution time to be smiler.

Actual Behavior

westeurope is way slower with a factor of 2 - 3

1 2 3 4 5
Creation westus2 06:09 06:18 05:55 06:15 05:53
Destruction westus2 04:12 04:35 04:45 05:01 04:30
Creation westeurope 19:04 20:31 18:47 19:31 17:39
Destruction westeurope 22:02 22:21 22:02 21:22 21:11

I have a jobs running in a CI in both location westeurope is always slower. I also run it from my laptop with smiler results.

Steps to Reproduce

  • time terraform apply --var location=westeurope and time terraform apply --var location=westus2
  • or run the test script ./run-test.sh

References

@hund030
Copy link

hund030 commented Dec 9, 2019

Hi, @ahelal. I reproduced the issue and I found terraform get slower to deploy for the region where terraform is called at. I run your code on both regions westus2 and westeurope from VM at westus2 on azure and get an opposite result:

    1 2 3
Creation westus2 18:32 18:04 17:27
Destruction westus2 21:54 21:05 22:25
Creation westeurope 5:50 6:07 6:01
Destruction westeurope 3:56 3:56 4:25

I also try it from my local machine(East China), there isn't any significant performance difference between these two regions.

Besides, I did some tracing works and found when TF deploys to the same region(westus2 to westus2 in my case), for most resource it waits about 10 seconds for the service to complete the async creation\destruction. Below pics show processes to create a network security rules on westus2 and westeurope. Because of the mysterious 10 seconds, deploy to westus2 takes more time even with a lower network latency.

image
image

TF forces the security rules be created one by one and the same issue also happens to other resources, so totally the script takes much more time then in other region.

@katbyte
Copy link
Collaborator

katbyte commented Dec 9, 2019

Hi @ahelal,

I'm sorry that you are having these issues with azure provisioning times. However from a provider perspective we are calling the same API endpoints with only the location property changed so any differences in location provisioning times are on the Azure side, possibly due to differences in demand or useage in that location. As there is not much we can do in the provider i am going to close this and suggest you reach out to Azure Support as they potentially will have more insight into what is going on here.

@ghost
Copy link

ghost commented Jan 9, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked and limited conversation to collaborators Jan 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants