setChunkSize: setChunkSize

Description Usage Arguments Details Value Note Author(s) Examples

View source: R/doRedis.R

Description

Set the default granularity of distributed tasks.

Usage

1
setChunkSize(value = 1)

Arguments

value

The new default chunk size.

Details

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).

Value

Nothing is returned.

Note

All doRedis functions require network access to a Redis server (not included with the doRedis package).

Author(s)

B. W. Lewis <blewis@illposed.net>

Examples

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)

cloudcell/doRedis111stable documentation built on May 13, 2019, 8:02 p.m.