Re: [fpc-pascal] Single threaded application on multicore CPU

2016-06-23 Thread Marc Santhoff
On Mi, 2016-06-22 at 15:01 +0200, Mattias Gaertner wrote: > On Wed, 22 Jun 2016 13:36:08 +0100 > Graeme Geldenhuys wrote: > > > On 2016-06-22 13:14, Mattias Gaertner wrote: > > > On my Linux it does not swap the CPU and I can't find any hard data that > > > Windows is swapping because of hotspot

Re: [fpc-pascal] Single threaded application on multicore CPU

2016-06-22 Thread José Mejuto
El 22/06/2016 a las 15:01, Mattias Gaertner escribió: I don't doubt that it is swapping. I would like to know why it is swapping. Is it avoiding hotspots, or for longevity, or turbo boost, or system processes, or security, or Related: What is the downside of pinning the process to a cpu? H

Re: [fpc-pascal] Single threaded application on multicore CPU

2016-06-22 Thread Graeme Geldenhuys
On 2016-06-22 14:01, Mattias Gaertner wrote: > I don't doubt that it is swapping. I would like to know why it is > swapping. Indeed a good question, and something I've wondered about before. My answer is I don't know. :) When I did Google it before (some years ago), the most frequent answer I go

Re: [fpc-pascal] Single threaded application on multicore CPU

2016-06-22 Thread Mattias Gaertner
On Wed, 22 Jun 2016 13:36:08 +0100 Graeme Geldenhuys wrote: > On 2016-06-22 13:14, Mattias Gaertner wrote: > > On my Linux it does not swap the CPU and I can't find any hard data that > > Windows is swapping because of hotspot problems, > > It’s not just a Windows thing. On my FreeBSD system..

Re: [fpc-pascal] Single threaded application on multicore CPU

2016-06-22 Thread Graeme Geldenhuys
On 2016-06-22 13:14, Mattias Gaertner wrote: > On my Linux it does not swap the CPU and I can't find any hard data that > Windows is swapping because of hotspot problems, It’s not just a Windows thing. On my FreeBSD system it swaps between CPU cores too. I see this with any long running process th

Re: [fpc-pascal] Single threaded application on multicore CPU

2016-06-22 Thread Mattias Gaertner
On Wed, 22 Jun 2016 07:41:04 -0400 Stephen Chrzanowski wrote: > Everything has a cost. But swapping CPU threads isn't as costly as a fried > CPU. Keeping the CPU cool at all costs is better than having a hotspot on > the die which COULD damage the heat sink. On my Linux it does not swap the CP

Re: [fpc-pascal] Single threaded application on multicore CPU

2016-06-22 Thread Stephen Chrzanowski
Everything has a cost. But swapping CPU threads isn't as costly as a fried CPU. Keeping the CPU cool at all costs is better than having a hotspot on the die which COULD damage the heat sink. The computing cost of swapping CPUs is probably close to zero. Your CPU only has so much on-die memory t

Re: [fpc-pascal] Single threaded application on multicore CPU

2016-06-22 Thread Graeme Geldenhuys
On 2016-06-22 08:02, LacaK wrote: > I know that in theory CPU can switch single thread between cores As Torsten said, that is exactly what happens. It is not “just in theory”, it happens all the time. I see that constantly on my i7 CPU with long running processes. As for the cost of moving it bet

Re: [fpc-pascal] Single threaded application on multicore CPU

2016-06-22 Thread LacaK
I have simple Lazarus/FPC application (with no explicit threads) which does intensive calculations (local thresholding with big window size) on image, which is stored into memory as 2D byte array. (so only memory access is done and some integer calculations) When I run this application and lo

Re: [fpc-pascal] Single threaded application on multicore CPU

2016-06-22 Thread Lukasz Sokol
On 22/06/16 08:07, Torsten Bonde Christiansen wrote: > On 2016-06-22 09:02, LacaK wrote: >> Hi *, >> >> may be that this question is bit off-topic here, but I am sure, that here >> are experts, which know answer ;-) >> >> I have simple Lazarus/FPC application (with no explicit threads) which does

Re: [fpc-pascal] Single threaded application on multicore CPU

2016-06-22 Thread Torsten Bonde Christiansen
On 2016-06-22 09:02, LacaK wrote: Hi *, may be that this question is bit off-topic here, but I am sure, that here are experts, which know answer ;-) I have simple Lazarus/FPC application (with no explicit threads) which does intensive calculations (local thresholding with big window size) o

[fpc-pascal] Single threaded application on multicore CPU

2016-06-22 Thread LacaK
Hi *, may be that this question is bit off-topic here, but I am sure, that here are experts, which know answer ;-) I have simple Lazarus/FPC application (with no explicit threads) which does intensive calculations (local thresholding with big window size) on image, which is stored into memor