从Azure VM写入Azure映射的网络驱动器速度很慢 [英] Writing to Azure mapped network drive from Azure VM is slow

查看:83
本文介绍了从Azure VM写入Azure映射的网络驱动器速度很慢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好

我在与存储帐户相同的区域中有一个VM(标准B2ms).

I have a VM (Standard B2ms) in the same region as a Storage Account.

在存储帐户上,我有一个文件共享,该文件共享作为映射的网络驱动器在VM上连接.

On the storage account I have a File Share which is connected on the VM as a mapped network drive.

将小文本文件写入存储帐户时,每次写入大约需要50ms到100ms.

When writing small text files to the storage account it takes approximately 50ms to 100ms per write.

        static void Main(string[] args)
        {
            string outputDirectory = "v:\\testing\\";

            string text = "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys " +
                "standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type " +
                "specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining " +
                "essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, " +
                "and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.";

            StringBuilder builder = new StringBuilder();

            for (int i = 0; i < 500; i++)
            {
                //Start Stopwatch
                var watch = System.Diagnostics.Stopwatch.StartNew();

                //Write file to Azure mapped network drive
                File.AppendAllText(outputDirectory + "file" + i + ".txt", text);

                //Stop stopwatch and record the elapsed time.
                watch.Stop();
                builder.Append(watch.ElapsedMilliseconds + ",");
                watch.Restart();
            }

            File.AppendAllText("stopwatch.txt", builder.ToString());
            Console.Read();

        }

结果以毫秒为单位-

44,54,96,60,46,42,137,31,42,114,53,33,31,33,112,33,33,55,43,46,48,76,55,51,89,50,48,35,59,36,71,72,83,35,51,51,41,36,32,42,55,213,34,39,53,75,45,36,44,51,38,108,33,37,38,87,37,66,52,44,107,67,66,34,77,37,34,40,71,35,88,59,36,44,88,50,44,77,52,40,39,96,38,89,50,36,36,38,53,60,61,36,38,44,34,41,35,51,31,32,35,37,36,45,39,43,37,37,47,37,81,36,34,51,45,37,79,49,32,35,37,33,32,36,64,40,38,48,72,37,36,36,36,55,37,49,32,39,36,36,41,34,61,36,32,32,35,35,52,67,56,44,107,36,34,38,39,38,44,49,58,37,40,83,34,39,34,48,64,39,33,31,44,38,67,36,48,53,38,36,95,35,39,54,38,40,48,50,34,35,34,35,95,30,33,33,32,35,45,51,46,33,46,41,37,55,31,39,35,53,111,33,94,56,40,34,33,37,45,53,35,76,54,73,63,40,37,40,36,38,41,36,79,37,37,83,32,44,52,34,33,53,33,34,38,43,45,38,37,50,38,38,35,95,42,52,102,36,81,51,33,35,32,56,47,42,152,30,65,38,42,37,83,50,43,53,37,35,52,39,38,40,33,76,42,42,37,37,32,33,62,32,50,43,39,69,32,42,32,32,43,57,35,42,56,42,90,33,35,153,35,53,34,40,38,79,38,49,34,38,39,38,36,34,52,36,131,58,37,32,104,46,37,51,39,90,100,33,90,121,34,35,35,36,78,48,34,59,36,36,66,56,53,76,36,50,50,77,35,55,36,39,48,59,35,57,35,94,31,36,35,35,31,37,63,43,32,35,31,33,36,52,31,32,58,81,102,38,35,38,123,86,57,36,44,32,33,60,48,31,32,84,56,68,37,33,82,37,51,32,39,36,85,38,31,33,37,37,65,152,46,36,60,57,51,49,38,32,33,32,95,32,36,116,32,34,34,36,32,45,30,34,33,47,40,35,145,84,34,53,35,32,59,40,56,34,33,34,39,31,35,38,33,36,67,48,33,36,30,38,33,35,32,76,37,43,33,34,48,61,32,88,39,201,46,122,50,37,57,123,52,36,37,60,48,39,56,35,82,36,

在我们的本地网络上进行的同一测试,写入网络驱动器的平均时间为2ms至5ms.

The same test on our on-premise network, writing to a network drive is 2ms to 5ms on average. 

我们如何在写入Azure存储时获得类似的性能?

How do we get similar performance writing to azure storage?

谢谢

推荐答案

您可以参考 解决类似问题的MSDN 线程.

You may refer the suggestions outlined in the MSDN thread which addresses similar issue.

span>

If this answer was helpful, click "Mark as Answer" or "Up-Vote". To provide additional feedback on your forum experience, click here


这篇关于从Azure VM写入Azure映射的网络驱动器速度很慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆