Take a wild stab at guessing how many CPUs to use in cluster when you have some idea of how much RAM is needed per CPU.

guesstimate(ram, prop = 0.8, units = "gb")

Arguments

ram

How much ram is required per CPU.

prop

Proportion of overall RAM to devote to R. Default 0.80.

units

Units of memory. One of either "KB", "MB", "GB".

Value

Integer. Number of CPUs to allocate to cluster.

Details

Tries to be conservative by assuming no more than 80% system memory use.

Note

You should take these numbers with several grains of salt.

Author

Alex Chubaty

Examples

if (FALSE) { # \dontrun{
guesstimate(4)
guesstimate(4, 0.90, "MB")
} # }