IIS下的性能不佳 [英] Poor performance under IIS

查看:56
本文介绍了IIS下的性能不佳的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好


我有一个应用程序可以从sql server收回1000条记录

数据库。在本地asp.net开发服务器下提供

Visual Studio 2008,大约需要1.8秒


当我将此应用程序放在IIS中时需要16秒确切的

位代码。我已将代码缩小到围绕

数据集进行循环,并为数据集中的每一行创建一个对象。我的

问题是为什么它在IIS下花了这么长时间而不是在当地的

asp.net开发服务器下呢?


有任何想法吗?我怎样才能将这16秒降低到更可接受的

等级,例如2-3秒?这是配置问题吗?我已经尝试过将这个部署到2个不同的IIS服务器并且相同的代码位

在两个IIS盒子上花费16秒


该应用程序是使用.net framewor 3.5和c#开发的,asp.net


Ilyas

Hi all

I have an application which brings back 1000 records from a sql server
database. Under the local asp.net development server provided with
Visual Studio 2008, it takes about 1.8 seconds

When I place this application in IIS it takes 16 seconds for the exact
bit of code. I have narrowed the code down to loopoing around the
dataset and creating an object for every row in the dataset. My
question is why does it take so long under IIS but not under the local
asp.net development server?

Any ideas? How can I get this 16 seconds down to a more acceptable
level eg 2-3 seconds? Is this a configuration issue? I have tried
deploying this to 2 different IIS servers and the same bit of code
takes 16 seconds on both IIS boxes

The application is developed using .net framewor 3.5 and c#, asp.net

Ilyas

推荐答案

"伊利亚斯" < il *** @ igsoftwaresolutions.co.ukwrote in message

news:36 ************************* ********* @t54g2000 hsg.googlegroups.com ...
"Ilyas" <il***@igsoftwaresolutions.co.ukwrote in message
news:36**********************************@t54g2000 hsg.googlegroups.com...

我有一个应用程序从sql server收回1000条记录

数据库。在本地asp.net开发服务器下提供

Visual Studio 2008,大约需要1.8秒


当我将此应用程序放在IIS中时需要16秒确切的

位代码。我已将代码缩小到围绕

数据集进行循环,并为数据集中的每一行创建一个对象。我的

问题是为什么它在IIS下花了这么长时间而不是在当地的

asp.net开发服务器下呢?


有任何想法吗?我怎样才能将这16秒降低到更可接受的

等级,例如2-3秒?这是配置问题吗?我已经尝试过将这个部署到两个不同的IIS服务器上,并且需要相同的代码。

在两个IIS框上花费16秒
I have an application which brings back 1000 records from a sql server
database. Under the local asp.net development server provided with
Visual Studio 2008, it takes about 1.8 seconds

When I place this application in IIS it takes 16 seconds for the exact
bit of code. I have narrowed the code down to loopoing around the
dataset and creating an object for every row in the dataset. My
question is why does it take so long under IIS but not under the local
asp.net development server?

Any ideas? How can I get this 16 seconds down to a more acceptable
level eg 2-3 seconds? Is this a configuration issue? I have tried
deploying this to 2 different IIS servers and the same bit of code
takes 16 seconds on both IIS boxes



1)当代码在开发服务器上运行时,数据库是否也是连接到开发服务器上的



2)当代码在远程服务器上运行时,数据库是否连接到另一台远程服务器上?
?如果是这样,你有网络

问题。另外,它是什么数据库以及你如何连接它?


3)你能更具体地说明你的意思吗?绕过

数据集?这里到底发生了什么?


4)你能否确认,无论瓶颈在哪里,它都不在实际的数据检索中来自数据库...?

-

Mark Rae

ASP.NET MVP
http://www.markrae.net

1) When the code is running on the development server, is the database it''s
connecting to also on the development server?

2) When the code is running on the remote server, is the database it''s
connecting to on a different remote server? If so, have you got networking
issues. Also, what database is it and how are you connecting to it?

3) Can you be a bit more specific about what you mean by "looping around the
dataset"? What is actually happening here?

4) Can you confirm that, wherever the bottleneck is, it''s not in the actual
retrieval of the data from the database...?
--
Mark Rae
ASP.NET MVP
http://www.markrae.net


6月20日17:02,Mark Rae [MVP]" < m ... @ markNOSPAMrae.netwrote:
On 20 Jun, 17:02, "Mark Rae [MVP]" <m...@markNOSPAMrae.netwrote:

" Ilyas" < il ... @ igsoftwaresolutions.co.ukwrote in message


news:36 ********************* ************* @ t54g2000 hsg.googlegroups.com ...
"Ilyas" <il...@igsoftwaresolutions.co.ukwrote in message

news:36**********************************@t54g2000 hsg.googlegroups.com...

我有一个应用程序可以从一个带回来的1000条记录sql server

数据库。在本地asp.net开发服务器下提供

Visual Studio 2008,需要大约1.8秒
I have an application which brings back 1000 records from a sql server
database. Under the local asp.net development server provided with
Visual Studio 2008, it takes about 1.8 seconds


当我放置这个应用程序在IIS中需要16秒才能获得确切的

位代码。我已将代码缩小到围绕

数据集进行循环,并为数据集中的每一行创建一个对象。我的

问题是为什么在IIS下花了这么长时间而不是在本地

asp.net开发服务器下呢?
When I place this application in IIS it takes 16 seconds for the exact
bit of code. I have narrowed the code down to loopoing around the
dataset and creating an object for every row in the dataset. My
question is why does it take so long under IIS but not under the local
asp.net development server?


有什么想法吗?我怎样才能将这16秒降低到更可接受的

等级,例如2-3秒?这是配置问题吗?我已经尝试过将这个部署到2个不同的IIS服务器上,并将相同的代码部分

在两个IIS框上花费16秒
Any ideas? How can I get this 16 seconds down to a more acceptable
level eg 2-3 seconds? Is this a configuration issue? I have tried
deploying this to 2 different IIS servers and the same bit of code
takes 16 seconds on both IIS boxes



1)当代码在开发服务器上运行时,数据库是否也是连接到开发服务器上的



2)当代码在远程服务器上运行时,数据库是否连接到另一台远程服务器上?
?如果是这样,你有网络

问题。另外,它是什么数据库以及你如何连接它?


3)你能更具体地说明你的意思吗?绕过

数据集?这里到底发生了什么?


4)你能否确认,无论瓶颈在哪里,它都不在实际的数据检索中来自数据库...?


-

Mark Rae

ASP.NET MVPhttp://www.markrae。 net


1) When the code is running on the development server, is the database it''s
connecting to also on the development server?

2) When the code is running on the remote server, is the database it''s
connecting to on a different remote server? If so, have you got networking
issues. Also, what database is it and how are you connecting to it?

3) Can you be a bit more specific about what you mean by "looping around the
dataset"? What is actually happening here?

4) Can you confirm that, wherever the bottleneck is, it''s not in the actual
retrieval of the data from the database...?

--
Mark Rae
ASP.NET MVPhttp://www.markrae.net



他们没有网络问题,因为获取

数据没有问题。


是的,整个过程中使用的是同一个数据库。我已经使用过Sql

Prolfiler并且可以确定它不是sql服务器造成延迟的延迟。 Sql server在一秒钟之内拆分记录

循环数据集,我的意思是对于数据集中的每一行,我是创建一个企业的
对象,并设置其属性。问题是

当在IIS中部署执行此操作的代码时,在asp.net开发服务器(内置于visual studio中)所需的代码大约需要16 b / b
秒/>
2008 web服务器)它需要2秒。我已经使用

trace.axd确定了这个,并且我已经在各个阶段编写了自定义消息
这个过程的
。为什么时间上会有这么大的差异?


因为它的企业网站可以提供比这更好的时间

服务器......?

They are no networking issues as there is no problems fetching the
data.

Yes the same database is being used throughtout. I have used Sql
Prolfiler and can definatly confirm that its not sql server causing
the delay. Sql server splits out the record in under a second

By looping around the dataset, I mean for each row in the dataset,I am
creating a business object, and setting its properties. The problem is
when the code to do this is deployed in IIS the code it takes about 16
seconds while under asp.net development server (built in visual studio
2008 web server) it takes 2 seconds. I have determined this using
trace.axd with custom messages that I have written at various stages
of this process. Why is there such a big difference in the times?

Surly IIS would give better timings than this as its an enterprise web
server...?


" Ilyas" < il *** @ igsoftwaresolutions.co.ukwrote in message

news:e0 ************************* ********* @ m44g2000 hsc.googlegroups.com ...
"Ilyas" <il***@igsoftwaresolutions.co.ukwrote in message
news:e0**********************************@m44g2000 hsc.googlegroups.com...

通过循环数据集,我的意思是对于数据集中的每一行,我是创建业务对象并设置其属性的
。问题是

当在IIS中部署执行此操作的代码时,在asp.net开发服务器(内置于visual studio中)所需的代码大约需要16 b / b
秒/>
2008 web服务器)它需要2秒。我已经使用

trace.axd确定了这个,并且我已经在各个阶段编写了自定义消息
这个过程的
。为什么时代会有这么大的差异?
By looping around the dataset, I mean for each row in the dataset,I am
creating a business object, and setting its properties. The problem is
when the code to do this is deployed in IIS the code it takes about 16
seconds while under asp.net development server (built in visual studio
2008 web server) it takes 2 seconds. I have determined this using
trace.axd with custom messages that I have written at various stages
of this process. Why is there such a big difference in the times?



无法了解更多关于业务对象的信息

以及如何创建它们......无法告诉...


Surly IIS会提供比这更好的时间,因为它是一个企业网站
服务器......?
Surly IIS would give better timings than this as it''s an enterprise web
server...?



不一定......当你使用VS.NET开发服务器时,你是唯一的用户
。除了这个

app之外,IIS盒子还用于其他任何东西......

-

Mark Rae

ASP.NET MVP
http://www.markrae.net

Not necessarily... When you''re using the VS.NET development server, you''re
the only user. Is the IIS box being used for anything else other than this
app...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net


这篇关于IIS下的性能不佳的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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