[R] R Production Performance

Joe Conway mail at joeconway.com
Tue Sep 30 18:25:53 CEST 2003


Zitan Broth wrote:
> Right but R is only "preloaded" once?

Yes. The plr shared library gets loaded and initialized (which in turn 
loads and initializes libR) only once -- on Postgres's postmaster 
startup. From that point forward, every new database connection gets a 
forked copy of the postmaster, and hence a preinitialized copy of the R 
interpreter.

Of course (as I think I mentioned already, but it is worth repeating) to 
get this performance enhancement you need to be using either Postgres 
7.4 beta or a patched version of Postgres 7.3 (found at the URL on the 
original post), and have the following line in your postgresql.conf:

preload_libraries = '$libdir/plr:plr_init'

This is getting a bit off topic, so if you have any more PL/R specific 
questions, please write me off list.

Joe




More information about the R-help mailing list