Solved

Barely any CPU used for ASP.NET/MySQL application

Posted on 2008-10-19
5
276 Views
Last Modified: 2012-06-21
I'm building an import utility for ASP.NET and MySQL. It imports contacts from a CSV or XLS file. The problem is my local dev machine (Windows 2K3, IIS 6, Celeron 1.8 ghz single core) imports contacts about 10 times faster than our server (Windows 2K8, IIS 7, 8-core intel xeon). I've noticed that when running this import on the server, it doesn't even use 1% of the processor, while my dev machine uses a lot more.

This import tool is pretty intense and a lot is going on with it. Is there some sort of processor cap that I can modify? I obviously don't want it using all 8 cores at once, but it doesn't even crack 1% cpu usage during the import operation and as a result is causing import operations to take incredibly long to complete.

Any ideas? Thanks.
0
Comment
Question by:redheaded
  • 2
5 Comments
 
LVL 51

Expert Comment

by:tedbilly
ID: 22755238
The biggest difference between and server and a workstation is that a server has to potentially deal with hundreds of requests at a time and workstation only one.

Because a server can't predict when the next request is coming they are conservative about rationing out CPU time.  Even if it was possible to modify the logic I wouldn't do it.

There could be other factors at play on your server.  For example, an AntiVirus solution on a server, firewalls et cetera can slow local file access that is outside the boundaries of a typical web application.

I'd suggest you use a free tool like 'Spotlight for Windows' from Quest software to see if there are I/O or other bottlenecks.
0
 

Author Comment

by:redheaded
ID: 22758331
I'll try that software.

What about understanding "queries per second"? How can I determine my average for both machines for comparison? Is there a manual way to change this, if there's a cap? Thanks.
0
 
LVL 51

Accepted Solution

by:
tedbilly earned 500 total points
ID: 22760520
Hmm, this is tricky to explain but I'll try.  Changing the maximum workload the server can handle will not change the percentage assigned to each query.

Let's say that at 100% CPU usage the server can handle 100 queries.  So, that means at peak capacity 1 query uses 1% of resources.  If I set a web application to only process a maximum of 20 queries it doesn't mean that at peak capacity those 20 queries have 5% capacity as a maximum.  Setting a maximum capacity doesn't automatically increase the maximum CPU given to each query.

What you are asking for is a way to control the core preemptive multi-tasking scheduling within Windows.  In my experience there is no way to control it.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now