Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
Hi There
We just moved one of our .Net applications from a Windows 2003 Server to a virtual Windows Server 2008 R2 (64Bit, VMWare).
 
This application is a simple console application running on .Net Framework 4.0, 32Bit, that runs different jobs to select, modify and save business data to a database. For the database we use SQL 2008 R2.
 
Since we run the application on the Windows Server 2008 R2 we recognized, that the execution of Select-Statements with LINQ to SQL are slower than on the Windows Server 2003 we used before. We checked it with a simple LINQ Query, and that tooks about 500 milliseconds longer on Win 2008.
 
We use the System.Data.Linq.DataContext and get Objects from the Database with the Method GetTable().
 
To compare te duration we took the time from creating the datacontext until the mapping from the DB-Objects back to the .Net-Objects in the application.
See the code:
 
System.Data.IDbConnection testConnection;
            System.Data.Linq.Mapping.MappingSource testMappingSource;
            ...
            ...
            using (System.Data.Linq.DataContext dc = new System.Data.Linq.DataContext(testConnection, testMappingSource))
            {
                dc.DeferredLoadingEnabled = false;
 
                return  = (from dbObject in dc.GetTable<testtable>()
                          select dbObject).FirstOrDefault();
            }</testtable>
 
On the Windows 2008 R2 Server, the .Net Framework 4.0 is installed, and in the server features the .Net Framework 3.5.1 Features are enabled.
 
The application was installed on three different stages (Dev, Test, Production) on three Windows 2003 Server. Now it runs on three virtual Windows 2008 R2 Server. We have the same Problem on all three Windows 2008 R2 Server. And we even tested it on a physical Windows 2008 R2 Server; same Problem there.
 
Has anynone an idea what causes this difference? And what may be solution to resolve this problem?
 
Thanks a lot in advance!
Greets
Tom
Posted 1-Sep-11 23:48pm
Edited 1-Sep-11 23:52pm
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

From what I gather from your description you are running your tests in a VM now, if this is the case a slower time is to be expected.
  Permalink  
Comments
aeschli666 at 2-Sep-11 10:03am
   
We assume that too. But we also made the same tests on physical windows 2008 R2 server, and there we got the same problem.
Mehdi Gholam at 3-Sep-11 0:17am
   
That is interesting... in my experience windows 2008r2 is faster on the same hardware.
 
To narrow down your problem:
 
Q1) Try splitting your test into memory/cpu , network access and disk access stages to see which part is slower
 
Q2) Have you installed all the latest drivers on your machine.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

One place to look at is the SQL Server profiler. Check if the statement is the same from both 'clients' or does it have differences.
 
If both clients generate the same SQL statement then you could also check client side settings. For example, if you're fetching lot's of data, the network packet size should possibly be modified to be the same as in the 2003 server.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 277
1 Maciej Los 240
2 DamithSL 200
3 Raul Iloc 185
4 Richard MacCutchan 175
0 OriginalGriff 5,130
1 DamithSL 4,197
2 Maciej Los 3,670
3 Kornfeld Eliyahu Peter 3,470
4 Sergey Alexandrovich Kryukov 2,821


Advertise | Privacy | Mobile
Web02 | 2.8.141216.1 | Last Updated 2 Sep 2011
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100