Performance - IIS7 Obtaining CPU Usage Per Request?
Feb 17, 2011
I have an asp.net application running on a production server.
The cpu usage on the server is very high, 80-90%.
Each request however does not appear to be taking too long, unless the cpu has peaked at 100%.
I need to obtain some profiling data in order to determine if the high cpu usage is due to a small number of high cpu requests, or, if it is just general high load.
I can add more cores to the machine and also web farm the app but I will need evidence in order to justify any costs and future proofing the performance.
Is there a way of logging to a file the CPU usage for each page request?
View 1 Replies
Similar Messages:
Jul 22, 2010
I'm currently developing a few ASP.NET MVC2/.NET 3.5SP1 web-services that are mostly IO bound (execute a couple HTTP back end calls + DB write per request) and i'm getting really poor load-testing performance.
To make sure it wasn't something in my application, I created a brand new ASP MVC 2 project (project -> new -> "ASP.NET MVC2 Web Application", based on .NET 3.5 SP1), added a "TestController" with the following action:
[Code]....
I deployed this on a dual-core test server, running Win2008 and IIS7, Application Pool set to "integrated mode". I have the following in my C:WindowsMicrosoft.NETFramework64v2.0.50727Aspnet.config:
[Code]....
Just in case, I added the following DWORD key in the registry:
[Code]....
I verified I was able to access my test action from a regular browser and started a load test from another machine on the same network: user load set to 500, no "think" time.
The following is what I observe on the machine running the loadtest after about 8 minutes:
req/s: 5.98avg response time: 78.4 secondsno errors whatsoevernote that the local CPU is 1-2% On the test server, this is what I observe using perfmon:
request current: flat line at 501request execution time: flat line at 1506 ms avg => this makes sense though I don't understand why I see the request coming back after 78 seconds at the other end% proc time avg < 1%request queued as well as all others asp.net v2.0.50727 counters at 0 I don't get it. I believe the expected behavior would be to see about 333 req/s (500/1.5) with a avp response time of 1.5xx seconds...
View 1 Replies
May 24, 2010
Last night I did a load test on a site. I found that one of my shared caches is a bottleneck. I'm using a ReaderWriterLockSlim to control the updates of the data. Unfortunately at one point there are ~200 requests trying to update the data at approximately the same time. This also coincided with CPU usage spikes.
The data being updated is in the ASP.NET Cache. What I'd like to do is if the CPU usage is around 75%, I'd like to just skip the cache and hit the database on another machine.
My problem is that I don't know how expensive it is to create a new performance counter to check the cpu usage. Also, if I would probably like the average cpu usage over the last 2 or 3 seconds. However, I can't sit there and calculate the cpu time as that would take longer than it's taking to update the cache currently.
Is there an easy way to get the average CPU usage? Are there any drawbacks to this?
I'm also considering totaling the wait count for the lock and then at a certain threshold switch over to the database. The concern I had with this approach would be that changing hardware might allow more locks with less of a strain on the system. And also finding the right balance for the threshold would be cumbersome and it doesn't take into account any other load on the machine. But it's a simple approach, and simple is 99% of the time better.
View 1 Replies
Oct 26, 2010
I'm running a Windows 2008 server (a VPS with 1GB of RAM), with SQL Server Express and IIS 7 installed. On it I'm hosting a NopCommerce 1.7 website, with a database of around 26 000 products.
Right now I'm the only user of the website (it's in development) and I'm getting rather bad performance from it. To be more specific every time I make a request, the worker process goes to 90-100% CPU usage for a few seconds. Is it me or this is a lot for a 1 user NopCommerce website?
PS: the worker process uses between 100MB-400MB of memory (private working set), and SQL Server with this database, around 160MB.
View 2 Replies
Sep 17, 2010
I have some serious performance Issues with Windows controls loading first time on IE Browser then subsequent request's. When ever i open Browser first time , mywebsite takes 7 seconds to load, but on subsequent request without closing browser it loads with-in 2 seconds.I Knew IIS on first time it re-compiles the process and for subsequent request's it wont perform and it cahches .I'm looking for better options to improve performance, when ever first time reqest's comes to web server.
On IIS 7 Server,I was using both Dynamic and Static compression enabled.Also,On application pool ,I set "ShutDown Time(Limit)" and "Startup Time(Limit") to 90 (seconds).Here is web.config i disable below to improve performance issues.
<trace enabled="false" pageOutput="false" />
<compilation debug="false"/>
Here is the Server Configuration
Windows 2008 Server
IIS 7 64 bit
Upto Date patches.
.Net Framework 2.0,3.0,3.5
Need inputs to improve performance when user call website for first time.
View 2 Replies
Feb 5, 2011
I took a copy of a website that works fine on a server (done have server access) but when I set up a website in IIS7 and run the classic asp code loading a page is taking nearly a minute. It always loads the pages but just takes forever.
View 1 Replies
Mar 12, 2010
I am using MVC 2, IIS7 on Vista Ultimate.In the VS2008, my application return ip address: 127.0.0.1
but, after deployed and published to IIS7 server, I got ip address: ::1
View 2 Replies
Feb 14, 2011
As an extensibility option for my web application I would like to allow the user to add sections to it by simply making new folders and uploading files to them. So, for instance, if they created (in the webroot): /UserContent/StaticPages/First/Second/index.txt. Then in the main menu there would be a new menu point "First" with the submenu point "Second", which would lead to markdown-parsed version of index.txt. This way the user can upload any static menu points he wants (such as "About us", "Contact us", "Our Mission" etc.) Another extensibility point is that I would like them to add headers/footers to specific webpages in a similar fashion. I'm using ASP.NET MVC3, so there are pretty URLs, and it would be easy for the user to just create: /UserContent/Additions/Store/Categories/35/header.txt
And when someone opened [URL] the markdown-parsed header.txt would be prepended. This is simple for the user, and simple for me (I don't need to make sophisticated admin panels and WYSIWYG editors). However I'm worried about the performance. This scheme means that on each GET request I would need to scan the /UserContent/StaticPages folder and check for the existences of the header/footer files (several, because parent levels can have their header.txt/footer.txt as well).
I could cache the result, but then I have to manage the cache and the user will need to know that changes can take up to X minutes to display. Would this be a premature optimization? There won't be much data in those folders, so Windows will probably be able to easily cache their contents itself.
View 1 Replies
Mar 25, 2010
when i was working with IIS 6.0 and windows 2003 Request.ServerVariables["LOGON_USER"] is giving me the current logged in user id,
but now we have upgraded to IIS 7 and Windows 2008 if i use the same statement it is not returning me any value.
NOTE : i am using vs2005 to write my programs.
View 5 Replies
Sep 20, 2010
I have developed a website in asp.net framework 2 . This website is being hosted in two different servers without any change in code. My issue is about the performance of these 2 sites. One website is taking much time for inserting datas to the DB (SQL server 2005). 2 websites are having different DB server.
I think the issue is for the DB server. How can we rectify the DB performance while insertion and Is there any other cause for this permance issue?
View 1 Replies
Apr 29, 2010
I am not sure if this is the right forum. I can not find a forum for LINQ.
I am working on an application using LINQ. Application performance is not up to par and my tests show that it is LINQ queries that are slow. I was wondering if anybody can recommend where I can find an article about optimizing LINQ performance maybe by compilation or other methods.
View 1 Replies
Mar 20, 2011
I am creating a service oriented application where trying to have everything using services....however there is something I am not sure of , I am having a page that calls the database at the page load...so what would be better and faster?? to call database in pageload , or to call wcf service from javascript during javascript load ??btw , I am using a repeater in the page , but I have created somekind of an engine to create the suitable html so...I'll be creating the repeaters html using the wcf and resend it back to the page If I am using a wcf service at the start.
View 1 Replies
Jul 6, 2010
I have certain information in my webconfig such as the name of the database i am connecting to. However, I would like a situation where my aspx is able to obtain that information as well and display it in a label. Hence, how do I go about doing that.
View 3 Replies
Jan 26, 2011
I wish to obtain the domain SID from a user account that has been used to access my web page, but...
In some instances, you dont have access to the HttpContext object to call HttpContext.Current.Request.LogonUserIdentity.User.Value
All the static function is able to accept is a user-name as a string, and a domain-name as a string.
If the domain is left blank, it is amused that the user account name is within the same domain as the IIS server that the process is executing upon. :/
View 2 Replies
Oct 22, 2010
Is it possible to obtain another aspx page's form ID from current page?
StringBuilder sb = new StringBuilder();
StringWriter sw = new StringWriter(sb);
HtmlTextWriter ht = new HtmlTextWriter(sw);
form1.RenderControl(ht);
From here, is it possible that form1 is another page's form1 ID?
View 6 Replies
Dec 24, 2010
In an ASP.NET MVC 2 application, how would I obtain the Type of the controller that would be used, given the information about the route: string action, string controller, object routeValues?
(The routeValues object might look like this new {area="admin"} and route to a controller for a different site area.)
View 1 Replies
Mar 11, 2010
I have an ASP.net/VB.net website, and want to make an inquiry of another website to obtain particular information for use on my site in string format. For example, I have used the code:
Result01 = "http://api.hostip.info/get_html.php?ip=" + Variable01
which only produces the other website address as a string. However, I want to get the actual result of the inquiry as a string. I have experimented with System.Xml.XmlDocument coding, without any luck. the proper coding to get the results of such an inquiry as a string?
View 6 Replies
Jun 3, 2010
commonly on say PHP or other web frameworks getting the total response time is easy, just start the timer at the top of the file and stop it at the end. In ASP.Net there is the whole Page Lifecycle bit though so I'm not sure how to do this. I would like for this response time recording to take place in a master page and the response time show up in the footer of pages. What would be the best way of doing this? Is there something built in to ASP.Net for it? Is it even possible to include the OnRender time?
View 3 Replies
May 6, 2010
I am trying to set up a GridViewUpdate, I need to find the Parameter and I am having trouble figuring it out.
How would I go about obtaining the value for "@ID" parameter in order for the user to update the required "TAUpdateDate" field?
[Code]....
View 5 Replies
Jan 21, 2010
For some reason, some of the fields in our database use a different collation than the default. There doesn't seem to be a pattern as to which fields use the different collations, so I'd like to run a query to find which fields use this collation and change them to the default. Does anyone know how to do this?
View 2 Replies
Apr 27, 2010
I need to get values of all individual cells from the row of a grid view and assign eac one fo them to seperate variables. Should i just access the control values directly from the gridview (the controls are template fields) or is it best to run an sqlq select query for each value i want to retrieve.
View 3 Replies
Jun 13, 2012
I have the problem of Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached.
I am opening and closing SqlConnection properly.
View 1 Replies
Jan 27, 2011
I have an asp.net (FW 3.5) web app that runs on an internal network. One specific page needs to "report" in to the web server that it is active and not locked up. I need to be able to run a script (or something) at the client to report the pc's computer name in that report. I cannot find a method that does this. I found several things that would report the WAN IP or host name, but this appears to all be for external facing sites.
View 1 Replies
Feb 23, 2010
I have a gridview with a column of text boxes bound to a value from a database. I should be able to edit the values in each of the text boxes and just print those new values(dont have to update into the database). But my method returns only the old values, not the new values entered into the text boxes.
View 5 Replies
Jun 13, 2012
I am getting this error:
"timeout expired. the timeout period elapsed prior to obtaining a connection from the pool"
when I am testing my webiste on production server. Its working perfectly on my local machine but not on production.
Sometimes it works and sometimes not.
View 1 Replies