Re: HOWTO: use multiple processors in a machine?
From: BV (nospal_at_no.com)
Date: 08/10/04
- Next message: Swar: "How does VC debug works"
- Previous message: Oleg Starodumov: "Re: "unexpected class""
- In reply to: David Mair: "Re: HOWTO: use multiple processors in a machine?"
- Next in thread: David Mair: "Re: HOWTO: use multiple processors in a machine?"
- Reply: David Mair: "Re: HOWTO: use multiple processors in a machine?"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 10 Aug 2004 13:47:50 +0200
David Mair wrote:
> BV wrote:
>
>> I have a console app that consumes a lot of processor resources and it
>> would be best to change it to use 2 processors in a multiprocessor
>> system.
>>
>> For example, when I use it on 2x P4 (hyperthreading) there are 4
>> logical processors, so when I run my app it consumes only 25% of the
>> processor.
>
>
> Scott's answer deals with the question asked but I'd like to offer a
> comment/opinion on HT that might help you. I work on file systems and
> closely work with OS kernel code. The last time I checked, Intel only
> claims a typical 30% advantage from HT. Assuming a 3GHz processor
> that's an effective 3.9GHz processor to run two threads, or a mean of
> 1.95GHz per thread, probably not what you expected. In truth it's often
> worse than that but it's certainly never instantaneously really like
> that. Without going into detail on how or why I can attest from
> experience in file system and OS kernel code that it is easy to block
> one virtual CPU with code running on the other. A classic example is a
> common spin-lock implementation. These are often used in deep OS code
> and hardware drivers. I've seen a disk controller driver that was twice
> as fast when the virtual processor support was disabled than it was with
> it enabled, i.e. it was faster with two physical than it was with four
> virtual processors on two physical. I doubt that you'll find that a
> physical CPU saturating thread will run at 50% per virtual processor in
> terms of actual instructions executed versus the single physical
> processor. I would guess that you could run the virtual processors at
> about 85% each but, more realistically I would expect you to saturate
> one and starve the other. Though it's possible the changes you'd make
> to your process model would streamline the implementation and improve
> things that way as well. Note that this is only an opinion based on
> kernel behaviour and application code may behave differently.
David thanks for your answer. I guess, from your answer, there isn't a
way to implement this without using spin-lock functions. I have't ran
across them anywhere except in Windows DDK .. which turned out to be
pretty cryptic I couldn't find a working sample app that demonstrates
this. Do you perhaps know a source that has sample apps that demonstrate
this either MS or other? I use Visual Studio .net 2003 + Intel 8 compiler
Btw. I ported this program to parallel processing MPI platform I'll need
about a week to optimize it to actually work on 5 pc's (all p4's) over a
network (that I own privately). I am using the evaluation software from
www.criticalsoftware.com/hpc/
- Next message: Swar: "How does VC debug works"
- Previous message: Oleg Starodumov: "Re: "unexpected class""
- In reply to: David Mair: "Re: HOWTO: use multiple processors in a machine?"
- Next in thread: David Mair: "Re: HOWTO: use multiple processors in a machine?"
- Reply: David Mair: "Re: HOWTO: use multiple processors in a machine?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|