System monitoring

  • Identify if your code is memory-limited or processor-limited.
  • Makes me want to work on dedicated (isolated) server!
    • (I couldn’t see much of anything amid other noise in graphical view)
    • (this parallel code isn’t parallel on Win)
# 1: Create large dataset
X <- as.data.frame(matrix(rnorm(1e8), nrow = 1e7))
# 2: Find the median of each column using a single core
r1 <- lapply(X, median)
# 3: Find the median of each column using many cores
r2 <- parallel::mclapply(X, median)