问题
We are migrating our multi-threaded application to Delphi XE7 and are testing the new TParallel.For function. We have found that it parallelizes well on laptops (Core I-5/Windows 7 with 4 cores) achieving close to consistent 100% cpu usage.
When we run exactly the same code on an Intel Xeon/Windows 2008 R2 with 2x12 cores, it only achieves about 3% usage and appears to be only using 2 of the cores.
The same problem is evident using the Conways Life demo sample application.
We have tried using the OTL which parallelizes close to 100% on the Xeon, but unfortunately we have run into the "Not enough quota" issue and can't seem to resolve that, either.
Has anyone else run into this? We have tried using the Stride parameter, SetMinWorkerThreads and SetMaxWorkerThreads() methods but to no avail.
来源:https://stackoverflow.com/questions/29666197/delphi-tparallel-not-using-all-available-cpu