Re: [fpc-pascal] Optimal number of threads for SMP

2014-09-22 Thread Michael Schnell
On 09/20/2014 01:48 AM, Graeme Geldenhuys wrote: On 2014-09-15 10:19, Marco van de Voort wrote: My rule of thumb is physical cores + a percentage. (like 10-20%). Tell that to most developers out there, they clearly don't know that "rule of thumb". :-) Mozilla Thunderbird under Win7 shows 47 th

Re: [fpc-pascal] Optimal number of threads for SMP

2014-09-20 Thread Marco van de Voort
In our previous episode, Graeme Geldenhuys said: > > My rule of thumb is physical cores + a percentage. (like 10-20%). > > Tell that to most developers out there, they clearly don't know that > "rule of thumb". :-) Mozilla Thunderbird under Win7 shows 47 threads. > EditPad Pro 7 shows 18 threads.

Re: [fpc-pascal] Optimal number of threads for SMP

2014-09-20 Thread Sven Barth
On 20.09.2014 01:48, Graeme Geldenhuys wrote: On 2014-09-15 10:19, Marco van de Voort wrote: My rule of thumb is physical cores + a percentage. (like 10-20%). Tell that to most developers out there, they clearly don't know that "rule of thumb". :-) Mozilla Thunderbird under Win7 shows 47 thre

Re: [fpc-pascal] Optimal number of threads for SMP

2014-09-20 Thread Graeme Geldenhuys
On 2014-09-15 10:19, Marco van de Voort wrote: > My rule of thumb is physical cores + a percentage. (like 10-20%). Tell that to most developers out there, they clearly don't know that "rule of thumb". :-) Mozilla Thunderbird under Win7 shows 47 threads. EditPad Pro 7 shows 18 threads. etc etc...

Re: [fpc-pascal] Optimal number of threads for SMP

2014-09-19 Thread Michael Schnell
On 09/18/2014 06:53 PM, Bernd wrote: If it reports 4 CPUs then you have exactly 4 CPUs. Correct from a algorithm POV, but not from a performance POV. -Michael ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-

Re: [fpc-pascal] Optimal number of threads for SMP

2014-09-19 Thread Michael Schnell
On 09/15/2014 11:19 AM, Marco van de Voort wrote: too many threads increasing switching time and thus decreases performance Not only this. Additionally Linux tries to keep a thread/Task at the same CPU when re-scheduling the CPUs. By this the count of misses on the (primary) caches is decrea

Re: [fpc-pascal] Optimal number of threads for SMP

2014-09-18 Thread Marco van de Voort
In our previous episode, Mark Morgan Lloyd said: > > Hyperthreading doubles the execution stream logic, so that one core can > > take two incoming streams of instructions. The idea is that when one thread > > stalls, or executes unoptimal code, the other thread can run, increasing > > utilization.

Re: [fpc-pascal] Optimal number of threads for SMP

2014-09-18 Thread Mark Morgan Lloyd
Marco van de Voort wrote: Hyperthreading doubles the execution stream logic, so that one core can take two incoming streams of instructions. The idea is that when one thread stalls, or executes unoptimal code, the other thread can run, increasing utilization. But that is more something like 10%,

Re: [fpc-pascal] Optimal number of threads for SMP

2014-09-18 Thread Marco van de Voort
In our previous episode, Bernd said: > If the CPU has hyper threading then these should show up as individual > cores (CPUs). They call a "core" with 2 processors on it a "core" but > each of these "cores" is actually two complete processors (cores in > the conventional meaning of the word) that ju

Re: [fpc-pascal] Optimal number of threads for SMP

2014-09-18 Thread Bernd
2014-09-15 11:10 GMT+02:00 Xiangrong Fang : > (hyper-threads)? If the CPU has hyper threading then these should show up as individual cores (CPUs). They call a "core" with 2 processors on it a "core" but each of these "cores" is actually two complete processors (cores in the conventional meaning

Re: [fpc-pascal] Optimal number of threads for SMP

2014-09-15 Thread Marco van de Voort
In our previous episode, Xiangrong Fang said: > If my application needs SPEED, i.e. take full advantage of CPU > capabilities, and the application has no I/O operation at all (neither disk > nor network), it seems no need to create threads more than the number of > CPU cores ?hyper-threads)? > > A

[fpc-pascal] Optimal number of threads for SMP

2014-09-15 Thread Xiangrong Fang
Hi All, If my application needs SPEED, i.e. take full advantage of CPU capabilities, and the application has no I/O operation at all (neither disk nor network), it seems no need to create threads more than the number of CPU cores (hyper-threads)? Am I right? Xiangrong ___