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

[Bug]: AzureStorageProvider Performance is Slow on Large Associated Storage Accounts #5969

Open
2 tasks done
mitchelsellers opened this issue Feb 10, 2024 · 2 comments
Open
2 tasks done

Comments

@mitchelsellers
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

What happened?

When uploading, deleting, moving, or performing other actions using an AzureFolderProvider mapped file the performance of the operation degrades as the particular mapping grows and adds more files.,

Steps to reproduce?

  1. Configure a Folder Mapping with an AzureFolder (Idealy a clean setup)
  2. Upload a file, notice fast performance
  3. Update the folder in Azure/DNN to have many files > 1000 or so and it seems to be visible
  4. Upload a file againIdeally

Current Behavior

When completing an upload or other operation, you will find that the upload zooms to completed on the UI, but then it takes many seconds, up to 30-40 at times to refresh the listing and truly complete the operation.being completed on the UI, but then it takes many seconds, up to 30-40 at times,

Expected Behavior

This should be a quick operation and should not slow down with the addition of new files/folders.

Relevant log output

No response

Anything else?

In looking at this it seems to be directly related to the behaviors utilized with regards to cache management within the AzureFolderProvider itself.

After each operation you can see that it purges the cache -

The action to re-fill the cache is here -

protected override IList<IRemoteStorageItem> GetObjectList(FolderMappingInfo folderMapping)

The issue is that since the mapping is per provider mapping, not per folder or otherwise, this requires a full enumeration of the Azure Blob storage account.

This has two net impacts to operators using Azure Storage Providers

  • The performance issues as noted
  • Additional billing in Azure as there is pricing for the number of reads etc. (Granted lower costs, but still a cost)

I think we need to look at better strategies for caching, or updating the cache for this provider.

Affected Versions

9.13.2 (latest release), 9.13.3 (alpha), 10.0.0 (alpha)

What browsers are you seeing the problem on?

Firefox, Chrome, Safari, Microsoft Edge

Code of Conduct

  • I agree to follow this project's Code of Conduct
@valadas
Copy link
Contributor

valadas commented Feb 23, 2024

@mitchelsellers in addition to this, something calls SynchronizeFiles with a list that can contain a lot of folders (not files) and it throws a potentially huge amount of InvalidFileExtensionException in FolderManager.SynchronizeFiles

image
It gets entered though this call stack:

image

I setup a local environment here to troubleshoot this and what is taking the most time is getting the file LastModifiedDate for some reason. If you can join next co-coding session, happy to continue on that path...

@mitchelsellers
Copy link
Contributor Author

Yes, I can try to join next week. I was in the air today when the session was going on

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants