Procházet zdrojové kódy

HPCC-15620 By default use affinity/channels(rounded up) strands

Signed-off-by: Jake Smith <jake.smith@lexisnexis.com>
Jake Smith před 9 roky
rodič
revize
f9d079cbc5
1 změnil soubory, kde provedl 5 přidání a 1 odebrání
  1. 5 1
      thorlcr/slave/slave.hpp

+ 5 - 1
thorlcr/slave/slave.hpp

@@ -73,7 +73,11 @@ public:
         //PARALLEL(1) can be used to explicitly disable parallel processing.
         numStrands = container.queryXGMML().getPropInt("att[@name='parallel']/@value", 0);
         if ((numStrands == NotFound) || (numStrands > MAX_SENSIBLE_STRANDS))
-            numStrands = container.queryMaxCores();
+        {
+            unsigned channels = container.queryJob().queryJobChannels();
+            unsigned cores = container.queryMaxCores();
+            numStrands = (cores + (channels-1)) / channels; // i.e. round up
+        }
         if (0 == numStrands)
             numStrands = container.queryJob().getOptInt("forceNumStrands");
         blockSize = container.queryJob().getOptInt("strandBlockSize");