网站迁移和 Firebug 时间配置文件的差异

发布于 2024-08-18 17:12:29 字数 686 浏览 1 评论 0原文

我在 apache 下有一个 php 网站(位于enginehosting.com)。我用asp.net MVC重写了它并安装在discountasp.net上。我正在将响应时间与萤火虫进行比较。

这是旧的配置文件:

这是新的配置文件:

基本上,我对新网站的响应时间更长(在我在这里发布的图片上并不明显,但平均而言是的,有时会有很大的差异,例如 2 秒)旧网站为 9,新网站为 9),并且图像会更加渐进地出现(与旧网站几乎立即出现相反)。而且,时间概况也完全不同。正如您在第二张图片中看到的,DNS 搜索花费了很长时间,并且这种情况仅发生在图像上(新站点上的原始 html 甚至更快)。我认为一旦 url 被解析,那么它将应用于所有后续请求...

另请注意,由于我在测试时仍然希望将我的域名指向旧位置,所以我的新网站位于奇怪的 URL,如 myname.web436.discountasp.net。会不会是这个原因呢?否则,还有什么?

如果这更多的是服务器故障问题,请随意移动它。

谢谢

I have a php web site under apache (at enginehosting.com). I rewrote it in asp.net MVC and installed it at discountasp.net. I am comparing response times with firebug.

Here is the old time profile:

Here is the new one:

Basically, I get longer response times with the new site (not obvious on the pictures I posted here but in average yes with sometimes a big difference like 2s for the old site and 9s for the new one) and images appear more progressively (as opposed to almost instantly with the old site). Moreover, the time profile is completely different. As you can see on the second picture, there is a long time passed in DNS search and this happens for images only (the raw html is even faster on the new site). I thought that once a url has been resolved, then it would be applied for all subsequent requests...

Also note that since I still want to keep my domain pointed on the old location while I'm testing, my new site is under a weird URL like myname.web436.discountasp.net. Could it be the reason? Otherwise, what else?

If this is more a serverfault question, feel free to move it.

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

北方的韩爷 2024-08-25 17:12:29

不幸的是,你在这里比较苹果和橙子。显示的测试结果没有什么用处,因为您正在尝试比较在不同托管公司的共享平台上使用不同技术编写的应用程序的性能。

我们可以推测可能存在差异的多种原因:

  • ASP.NET MVC 由于预热和编译而首次命中和滞后
  • 您在 DiscountASP 上托管的服务器可能负载过重
  • EngineHosting 的服务器可能未充分利用
  • DiscountASP 上的可用带宽可能会受到争夺。
  • 您可能需要分析和优化您的代码
  • ……等等。

但是,除非您在同一台机器上对这两个应用程序进行基准测试,否则您就无法进行适当的科学比较,并且会陷入困境。

最后,忽略 myname.web436.discountasp.net 网址,这只是 DiscountASP 和许多其他托管服务商添加的主机名/标头,以便您在等待域名转移时可以测试您的网站/registered,或者用于完成真实域名的DNS传播。您通常无法使用站点的 IP 地址,因为大多数共享托管商在同一服务器上的多个站点之间共享单个 IP 地址并使用 HTTP 主机标头。

Unfortunately you're comparing apples and oranges here. The test results shown are of little use because you're trying to compare the performance of an application written using a different technology AND on a different hosting company's shared platform.

We could speculate any number of reasons why there may be a difference:

  • ASP.NET MVC first hit and lag due to warmup and compilation
  • The server that you're hosting on at DiscountASP may be under heavy load
  • The server at EngineHosting may be under utilised
  • The bandwidth available at DiscountASP may be under contention
  • You perhaps need to profile and optimise your code
  • ...and so on.

But until you benchmark both applications on the same machine you're not making a proper scientific comparison and are going to be pulling a straws.

Finally, ignore the myname.web436.discountasp.net url, that's just a host name/header DiscountASP and many other hosters add so you can test your site if you're waiting for a domain to be transferred/registered, or for a DNS propagation of the real domain name to complete. You usually can't use the IP addresse of your site because most shared hosters share a single IP address across multiple sites on the same server and use HTTP Host Headers.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文