简体   繁体   English

Azure blob 存储流性能问题

[英]Azure blob storage streaming performance issue

My application till this day was working with local zip files, meaning I was using a direct return new FileStream() in the application and the local zip file that was located on the SDD/Network drive path (zip files can be hundreds of GB).直到今天,我的应用程序都在使用本地 zip 文件,这意味着我在应用程序中使用直接返回new FileStream()和位于 SDD/网络驱动器路径上的本地 zip 文件(zip 文件可以是数百 GB) .

I configured the application to work with Azure Blob Storage, meaning each FileStream that was returned in now return as the Azure Blob SDK method:我将应用程序配置为使用 Azure Blob 存储,这意味着返回的每个 FileStream 现在作为 Azure Blob SDK 方法返回:

GetBlobStreamAsync(ContainerName, BlobName).ConfigureAwait(false).GetAwaiter().GetResult()

I uploaded some zip files to a container in the blob storage and set the connection string in the application to work with that storage account.我将一些 zip 文件上传到 blob 存储中的一个容器,并在应用程序中设置连接字符串以使用该存储帐户。

The application was deployed and running on a virtual windows machine located in the same region of the Azure Storage Blob.该应用程序部署并运行在位于 Azure 存储 Blob 同一区域的虚拟机 windows 上。

Note: This is a private cloud.network.注意:这是私有云网络。

When the app is streaming the zip file on Azure blob storage it seems that the performance has decreased by at least 8-9 times (problematic with hundreds of GB).当应用程序在 Azure blob 存储上流式传输 zip 文件时,性能似乎下降了至少 8-9 倍(数百 GB 有问题)。

Speed comparison is between local C: drive on the same windows virtual machine that the application is running on an Azure Storage account which is located in the same region.速度比较是在本地 C 之间进行的:应用程序在同一区域的 Azure 存储帐户上运行的同一 windows 虚拟机上的驱动器。

Note: NW Bandwidth - is 50 GB on the VM on azure注意:NW 带宽 - 在 azure 上的 VM 上为 50 GB

Solutions that I tried:我尝试过的解决方案:

  1. Azure blob Premium Performance storage - Didn't improve performance Azure blob 高级性能存储 -没有提高性能
  2. .Net Core - advantage of performance enhancements (we work with.Net framework so this is irrelevant). .Net Core - 性能增强的优势(我们使用 .Net 框架,所以这无关紧要)。
  3. Network File System (NFS) 3.0 performance considerations in Azure Blob storage - ( Does not work with private cloud). Azure Blob 存储中的网络文件系统 (NFS) 3.0 性能注意事项 -(不适用于私有云)。
  4. Hot, Cool, and Archive access tiers for blob data - The default is Hot so we already tried this scenario with no improvements . Blob 数据的热、冷和存档访问层 - 默认为热,因此我们已经尝试过这种情况,但没有改进

Solutions I want to try:我想尝试的解决方案:

  1. Azure Files Share Storage as a cache solution Azure 文件共享存储作为缓存解决方案
  2. .Net Framework configuration - lists several quick configuration settings that you can use to make significant performance improvements .Net Framework 配置 - 列出了几个可用于显着提高性能的快速配置设置

Question:问题:

Does anyone have any suggestions on how can I optimize the streaming in front of the Azure Storage Blob?有没有人对如何优化 Azure 存储 Blob 前面的流有任何建议?

Azure Files (share) or Storage Blob services are likely not the right services to be utilized for this scenario. Azure 文件(共享)或存储 Blob 服务可能不是用于此方案的正确服务。 There are two possible paths:有两种可能的路径:

  1. Break a single file into multiple files and leverage Storage Blob service that handles throughput better than Azure Files.将单个文件分成多个文件并利用比 Azure 文件更好地处理吞吐量的存储 Blob 服务。 Azure Files performs better with small(er) files which are typical to user documents (PDFs, Word, Excel, etc.) Azure 文件在处理用户文档(PDF、Word、Excel 等)中常见的小(更)文件时表现更好
  2. Switch over to a more dedicated service that is designed specifically for large-size data transfer if breaking up a single file into multiple blobs is not an option.如果无法将单个文件拆分为多个 blob,请切换到专为大型数据传输而设计的更专用服务。

The recommendation for each option will highly depend on the implementation details, requirements and constraints of the system.每个选项的建议将在很大程度上取决于系统的实施细节、要求和约束。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM