在Windows Server 2012上托管网站似乎很慢 [英] Hosting web site on Windows Server 2012 seems slow

查看:90
本文介绍了在Windows Server 2012上托管网站似乎很慢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的一位客户在Xeon E5-2640 v2 @ 2.00GHz服务器上托管了他们的网站,其中包含32GB Ram,大多数用户同时可以访问30-40个用户。页面上也没有图像或视频,所以我想知道为什么加载页面这么慢?该页面主要只包含文本,但在数据库中有很多存储过程。



我注意到的是我的其他一些客户端托管了相同的内容使用带有i7处理器和8-16GB内存的台式电脑的网站,与上述情况相比,它们都运行得更快。我是否需要专门优化代码才能在服务器上正常工作?

解决方案

不,你需要对流量进行一些分析才能找到瓶颈所在是。



我把它作为生产数据库服务器,网络服务器是两台不同的机器。



遵循从浏览器的入站请求开始的流量。使用网络嗅探器获取请求何时进入以及响应何时消失的时间。这是你必须考虑的时间窗口,每毫秒。



按照从网络应用程序到数据库的流量返回。浏览器请求何时开始?该请求生成了多少个查询?第一个查询发送到数据库的时间有多长?上次查询发送多长时间?处理需要多长时间?数据库响应开始多长时间?从数据库返回多少数据? Web应用程序是否需要所有数据来完成请求的工作?发送数据库响应的最后一个字节需要多长时间?该页面处理所有这些数据需要多长时间?



有很多工作要做,各种嗅探器和分析器将被要求缩小范围。

One of my client hosted their web site on a Xeon E5-2640 v2 @ 2.00GHz Server with 32GB Ram, mostly accessed by 30-40 users at the same time. There are no images or videos on the page either, so I'm wondering why is it so slow to load the page? The page mainly consists only text, but with quite a lot of stored procedure working in the database.

And what i noticed is that some of my other client hosted the same site using Desktop PC with i7 processor and 8-16GB of ram, and they all ran faster compared to the above scenario. Do I need to specifically optimize the code in order to work properly on the server?

解决方案

No, you need to do some analysis of the traffic to find where the bottleneck is.

I take it the production database server and the web server are two different machines.

Follow the traffic starting with the inbound request from the browser. Use a network sniffer to get timings of when the request comes in and when the response goes out. This is the window of time that you have to account for, every millisecond.

Follow the traffic from the web app to the database and back. When does the browser request start? How many queries are generated by that request? How long until the first query is sent to the database? How long until the last query is sent? How long does that take to process? How long until the database response starts? How much data is coming back from the database? Does the web app need all of that data to do its job for the request? How long until the last byte of the database response is sent? How long does the page take to process all this data?

There's a lot of work to do and various sniffers and profilers are going to be required to narrow it down.


这篇关于在Windows Server 2012上托管网站似乎很慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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