• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

.net2 app and hyperthreading

Red Squirrel

No Lifer
Is there any known issues that anyone has ever heard of with a .net2.0 app constantly using 50% cpu on a HT machine? I run a game server, I got a test, and live, which are exact replicas of each other, only thing thats different is the data itself, but I mirror it regularly. On the test server, which is a VM running on an athlon 2000+ it stays below 5% cpu (of the vm cpu), on the live server, which is a P4 3.4Ghz HT server, it stays at 50% cpu non stop. It's playable, which is surprising, but its just annoying that its using that much cpu even when sitting idle with no one online. Can't be a code issue, since it would be doing it on the test server too (using 100% in that case as its non HT).

So has anyone ever heard of this issue with .Net apps? This particular app is Called RunUO and is very customized, so I may not be able to get help here as its a specialized app, but just checking if maybe this is a known issue with .net apps in general. Like, would I need to recompile it on the box it will be running on? (kind of like in Linux)
 
well whoever made it didn't made it well, very simple. VM on other side can be set up to not take all CPU utilization.

And this has nothing to do with hyperthreading, that app has all execution in a single thread.
 
Theres 2-3 threads in it actually, theres a timer thread (various things can start timers) the socket listener thread then the actual processing thread. The app works fine in the VM, it uses maybe 1-5% of the cpu (of the virtual machine, not the real cpu). But yeah there is lot of badly written stuff in that program and I'm often rewriting parts of it.

I have a feeling theres something that works ok on AMD that does not work well on Intel, and its screwing up. I already ran into this before with floating point operations.
 
Originally posted by: RedSquirrel
Theres 2-3 threads in it actually, theres a timer thread (various things can start timers) the socket listener thread then the actual processing thread. The app works fine in the VM, it uses maybe 1-5% of the cpu (of the virtual machine, not the real cpu). But yeah there is lot of badly written stuff in that program and I'm often rewriting parts of it.

I have a feeling theres something that works ok on AMD that does not work well on Intel, and its screwing up. I already ran into this before with floating point operations.

even if there is such thing, and it seems highly improbable that difference between CPUs would matter more than 10-20%, it is still faulty code.

 
Turns out there was actually a check in the main loop for if its dual or single cpu if its dual, it would NOT call the sleep function. So what I had was an infinite loop with no delays. Whoever wrote that part is an idiot. Fixed now. Idling at 0% cpu usage like it should now.
 
Back
Top