[eeps] New EEP: setrlimit(2) analogue for Erlang
Björn-Egil Dahlberg
egil@REDACTED
Fri Feb 8 14:29:01 CET 2013
On 2013-02-08 14:18, Richard Carlsson wrote:
> On 02/08/2013 04:47 AM, Michael Truog wrote:
>> The erts_debug:size/1 that Björn-Egil mentioned is really what I
>> want, but we would need it to be documented to have this low-level
>> view of memory consumption be official (it would also be cool if it
>> could be mentioned in the memory portion of the efficiency guide).
>
> Also, it's currently very slow on large structures, being implemented
> in Erlang (using gb_trees and debugging BIFs like erts_debug:same/2).
> Do not use in production if the structures may be huge.
Good point! I would say don't use it in production *period*. As the name
suggests it's used for debugging/development purposes.
>
> The erts_debug:flat_size/1 function is fast and implemented in C, but
> doesn't give you the true size since it ignores sharing. If Kostis
> Sagonas' work on sharing-preserving copying operations was included in
> OTP, we could have an efficient version of erts_debug:size/1.
I haven't seen the final implementation yet. I wonder if it's complete?
Preserved sharing in copy would be really nice as long as it is efficient.
// Björn-Egil
More information about the eeps
mailing list