-
Notifications
You must be signed in to change notification settings - Fork 3k
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
WSL: Why Azure CLI is too slow at each command execution? #7447
Comments
Can you time the command for us? And could you run |
@troydai |
3 to 4 seconds is not normal. Is it in WSL or PowerShell? |
In the both @troydai, the user experience with Azure CLI time perception is not good. |
Same here. I run a simple command like
and it took more than 2 seconds! And this is a consistent behaviour... It seems a lot for a simple info request. |
I can also confirm this issue
|
@NickSuperb Are you run it from Brazil too? |
I'm also having a similar issue except with
it takes 5 seconds .... the az cli also takes quite a bit of time. |
Same here, I'm in Paris, France |
same here, from Germany to DC in Amsterdam,NL |
It does not seems to be a geographical issue, but rather Azure slow responding. Which does not really not surprise me as also from the portal I often experience very slow operations. Any comments from MS Azure people? |
There are performance issues native to WSL and Windows Defender that make things abnormally slow in this environment. Future versions of WSL aim to address this performance issue, but it is not something we control within the CLI. |
@tjprescott It's not only in WSL, PowerShell or CMD has same behavior. |
@tjprescott I am running Mac OSX and experiencing slowness as well. |
@tjprescott Experiencing the same issue. A login request takes about 5 sec... |
To add a bit more: I sometimes experience similar poor performance also using the azure portal. Is it then a back end issue? |
add to S164. |
Hi All. I would like to contribute to this if I may. Sadly I don't have a trace to offer but I can confirm the below:
Parameters: Linux image (119MB) from Docker Hub into West Europe Container Group with 1vcpu and 1.5GiB. |
@CoderKooke, could you let us know the command you were running? Thanks. |
Sure. az container create
Pulling a Linux image from DockerHub. Looking at the output, it appears
that the length was because it failed then tried again.
The output eventually said success but the container was in state "Invalid"
or something like that.
…On Fri, 17 Jan 2020, 01:48 Jiashuo Li, ***@***.***> wrote:
@CoderKooke <https://github.com/CoderKooke>, could you let us know the
command you were running? Thanks.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#7447?email_source=notifications&email_token=AKY2HOP6DXWVDYHFZQQ77O3Q6EE5NA5CNFSM4FYEOKOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJGFMBA#issuecomment-575428100>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKY2HOJG3OG4NMGTHSKE2TLQ6EE5NANCNFSM4FYEOKOA>
.
|
@fengzhou-msft please take a look also. |
Asking what version of the az CLI already takes more than 2 seconds. Isn't that quite long for showing a version number? I installed the CLI via the .msi installer. C:\Windows\system32> az --version
azure-cli 2.0.80
command-modules-nspkg 2.0.3
core 2.0.80
nspkg 3.0.4
telemetry 1.0.4
Extensions:
azure-devops 0.17.0
Python location 'C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe'
Extensions directory 'C:\Users\Wout\.azure\cliextensions'
Python (Windows) 3.6.6 (v3.6.6:4cf1f54eb7, Jun 27 2018, 02:47:15) [MSC v.1900 32 bit (Intel)]
Legal docs and information: aka.ms/AzureCliLegal
Your CLI is up-to-date.
Please let us know how we are doing: https://aka.ms/clihats
C:\Windows\system32> Measure-Command { az --version }
Days : 0
Hours : 0
Minutes : 0
Seconds : 2
Milliseconds : 400
Ticks : 24004857
TotalDays : 2,77833993055556E-05
TotalHours : 0,000666801583333333
TotalMinutes : 0,040008095
TotalSeconds : 2,4004857
TotalMilliseconds : 2400,4857 |
route to appropriate team to help look at az devops command performance |
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @narula0781, @ashishonce, @romil07. Issue DetailsDescribe the bug I don't know if I am at Brazil and the all api calls is from US and those internet latence is the cause but is really bad. To Reproduce Expected behavior Environment summary
Additional context Thank's!
|
Hi, I am running some az-cli commands that are taking forever to complete. Following are the commands that are a part of my script and get called multiple times in a loop: These commands have variable execution times when I timed my script: This is on CentOS 7 machines core 2.18.0 * Extensions: |
same here in NZ, azure shell and the portal shell are too slow. |
The delay should be caused by |
@MaisaDaoud, please see my comment at #7447 (comment). A client-side command now only takes 400ms on Windows:
Please share the command you used and open a new issue for us to investigate. Thanks. |
time az --version
|
Re-running my test az-cli-vs-ps.ps1
PowerShell is still faster, but AZ CLI performance is much better compared to one year ago. Thanks team! 🎉 |
@MaisaDaoud, how is the performance of |
Why is this issue being closed? I don't see any improvements over the performance of the |
@Mossaka please help send out detailed info related to which command you see the performance issue. |
With the introduction of Command Index (#13294) and migration to PEP 420 (#14372), the client-side execution speed of Azure CLI has been significantly improved. That's why we closed this issue. If the Azure CLI command involves Azure REST API invocation, Azure CLI will spend most of its time communicating with Azure REST API and do long-running operation query, which is out of our control. In such case, those changes won't give you too much performance improvement. Please share the command as @yonzhan asked. Thanks. |
It seems with
|
@jiasli thanks for opening this case. |
If anything this is worse than ever with 2.45.0: > measure-command { az version }
Days : 0
Hours : 0
Minutes : 0
Seconds : 3
Milliseconds : 202
Ticks : 32024121
TotalDays : 3.70649548611111E-05
TotalHours : 0.000889558916666667
TotalMinutes : 0.053373535
TotalSeconds : 3.2024121
TotalMilliseconds : 3202.4121 |
the following pipeline task took 1 minute and 47 seconds!!!!!
why on earth does that take so long to run???? |
The second run only takes
It seems ubuntu-latest is much faster, finishing the exact same commands in under 4 seconds on the first call:
Pipeline YAML used:
Forcing a few settings off works shaving off 50 or so seconds:
I had to overwrite these settings from a CLI, cause using After running the above config code, the perf vastly improves, though first run is still slower:
|
I've been digging into az-cli performance and submitted a few fixes here and there. You may find a few more hints by running Ideally See: |
I consistently get +30s times for listing some (
Here is an example of a command that is very fast in comparison (so my network specifics does not seem to be the culprit unless this response is cached locally):
I'm using az cli 2.65.0 |
Adding the --debug flag:
|
@fengzhou-msft @jiasli could you please reopen or provide feedback on the traces above? The ml extension is causing the whole CLI to bog down for nearly a minute on each invocation. |
Describe the bug
It's not exactly a bug but every command at PowerShell or Bash in WSL is too slow, I know that every command is making a web-api request call but is really sad this api call is causing too much delay.
I don't know if I am at Brazil and the all api calls is from US and those internet latence is the cause but is really bad.
To Reproduce
Stay at Brazil and call a single command like
az acr list
.Expected behavior
I don't know, but some loading indicator or proxy all api request call near Brazil...
Environment summary
Windows 10 with PowerShell and WSL
Additional context
Every was slow here at Brazil, I don't know if it is slow in another region, I'm posting it right now because I'm starting use Azure CLI constantly and I wish a better user experience.
Thank's!
The text was updated successfully, but these errors were encountered: