467,925 Members | 1,865 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,925 developers. It's quick & easy.

Windows 2003 Server vs Windows XP

We have an odd situation with some of our single-threaded CPU-bound C++
programs. They run between 2 and 4 times faster on Windows XP than on windows
Server 2003 on the same Xeon hyperthreading dual processor machine (we
borrowed one from our IT department, and have been alternating these two
operating systems on it.)

Even more odd, if we run a Virtual PC with Windows XP on top of the Windows
2003 Server on the same Xeon machine, the programs run faster too. There is
nothing else running on the machine during these tests, both underlying
operating systems show the expected 25% CPU usage.

I've changed the Windows 2003 Server system properties to give the best
performance for programs as opposed to background work, but this made no
difference.

Next I tried running the programs on my Core 2 Duo with Windows XP, and
comparing this with a Virtual PC running Windows 2003 Server on top of
Windows XP on my machine. The programs showed negligible difference in
run-times, and the expected 50% CPU usage.

We think, but are not sure, that the slowing down on 'native' Windows 2003
Server is something to do with memory cache misses. This seems to be the only
thing our profiling tool (AQTime) shows to be substantially different when we
run our programs.

Does anybody have a similar experience? Is this a 'known fact'? Is there
anything we can do to our programs to make them run faster on Windows 2003
Server? I'm not sure I'm asking the right forum, if I'm not where would be
better? We need to move the programs to a Windows 2003 Server production
environment but are very disappointed with the throughput.

Eddie
Oct 8 '07 #1
  • viewed: 4702
Share:
7 Replies
Eddie wrote:
We have an odd situation with some of our single-threaded CPU-bound
C++ programs. They run between 2 and 4 times faster on Windows XP
than on windows Server 2003 on the same Xeon hyperthreading dual
processor machine (we borrowed one from our IT department, and have
been alternating these two operating systems on it.)

Even more odd, if we run a Virtual PC with Windows XP on top of the
Windows 2003 Server on the same Xeon machine, the programs run faster
too. There is nothing else running on the machine during these tests,
both underlying operating systems show the expected 25% CPU usage.

I've changed the Windows 2003 Server system properties to give the
best performance for programs as opposed to background work, but this
made no difference.

Next I tried running the programs on my Core 2 Duo with Windows XP,
and comparing this with a Virtual PC running Windows 2003 Server on
top of Windows XP on my machine. The programs showed negligible
difference in run-times, and the expected 50% CPU usage.

We think, but are not sure, that the slowing down on 'native' Windows
2003 Server is something to do with memory cache misses. This seems
to be the only thing our profiling tool (AQTime) shows to be
substantially different when we run our programs.

Does anybody have a similar experience? Is this a 'known fact'? Is
there anything we can do to our programs to make them run faster on
Windows 2003 Server? I'm not sure I'm asking the right forum, if I'm
not where would be better? We need to move the programs to a Windows
2003 Server production environment but are very disappointed with the
throughput.
That is a very odd problem, and not consistent with results I've seen (where
I've always seen nearly identical performance).

You might try asking in microsoft.public.win32.programmer.kernel, however.

-cd
Oct 8 '07 #2
This has nothing to do with the Visual C++ language. Though I heard server
versions of windows have strategies to allocate memory blocks and schedule
processes to shorten response time for all processes.

--
Sheng Jiang
Microsoft MVP in VC++
"Eddie" <Ed********@community.nospamwrote in message
news:A3**********************************@microsof t.com...
We have an odd situation with some of our single-threaded CPU-bound C++
programs. They run between 2 and 4 times faster on Windows XP than on
windows
Server 2003 on the same Xeon hyperthreading dual processor machine (we
borrowed one from our IT department, and have been alternating these two
operating systems on it.)

Even more odd, if we run a Virtual PC with Windows XP on top of the
Windows
2003 Server on the same Xeon machine, the programs run faster too. There
is
nothing else running on the machine during these tests, both underlying
operating systems show the expected 25% CPU usage.

I've changed the Windows 2003 Server system properties to give the best
performance for programs as opposed to background work, but this made no
difference.

Next I tried running the programs on my Core 2 Duo with Windows XP, and
comparing this with a Virtual PC running Windows 2003 Server on top of
Windows XP on my machine. The programs showed negligible difference in
run-times, and the expected 50% CPU usage.

We think, but are not sure, that the slowing down on 'native' Windows 2003
Server is something to do with memory cache misses. This seems to be the
only
thing our profiling tool (AQTime) shows to be substantially different when
we
run our programs.

Does anybody have a similar experience? Is this a 'known fact'? Is there
anything we can do to our programs to make them run faster on Windows 2003
Server? I'm not sure I'm asking the right forum, if I'm not where would be
better? We need to move the programs to a Windows 2003 Server production
environment but are very disappointed with the throughput.

Eddie

Oct 8 '07 #3
Thanks Sheng, that is very useful. Do you know where I might be able to find
out more about this? (Web-site, book, published paper?)

Eddie

"Sheng Jiang[MVP]" wrote:
This has nothing to do with the Visual C++ language. Though I heard server
versions of windows have strategies to allocate memory blocks and schedule
processes to shorten response time for all processes.

--
Sheng Jiang
Microsoft MVP in VC++
Oct 9 '07 #4
Problem solved! It was a file mapping option that caused them to slow down.
The programs now run marginally faster on Windows 2003 Server. Phew.

Eddie
Oct 11 '07 #5

"Eddie" <Ed********@community.nospamwrote in message
news:E0**********************************@microsof t.com...
Problem solved! It was a file mapping option that caused them to slow
down.
The programs now run marginally faster on Windows 2003 Server. Phew.
Mind sharing which flag/option?
>
Eddie

Oct 11 '07 #6
I'll explain the fix in more detail - and how the situation occurred. I hope
this will help others if they see a similar problem.

The code we use for file mapping in a suite of programs was written some
years ago, at that time the MSDN library suggested that the EC_NOCACHE flag
in "CreateFileMapping" could be beneficial - and indeed it showed a modest
increase in run-times for some of our programs on Windows XP (about 5%, which
is good when some of these programs take a few days to complete).

We recently tried some of these programs on Windows 2003 Server and the
results were bad, as I mentioned earlier. Of course we had completely
forgotten about this option; the number of lines of code in these programs is
very large.

The latest MSDN library does not recommend using the flag, except where
essential. We removed it in one program, and Windows 2003 Server now runs
this program somewhat faster than Windows XP. The run-time on XP has slowed
down a little, as already explained. We are now investigating the use of this
option on Vista, XP, 2003 Server and 2000 Server as well as with all the
other programs we have.

Eddie

"Eddie" wrote:
We have an odd situation with some of our single-threaded CPU-bound C++
programs. They run between 2 and 4 times faster on Windows XP than on windows
Server 2003 on the same Xeon hyperthreading dual processor machine (we
borrowed one from our IT department, and have been alternating these two
operating systems on it.)

Even more odd, if we run a Virtual PC with Windows XP on top of the Windows
2003 Server on the same Xeon machine, the programs run faster too. There is
nothing else running on the machine during these tests, both underlying
operating systems show the expected 25% CPU usage.

I've changed the Windows 2003 Server system properties to give the best
performance for programs as opposed to background work, but this made no
difference.

Next I tried running the programs on my Core 2 Duo with Windows XP, and
comparing this with a Virtual PC running Windows 2003 Server on top of
Windows XP on my machine. The programs showed negligible difference in
run-times, and the expected 50% CPU usage.

We think, but are not sure, that the slowing down on 'native' Windows 2003
Server is something to do with memory cache misses. This seems to be the only
thing our profiling tool (AQTime) shows to be substantially different when we
run our programs.

Does anybody have a similar experience? Is this a 'known fact'? Is there
anything we can do to our programs to make them run faster on Windows 2003
Server? I'm not sure I'm asking the right forum, if I'm not where would be
better? We need to move the programs to a Windows 2003 Server production
environment but are very disappointed with the throughput.

Eddie
Oct 12 '07 #7
Microsoft Windows Internals 4th. ed. page 49

--
Sheng Jiang
Microsoft MVP in VC++
"Eddie" <Ed********@community.nospamwrote in message
news:14**********************************@microsof t.com...
Thanks Sheng, that is very useful. Do you know where I might be able to
find
out more about this? (Web-site, book, published paper?)

Eddie

"Sheng Jiang[MVP]" wrote:
This has nothing to do with the Visual C++ language. Though I heard
server
versions of windows have strategies to allocate memory blocks and
schedule
processes to shorten response time for all processes.

--
Sheng Jiang
Microsoft MVP in VC++

Oct 17 '07 #8

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Nathan Sokalski | last post: by
2 posts views Thread by Joseph Geretz | last post: by
7 posts views Thread by Cliff Harris | last post: by
reply views Thread by Charles Leonard | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.