Re: [R] Speed up R

From: Michael Prager <mike.prager_at_noaa.gov>
Date: Wed, 20 Jun 2007 19:23:50 -0400

Matthew Keller wrote:

> So Mike, let me ask you a question. If R runs out of RAM, does it
> begin to use virtual RAM, and hence begin to swap from the hard drive?
> If so, I could see how a faster hard drive would speed R up when you
> don't have enough RAM...

Yes. Virtual memory management is done by any modern operating system. The slowdown will be extreme. (Therefore, a minimum of 2Gb is a good idea for serious crunching -- I'd recommend 3 or 4 if possible. Don't forget that any programming language may have two copies of some arrays in memory during certain operations.)

But even when R itself is not using VM, any significant I/O load on a Windows CPU (when (S)ATA disks are used) slows down *at least* all other I/O, and it seems to me that it slows down other interrupt servicing (e.g., responding to mouse clicks) as well. Even if the latter is not strictly true, it may be that the mouse click requires paging something in, like the stupid animation that plays when files are copied.

Aside: On a old PC, copying files from the command line was fine, but if I forgot & did it from the Windows Explorer, the stupid animation swapped in from disk and the machine froze for ~30 seconds.)

Windows Vista can take advantage of a new gizmo Intel has introducted with a 1 Gb solid-state disk cache. That might reduce such problems.

Mike

Mike Prager
Southeast Fisheries Science Center, NOAA Beaufort, North Carolina USA



R-help_at_stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Wed 20 Jun 2007 - 23:34:10 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 21 Jun 2007 - 00:32:14 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.