Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Threads cpu usage problem

Status
Not open for further replies.

Kaysen

Programmer
Apr 29, 2003
3
HR
Hi all,
I'm running a high-priority application with two threads, no priorities set on threads. I get weird cpu usage behaviour

1. thread 2.thread CPU usage
-------------------------------------------
c# c# 50%-50%
sql c# 50%-50%
c# sql 50%-2%
Wait(Idle) sql 97%-3%
Wait(Idle) sql(sprocs) 50%-50%

(sql means simple insert statements with ExecuteNonQuery).
Server runs only this application, no other processes are taking place. Anybody have an idea? Any help would be highly appreciated, thanks in advance
 
You don't say what OS you're running, but NT/2K/XP use a dynamic thread allocation algorithm to prevent threads from starving. Under NT 3.5, 3.51, and 4, all threads at the same priority level would round-robin. Under Win2k and XP, Microsoft changed it, but I don't know what the new scheme is.

Don't forget that when you're making a SQL call, as far as the OS is concerned, it's a blocking call (typically that thread is waiting on a network call to return).

I wouldn't worry about it.

Chip H.
 
It seems there's an SQLServer bottleneck problem, I have to do some additional monitoring of the application to find out. If I come across something usefull, I'll post it here. Thanks for the quick reply :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top