microsoft / AzureStorageExplorer

Easily manage the contents of your storage account with Azure Storage Explorer. Upload, download, and manage blobs, files, queues, tables, and Cosmos DB entities. Gain easy access to manage your virtual machine disks. Work with either Azure Resource Manager or classic storage accounts, plus manage and configure cross-origin resource sharing (CORS) rules.
Creative Commons Attribution 4.0 International
377 stars 87 forks source link

Azure Storage Explorer energy consumption too high when idle #1222

Open etm-admin opened 5 years ago

etm-admin commented 5 years ago

Storage Explorer Version: 1.7.0 Platform/OS: macOS High Sierra Architecture: x64 Regression From: Unknown

Bug description

Idle consumption drains laptop battery quickly. Currently using on one online subscription which has two accounts and around 100 storage accounts in total.

Steps to Reproduce Monitor energy consumption on MacOs after the application is not used for a while.

Expected Experience

Energy impact should be less than 1% when idle.

Actual Experience

Goes up to 9-10% sometimes. Usually around 3-6% which is a lot for an idle application.

Additional Context Standard MacOS. No customizations. Patched to the latest version including all security updates.

Might be UI related. Minimizing UI and then switching to other mac apps and then leaving it idle helps. However, it doesn't solve completely.

craxal commented 5 years ago

@etm-admin Probably one of the limitations of the app being built on Electron (which is based on Chromium). A lot of other Electron-based apps have the same problem. There may some things we can do to optimize, but not much. We can look into it.

coip commented 3 years ago

astonishing bug... any information on this since prior commentary?

image image image

coip commented 3 years ago

the above situation is latest storage explorer, downloaded today via https://azure.microsoft.com/en-us/features/storage-explorer/, running on macOS catalina.

coip commented 3 years ago

@craxal, if electron was the culprit, wouldnt vs code exhibit the same behavior?

craxal commented 3 years ago

@coip I'm pretty sure VS Code has had this problem at some point, and there have been some discussions about the general problem Electron apps have with power consumption. It's possible the issue has been addressed in some version of Electron that we haven't picked up yet.

Energy consumption also depends pretty heavily on what you're doing with the app. Just running Storage Explorer relatively idly, I haven't seen energy impact go above 30 (I'm running Big Sur).

Can you tell us more about your Storage Explorer usage? Has the app been open for a long period of time? Are there other performance indicators you can share with us that might help us understand what's going on (memory consumption, CPU usage, etc.)? We also just released 1.17.0, so you may want to make sure you've got that installed.

coip commented 3 years ago

gotcha! hopefully there is some breadcrumb via PR/patch for a fix?

Can you tell us more about your Storage Explorer usage?

the above screenshots were the result of running it for about an hour after install, uploading ~20 small (<1MB) media assets to a container created via SE, and idling otherwise.

Has the app been open for a long period of time?

about an hour.

Are there other performance indicators you can share with us that might help us understand what's going on (memory consumption, CPU usage, etc.)?

Ill see if I can get anything notable today.

We also just released 1.17.0, so you may want to make sure you've got that installed.

seeing

Version: 1.17.0
AzCopy Version: 10.7.0
Platform: macOS
Architecture: x64 
Build Number: 20201211.10 
Commit: b65184c83 
Support ID: 6307d1b5-b88d-fb73-a329-e13efffbf881
coip commented 3 years ago

to try and walk the callpath, the operations performed @ runtime were: 1) connect to storage account via connstring. 2) attached another via connstring, and then detatched. 3) reattached account from # 2. 4) create container. 5) upload folder. 6) ~idle/no use leading up to screenshots.

craxal commented 3 years ago

@coip Thank you for sharing! I'm a bit surprised it took an hour to upload 20 MB. What sort of network connect do you have?

I highly suspect the upload operation is the culprit for the majority of the power consumption. I'm assuming the upload is using AzCopy to upload your files. In this case, I would say the energy consumption is by design, because AzCopy uses whatever it can to complete the operation. We do have a few settings you can tinker with to limit how much AzCopy uses in the upload. I'd suggest seeing what other system resources are getting heavily used before playing with them.

coip commented 3 years ago

@craxal upload was completed within a minute.