On Wed, 22 Jun 2016 07:41:04 -0400 Stephen Chrzanowski <[email protected]> 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 CPU and I can't find any hard data that Windows is swapping because of hotspot problems, but I do find many pages about pinning processes to cores. Please provide a link for the hotspot claims. > The computing cost of swapping CPUs is probably close to zero. Your CPU > only has so much on-die memory that it has to push things out CONSTANTLY to > on board RAM, so there may be a time when your CPU (Not the Operating > System) has zero knowledge of your application. When your OS takes the > information back to the CPU, the OS will look at the particularities of CPU > (Heat, load, in use, etc) and specify which CPU will get the task. Swapping a process costs about 1000-100000ns on an idle system (only one busy thread), mostly depending on caches. So even if Windows would swap a hundred times per second, the overhead would be less than 1%. To make sure, pin your process to a cpu and compare. Mattias _______________________________________________ fpc-pascal maillist - [email protected] http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
