[Rd] Deprecation of "--min-nsize" and "--min-vsize"

Henrik Alsing Friberg henrik.alsing.friberg at mosek.com
Mon Jan 30 09:04:11 CET 2012


Hi R-devel,

I only run the released version of R where "--min-nsize" and
"--min-vsize" have now been deprecated, and am told that this
functionality has been removed in the dev-version. However, having R
not repeatedly ask the operating system for more memory while
executing, and raising the "gc trigger" level so that garbage
collection is postproned, is a time-wise effective way of running R
scripts. Of course, you need a system that can handle the larger
memory footprint.

Here is an example:
----------------------------------------------
gc(); system.time({
  N  = 2000000;
  SUBLENGTH <- rep(3, N);
  CONEVAL <- matrix(1:(3*N), ncol=3);

  cones <- matrix(list(), nrow=2, ncol=N, dimnames=list(c("type","sub"),c()));
  for (i in 1:N) {
    cones[,i] <- list("MSK_CT_QUAD", CONEVAL[i,]);
  }
}) gc();
----------------------------------------------

Normal execution:
   user  system elapsed
 28.030   0.190  28.238

With high values of "--min-nsize" and "--min-vsize":
   user  system elapsed
 10.330   1.130  11.464

So the effect is a factor 2 to 3. I agree that these arguments are too
technical for the average user and that you would rarely really need
them, but it would be nice to have an easy way of speeding up R
scripts. Also, setting high values of "--min-nsize" and "--min-vsize"
gives more consistent system.time() results when more methods are
tested after each other, because garbage collection and the
availability of memory in the R process does not interfere.

Take this as a thought, and not a need-to-have from my side..

Kind regards,
Henrik



More information about the R-devel mailing list