Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>My experiences with Gridgain told me, that the job definition is very important for the processing time. When you generate jobs with a small size, the communication overhead is large and all might be slowed (you might also run into other problems with result collect cache size or timeouts). when you on the other hand chose jobs in size too large, slow nodes may block the process while other nodes are idle. finding the best size to a job is difficult.</p> <p>job stealing may assist to distribute jobs better AFTER they were sent to the grid nodes. limiting the curently processed jobs to a number and enable the worker nodes to steal everything above this number of jobs in queue is done with the folloing code. this configuration is also possible with an xml file.</p> <pre><code>public class ConfigGrid { // config jobStealing public static GridConfigurationAdapter JobStealing( GridConfigurationAdapter cfg, int waitJobsThreshold, int activeJobsThreshold, boolean stealingEnabled) { GridJobStealingCollisionSpi spi = new GridJobStealingCollisionSpi(); // Configure number of waiting jobs // in the queue for job stealing. spi.setWaitJobsThreshold(waitJobsThreshold); // Configure stealing attempts number. spi.setMaximumStealingAttempts(10); // Configure number of active jobs that are allowed to execute // in parallel. This number should usually be equal to the number // of threads in the pool (default is 100). spi.setActiveJobsThreshold(activeJobsThreshold); // Enable stealing. spi.setStealingEnabled(stealingEnabled); // Override default Collision SPI. cfg.setCollisionSpi(spi); return cfg; } </code></pre> <p>in your main function, you call it then like:</p> <pre><code>GridConfigurationAdapter cfg = new GridConfigurationAdapter(); // config job stealing cfg = ConfigGrid.JobStealing(cfg, numberOfJobs, setActiveJobs, stealingEnabled); GridFactory.start(cfg); </code></pre> <p>for more settings read the documentation about GridJobStealingCollisionSpi.</p> <p>(edit: of course you must use the same settings on each node)</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload