Performance Tuning - Retrieving Average CPU Usage?
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
Similar Messages:
Feb 5, 2010
I've been tasked with looking into performance tuning my company's intranet server. It runs DotNetNuke which suffers from poor performance. It also runs a number of other web apps (mix of asp and asp.net).
Could anybody give me a brief list of common performance tweaks that can be made to IIS6?
View 1 Replies
Dec 6, 2010
I have database with 40 big tables.In each stored procedure query is containing minimum 6 joins.The query is taking too much time to execute.I didn't implemented views and indexes.
View 2 Replies
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
Dec 3, 2010
I am able to sum an entire column and put the total in a column, but what if i want to get the average of all the numbers in the column?
[code]....
View 1 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
Dec 14, 2010
There are two tables 1)HR_OrderRequest (column to be considered is HRdate) other columns are HRUID,UID
2)HR_Supplydetails(colmn to be considered is HRUID) other columns are createddttm,UID
by considering the date from HR_Supplydetails we should find the average days taken for that particular UID time taken to release of HRdate .I have a problem getting a average of days
View 2 Replies
Nov 25, 2010
how can we find avg in matrix row wise? that is i want find the average of data at the end of a row.
View 1 Replies
Mar 4, 2011
I have two datetime2(1) fields in my db. I will calculate the time in hours and minutes between them. That I have done this way:
[Code]....
This works. But how can I calculate the avgerage speed if I have drived 665 kilometers in this time? I know how to do it with only houurs but not with the minutes to. I have tried this and I think it works. Is it correct?
[Code]....
View 2 Replies
Feb 26, 2010
how to calculate 3 days average
View 4 Replies
Jul 23, 2010
There are various website speed test online tools available. Few of them are listed on: [URL] I tested my website using iweb and selfseo. My website is showing 0.03KB Average speed per KB everywhere. Even google also is giving same kind of results.I tested the site using Page Speed and YSlow. I have already followed most of the recommendations suggested by these tools like efficient use CSS, contents across the domains, caching, compression and all. But still I am getting the same average speed per kb. Page speed is showing around 85/100 as my page speed score, so I guess I have optimized my site a lot. My questions here are:
1. What are the other factors affecting the avg speed per kb of a website?
2. How to improve the Avg speed per kb?
3. Is there anything related with the Server Software and Hardware that I have to check?
Note: I tested by uploading a plain html page with simple text "Hello World", but the avg speed per kb is the same for this page as well. Same is the case with the rest of the pages.
Application Platform : ASP.Net 3.5, C#3.0, LINQ as Data Access, SQL Server 2008
Server Platform : Windows Server 2003.
View 2 Replies
Nov 29, 2010
how can we find average at the right side of datas in a matrix. I created matrix and by right clicking on the cell , there is 'Subtotal' But after cliking that dont get any sum, but only last value is displayed as sum. How can i resolve this?
View 1 Replies
Jul 1, 2010
I have a gridview, I am binding the gridview with a datatable and in the gridView, my autogenerateColumn is set to true since I am generating the columns dynamically coming from database. I am also doing doing showFooter =true. There are values in the rows of these dynamically generated columns. I need to calculate the average of each of these columns and display it in the footer. so for e.g, I have
A B C
10 11 12
13 14 15
16 12 11
-- -- --
13 12.3 12.6
View 19 Replies
Feb 18, 2011
I have a table that includes a state column and a price column.
I am able to obtain the average price from a particular state using:
SELECT avg(Price)
FROM MainTable
WHERE StateId=x
I would like to display the average price from each state. The only way I know of doing this is 50 seperate datasource controls. Is there another way?
View 1 Replies
Aug 4, 2010
I am having some issues with the performance. I am binding a Gridview with around 200 records and it is taking a long time. At one time I only display 10 records on the page, but I bind all the 200 records.
Generally what is the number of records that should be bound to a gridview ?
View 2 Replies
Jan 10, 2010
I want to calculate average time to cover a duration of a route.
A route can have multiple trip between different time slots.
trip have TripStartTime and TripEndTime.
For more clear of the Qns for Qns please go to this URL and for table structure please go to this Url.
Trip Time = TripEndTime - TripStartTime from columnin the table.
I have to calculate Actual trips time for different time slots group by Fleet Id which is related to route no in another table..
View 2 Replies
May 7, 2010
I have a small table that has ratings for a album let's say.
Instead of showing the rating from 1-4 I want to show start instead
Rating 1 the 1 star
Rating 3 3 stars
Rating 0 no star
etc.
I have an tiny int field in the table and I will make a drop down list to allow 0-4
Currently I have a list view to show the list of comments and ratings but not sure how to convert the 0-4 from tiny int to a the same amount of stars
View 2 Replies
Jun 2, 2010
I have created a student webpage with many tables like student info,test1 marks,test 2 marks and so on now i have to generate a report for each and every student with their details and average marks in each subject
View 4 Replies
Aug 17, 2010
I always have problem with the conception of flush who knows exactly what it means eg:
[Code]....
View 1 Replies
Dec 6, 2010
i want to make some questions about asp.net MVC,actually,i am not familiar with web developing.
But,i am assigned for web part.we are using like this.first,we create get set
properties for person data
public class Person
{
public int personID {get;set;}
public string personName {get;set;}
public string nric {get;set;}
}
and then after login,we put data in that class and we use RedirectToAction method like this,
return RedirectToAction("profile","person",new { personID = Person.personID});
it's working normally,but,parameter are shown at URL,how i hide them and also can i hide action name?
View 2 Replies
Oct 19, 2010
how we write this code of C# in vb.net .i want to right this code in vb.net
[Code]....
View 5 Replies
Nov 27, 2010
We have a web application based on asp.net 1.1. We deployed it on a web server but there is a problem about it. In the webserver sometimes cpu usage is increasing to 100% and outofmemory exception is occuring.
I think there are some wrong code inside the project but i don't know where it's.
Now, i want hear your advices about how to find problem and what kind of codes make cpu usage increased.
View 2 Replies
Nov 15, 2010
I have a web server with more than a few ASP.NET sites running on it. Every so often, i notice that IIS is pushing the server's CPU to 100%. The sites share application pools, per .NET version they are running.
What i'm looking for is a way to be able to pinpoint which site it is that is doing this, using some tool. If that tool happened to get down into the code to show it, that would also be nice. If not, i'm happy just knowing which site is causing the issue.
I've already tried using ANTS. However, with ANTS you need to know which site it is, and then have it running and waiting on said CPU-crashing web app. Not perfectly ideal.
View 4 Replies