From jtelleriar at gmail.com  Mon Sep 18 11:46:04 2017
From: jtelleriar at gmail.com (Juan Telleria)
Date: Mon, 18 Sep 2017 11:46:04 +0200
Subject: [Rd] R Configuration Variable: Maximum Memory Allocation per R
	Instance
In-Reply-To: <CABFfbXv_X11JF2u0XWuwhPR7XxGcqtNYf9t7_ne9gZ61Lemebg@mail.gmail.com>
References: <CANNd7==ii2RReuCqgJNb0hw3AMycvmdKFLW8=wN-vADSc3aSXA@mail.gmail.com>
 <CANNd7=k+urWYQxJufX1hV9v0bgmORPJku6BWZ4cN-nXATpYA4g@mail.gmail.com>
 <CANNd7==_05ZtU3KBm2OPJ1DrdN7KzGEbqSRx6sm5JWLeF=ZYkw@mail.gmail.com>
 <CABFfbXv_X11JF2u0XWuwhPR7XxGcqtNYf9t7_ne9gZ61Lemebg@mail.gmail.com>
Message-ID: <CANNd7=ndQ_RdoJo4nnLp8k17DbVbrHoKpo5VFBAQyH1COVF0pg@mail.gmail.com>

Very very interesting, if it is ok with it, I will post these observations
to Stack Overflow so that they are useful to other R Programmers, and make
more research on the topic, putting it all together. I could even do a
small article with my research.

I think this is a critical point if you want to have an R Instance and a
RDBMS in the same Server.

Thank you,
Juan

2017-09-17 14:14 GMT+02:00 Jeroen Ooms <jeroenooms at gmail.com>:

> On Sun, Sep 17, 2017 at 12:39 AM, Juan Telleria <jtelleriar at gmail.com>
> wrote:
> > Dear R Developers,
> >
> > In the same way that MySQL/MariaDB's Engine InnoDB or MyISAM/Aria have
> the
> > innodb_buffer_pool_size or the key_buffer_size for setting the maximum
> > amount of RAM which can be used by a Server Instance.
>
> Memory is not controlled by R itself because packages may malloc()
> directly. However most operating systems have features to limit
> resources of a given process. The CRAN package 'unix' has wrappers for
> posix setrlimit [1] e.g. unix::rlimit_as() limits address space. This
> works pretty well, however I found that the way memory is managed and
> counted varies a lot per OS and malloc implementation.
>
> You can also set rlimits on a single evaluation via the rlimit
> parameter in sys::eval_safe().
>
>
> [1] http://pubs.opengroup.org/onlinepubs/009695399/
> functions/getrlimit.html
>

	[[alternative HTML version deleted]]



[Rd] R Configuration Variable: Maximum Memory Allocation per R Instance
Juan Telleria