Sfoglia il codice sorgente

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

Signed-off-by: Jake Smith <jake.smith@lexisnexis.com>
Jake Smith 9 anni fa
parent
commit
f9d079cbc5
1 ha cambiato i file con 5 aggiunte e 1 eliminazioni
  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");