Rserve: Difference between revisions
Line 17: | Line 17: | ||
'' | '' | ||
If we run a statement like RSeval(cc, "x <- rnorm(450000*400)"), we will see an error "Error in RSeval(cc, "x <- rnorm(450000*400)") : remote evaluation failed" in the R console. The Rserve window shows the problem | If we run a statement like | ||
< | <pre>RSeval(cc, "x <- rnorm(450000*400)"), </pre> | ||
Reached total allocation of 2047Mb: see help(memory.size)</ | we will see an error "Error in RSeval(cc, "x <- rnorm(450000*400)") : remote evaluation failed" in the R console. The Rserve window shows the problem | ||
<pre>1: In rnorm(450000 * 400) : | |||
Reached total allocation of 2047Mb: see help(memory.size)</pre> | |||
But if we try to use memory.limit(4000) to allocate 4GB space on 64-bit Rserve, we still get the same error on R console, but no error message on Rserve. | But if we try to use memory.limit(4000) to allocate 4GB space on 64-bit Rserve, we still get the same error on R console, but no error message on Rserve. |
Revision as of 12:15, 22 October 2012
Rserve Wiki
Properties
Running Rserve under Windows is very limited
For example, only one connection is allowed at a time. This has an immediate implication that we cannot make use of Rserve.cluster package for high performance computing.
Rserve needs to take double space compared to running under R gui
For example, x <- rnorm(450000*200) The R gui takes 0.7GB but Rserve uses 1.4GB.
Rserve has a limit of maximum size of a single REXP
Maximum size of a single REXP: 2GB (on 32-bit platforms), theoretical limit is 2^55 on 64-bit platforms. Packet size is auto-adjusted, configured by maxinbuf and maxsendbuf config entries. (maximum 2GB) The maxinbuf (max. packet from client to Rserve) and maxsendbuf (max. packet from Rserve to client) options in the configuration file allow you to set limits in order to prevent memory overflow on machines that act as servers for multiple connections. The defaults are 16MB and unlimited respectively.
If we run a statement like
RSeval(cc, "x <- rnorm(450000*400)"),
we will see an error "Error in RSeval(cc, "x <- rnorm(450000*400)") : remote evaluation failed" in the R console. The Rserve window shows the problem
1: In rnorm(450000 * 400) : Reached total allocation of 2047Mb: see help(memory.size)
But if we try to use memory.limit(4000) to allocate 4GB space on 64-bit Rserve, we still get the same error on R console, but no error message on Rserve.
Can we use parallel/snow package with Rserve
Yes and no. We cannot directly use parallel package with Rserve. But with Rserve.cluster package, we can run parallel computing with Rserve. See the the package official website [1].