.NETGURU
.NET app is slower on dual processor machine
Messages   Related Types
This message was discovered on microsoft.public.dotnet.framework.performance.
Responses highlighted in red are from those people who are likely to be able to contribute good, authoratitive information to this discussion. They include Microsoft employees, MVP's and others who IMHO contribute well to these kinds of discussions.
Post a new message to this list...

Bimal Fernando via .Net Guru (VIP)
Hi I created an Application which runs slowly on our Dual processor machine which is a part of a two node cluster too.

To see whether it's a .NET problem i created another test app as below.
            long Start = DateTime.Now.Ticks;
            for (int i=0;i<=1000;i++)
            {
                Console.WriteLine("Print Something >" + i);
                Thread.Sleep(10);
            }
            long End = DateTime.Now.Ticks;
            long Diff = End - Start;
            Console.WriteLine("Time Taken is : " + Diff.ToString());

This runs on my PC about 3 seconds faster than the server. Is this a known problem? any solutionm for this.
I have installed the .NET 1.1 run time on this server but did not restart (it didn't ask me to restart)

please help me to solve this issue.
Thanks in advance.
--------------------------------
From: Bimal Fernando

-----------------------
Posted by a user from .Net Guru (http://www.dot-net-guru.com/)

<Id>fk/2Wb1Dk0SQVwF/afehSw==</Id>
Reply to this message...
 
    
Juan (VIP)
It's not unusual that this application run slower in an MP configuration.
Have you perchance analyzed the code that ultimately gets executed to see the
code that gets executed when running on a UP box vs an MP box? Aren't
Console.WriteLine operations inherently serialized?

ALso, the CLR recognizes whether it's running in a UP or MP configuration.
In the MP configuration, on x86, the atomic operations (like cmpxchg) that
the runtime uses are prefixed by 'lock' whereas in the UP mode they're not.
Lock prefixes are expensive are not needed in UP configurations...

Other differences such as the OS kernels between UP and MP modes apply here
as well...

Reply to this message...
 
 
System.Console
System.DateTime
System.Threading.Thread




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification