Multi-core CPU systems, need a help

V

Villi Bernaroli

I have a single threaded application working under 3 different multi-core
systems, one with XP 32 bit, one with Vista and one with Windows 2003.
On XP the workload is all on a single core, while in Vista and 2003 the
workload affects both the two cores.
Am I correct in suspecting the 2 latter OS'es (Vista and 2003) are
internally splitting the single thread between more cores?
And if so, is there a way to tell Vista (or 2003) not to use this feature so
to let the single threaded application work on one core only?

[sorry for re-posting but I didn't know of this group when I first sent this
to ...vista.general)
 
J

JW

No,
What is happening is that your background services are using some of the
available CPU power and if one of them happens to run while your application
is waiting on I/O or otherwise time sliced then the service may take the CPU
you were using and your application will then switch to the other CPU.
Therefore what you are seeing is that your application is sharing both CPUs
but never concurrently.
Also if your application double buffers any I/O that will be done with the
other CPU.
You can got into task manager and dedicate a task to a single CPU but you
cannot make it the only process that is using that CPU.
This will cause performance degradation of your application so I do not
recommend it.
 
V

Villi Bernaroli

JW said:
No,
What is happening is that your background services are using some of
the available CPU power and if one of them happens to run while your
application is waiting on I/O or otherwise time sliced then the
service may take the CPU you were using and your application will
then switch to the other CPU. Therefore what you are seeing is that
your application is sharing both CPUs but never concurrently.

This is very confusing to me, because the CPU-core usage of the two cores
grows suddendly on both cores exactly when I launch my application, and
there are very few other background processes running, I'm sure there is no
process which could use so much CPU time. The core-usage history shows a
almost identical profile for both the cores: both grow at the same time,
bnoth have upper and lower peaks at the same moments and both return to idle
after the application ends.
May this worlkoad on the second core be due to our application doing
intensive use of some function in DLL's or othe rcomponents as a zip/unzip
ocx? It's a database application made with Visual Foxpro which uses it's own
data engine (no DBMS backend) so the only components added to the VFoxpro
core are just some ocx's and dll's.

A thing which continues to confuse me: then Vista and 2003 do not have the
capability to split a single thread between two processors?
Also if your application double buffers any I/O that will be done
with the other CPU.

What do you mean by "double buffer any I/O"?
You can got into task manager and dedicate a task to a single CPU but
you cannot make it the only process that is using that CPU.
This will cause performance degradation of your application so I do
not recommend it.

Thank you very much for your help, JW
 
J

JW

If you run task manager you will see other tasks using some amount of CPU
power even if it is just the OS itself. It does not take much to cause the
OS to switch cores for your application especially when it is being time
sliced. The OS time slices every application about every 50 milliseconds or
less and your core gets released to anybody in the execution cue so your
application is then switched to the other core so it can start immediately.

The OSs only have the capability to split a multithreaded application such
as some database search programs which start one thread to search
alphabetically from A-L and another thread to search from M-Z and then
combines the results when both threads complete. Another common
multithreaded application is conversion of video file formats.

Double Buffering I/O means that when receiving data from an application such
as TV tuner that the application starts receiving data in one buffer and at
the same time it splits its thread so that that another input buffer will be
instantly available when the first input buffer is full. This is done to
insure that none of the incoming data is lost.
 
V

Villi Bernaroli

JW said:
If you run task manager you will see other tasks using some amount of
CPU power even if it is just the OS itself. It does not take much to
cause the OS to switch cores for your application especially when it
is being time sliced. The OS time slices every application about
every 50 milliseconds or less and your core gets released to anybody
in the execution cue so your application is then switched to the
other core so it can start immediately.

This makes sense, a lot of, thanks you.

I still have just one doubt: why is this not happening under Windows XP Pro
(32 bit) ?
Has Win XP a different way to organise the work of the cores/CPUs ?
 
A

andy

What CPUs (all Intel, all AMD, or a mix) do the three systems use?
Running Windows 2000 it seems to me that under similar conditions both
cores on an AMD X2 show activity compared to an Intel C2D where one
core remains idle..
 
M

Michael Walraven

For Vista there is the concept of 'processor affinity'

You can start a process with a command line with "/affinity 1" as a command
parameter and it will bind just to the second processor.

You can see and set the process affinity with task manager, processes, right
click and select set affinity.

try google : vista process affinity
for some additional information.

Michael

andy said:
What CPUs (all Intel, all AMD, or a mix) do the three systems use?
Running Windows 2000 it seems to me that under similar conditions both
cores on an AMD X2 show activity compared to an Intel C2D where one
core remains idle..

I have a single threaded application working under 3 different multi-core
systems, one with XP 32 bit, one with Vista and one with Windows 2003.
On XP the workload is all on a single core, while in Vista and 2003 the
workload affects both the two cores.
Am I correct in suspecting the 2 latter OS'es (Vista and 2003) are
internally splitting the single thread between more cores?
And if so, is there a way to tell Vista (or 2003) not to use this feature
so
to let the single threaded application work on one core only?

[sorry for re-posting but I didn't know of this group when I first sent
this
to ...vista.general)
 
J

JW

It happens on my XP home system with a Hyper threaded CPU chip. possibly you
are only seeing the CPU usage of the two CPUs combine/.
 
J

JW

XP also has the processor affinity option I used in several occasions.
Michael Walraven said:
For Vista there is the concept of 'processor affinity'

You can start a process with a command line with "/affinity 1" as a
command parameter and it will bind just to the second processor.

You can see and set the process affinity with task manager, processes,
right click and select set affinity.

try google : vista process affinity
for some additional information.

Michael

andy said:
What CPUs (all Intel, all AMD, or a mix) do the three systems use?
Running Windows 2000 it seems to me that under similar conditions both
cores on an AMD X2 show activity compared to an Intel C2D where one
core remains idle..

I have a single threaded application working under 3 different multi-core
systems, one with XP 32 bit, one with Vista and one with Windows 2003.
On XP the workload is all on a single core, while in Vista and 2003 the
workload affects both the two cores.
Am I correct in suspecting the 2 latter OS'es (Vista and 2003) are
internally splitting the single thread between more cores?
And if so, is there a way to tell Vista (or 2003) not to use this feature
so
to let the single threaded application work on one core only?

[sorry for re-posting but I didn't know of this group when I first sent
this
to ...vista.general)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top