Description Usage Arguments Details Value Note Author(s) Examples
Set the default granularity of distributed tasks.
1 | setChunkSize(value = 1)
|
value |
The new default chunk size. |
The setChunkSize function lets users set the default number of jobs that are doled out to each worker process. The doRedis package doles out jobs one at a time by default. Setting the default chunk size larger for shorter-running jobs can substantially improve performance. Setting this value too high can negatively impact load-balancing across workers, however.
This value is overriden by setting the 'chunkSize' option in the foreach loop (see the examples).
Nothing is returned.
All doRedis functions require network access to a Redis server (not included with the doRedis package).
B. W. Lewis <blewis@illposed.net>
1 2 3 4 5 6 7 8 | ## Not run:
require('doRedis')
setChunkSize(10)
## Override the default value in a loop as shown in the following example:
foreach(j=1:1000, .options.redis=list(chunkSize=100))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.