简体   繁体   English

Azure区域-网站上的性能差异

[英]Azure regions - Performance difference on websites

2 identical websites in Azure, they have identical setup. Azure中有2个相同的网站,它们具有相同的设置。 Both are running in Standard mode with instance size Small. 两者都以实例大小为“标准”模式运行。 There are no auto-scaling. 没有自动缩放。

One website is running in region North Europe, the other in West Europe. 一个网站在北欧地区运行,另一个在西欧运行。

I experience about 25% difference in performance on websites. 我在网站上的效果大约有25%的差异。 West Europe being the "slow one". 西欧是“缓慢的国家”。

  • Anyone have any information on this? 有人对此有任何信息吗?
  • Hands on experience with difference in performance from region to region? 动手体验不同地区的性能差异?
  • Someone with same setups that could try the same test? 有人使用相同的设置可以尝试相同的测试吗?

Bellow is the simple stress test I ran to check performance. 贝娄是我运行以检查性能的简单压力测试。

    public ActionResult StressTest(int loopCount, int dbLoopCount)
    {
        var sw = new System.Diagnostics.Stopwatch();
        sw.Start();
        if (user.IsAdmin)
        {
            var hashTable = new Hashtable();
            var list = new List<int>();
            var random = new Random();
            for (var x = 0; x <= loopCount; x++)
            {
                list.Add(x);
                for (var i = 0; i <= loopCount; i++)
                {
                    hashTable[i] = list.Where(d => d == random.Next(0, x)).Count(); ;
                    hashTable[i] = list.Where(d => d == random.Next(0, x)).Count(); ;
                    hashTable[i] = list.Where(d => d == random.Next(0, x)).Count(); ;
                    hashTable[i] = list.Where(d => d == random.Next(0, x)).Count(); ;
                    hashTable.Remove(i);
                }
            }
        }
        sw.Stop();
        var loopTime = sw.ElapsedMilliseconds;
        sw.Restart();
        #region DBLoop
        .........
        #endregion
        sw.Stop();
        var dbTime = sw.ElapsedMilliseconds;
        return Json(new
        {
            WS = new
            {
                Loops = loopCount.ToString("N0"),
                Seconds = (loopTime / 1000.0),
                Milliseconds = loopTime
            },
            DB = new
            {
                Loops = dbLoopCount.ToString("N0"),
                Seconds = (dbTime / 1000.0),
                Milliseconds = dbTime
            }
        }, JsonRequestBehavior.AllowGet);
    }

The data base servers are VM's with Linux and MongoDB. 数据库服务器是具有Linux和MongoDB的VM。 The VM's in West Europe are about 35% slower than North Europe counterpart. 西欧的虚拟机比北欧的虚拟机慢35%。 Due to different Linux distribution, partitioning and replica setup, the test are not as valid as the website tests. 由于Linux发行版,分区和副本设置不同,因此该测试不如网站测试有效。 It's hard to explain a 35% reduction in DB performance by any of the setup factors. 很难解释由于任何设置因素导致数据库性能下降了35%。 It's tempting to think that 25% of that speed reduction are the same reduction I see on websites. 诱人的是,这种速度降低的25%与我在网站上看到的速度降低相同。

I have removed the DB stress test code, it's just consists of simple reads/counts. 我删除了数据库压力测试代码,它仅包含简单的读取/计数。 For the record: I have created 2 different websites in West Europe, and the slower performance is consistent. 作为记录:我在西欧创建了2个不同的网站,并且性能下降的原因是一致的。 Also over several days, I first tested this on Tuesday, same results today. 同样在几天里,我第一次在星期二进行了测试,今天得到了相同的结果。

Welcome to public cloud! 欢迎使用公共云! Noisy neighbours, resource constrictions, transient faults and unexpcted hardware failure! 嘈杂的邻居,资源紧张,瞬时故障和意外的硬件故障!

While all services (Azure and others) offer SLAs on availability most don't offer minimum performance thresholds for services unless this is being specifically sold as a premium benefit (such as Azure Premium Storage which offers guaranteed minimum disk IOPS). 尽管所有服务(Azure和其他服务)都提供可用性方面的SLA,但大多数服务并不提供服务的最低性能阈值,除非这是作为溢价收益专门出售的(例如Azure Premium Storage提供有保证的最低磁盘IOPS)。 The provider will guarantee availability based on you meeting basic design concepts, but rarely offer guaranteed performance. 提供者将根据您满足基本设计概念的情况来保证可用性,但很少会提供保证的性能。

You could try redeploying the solution in the DC that is appearing to be slow. 您可以尝试在似乎缓慢的DC中重新部署解决方案。 This may mean you are deployed to another host in the DC and avoid either a noisy neighbour or a host that is having problems. 这可能意味着您已部署到DC中的另一台主机,并且避免了嘈杂的邻居或出现问题的主机。 If you find a redeployment doesn't resolve your problem you might want to open a support ticket about the issue. 如果发现重新部署不能解决问题,则可能需要打开有关该问题的支持记录。

I feel less alone... I experienced the same thing jca. 我感到不那么孤单了……我经历了同样的事情。 Big difference, my insert speed is about 2x faster in North Europe. 差异很大,在北欧,我的插入速度快大约2倍。

I guess it is "normal". 我猜这是“正常”的。

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

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