[erlang-questions] Cost of hibernation

Valentin Micic v@REDACTED
Mon Jul 22 16:57:14 CEST 2013


Dear all,

Erlang reference manual makes a following statement regarding erlang:hibernate/3

"erlang:hibernate(Module, Function, Args)
Types:

Module = Function = atom()
Args = [term()]

Puts the calling process into a wait state where its memory allocation has been reduced as much as possible, which is useful if the process does not expect to receive any messages in the near future.

…"

I have never used the hibernate function fearing that performance penalty to be paid may be to high.  In other words, I never really had to use it ;-)

But now that I do, may I kindly ask if there is anyone out there that did successfully used this feature and has a clear idea regarding performance penalty.
Would it be cheaper to store and retrieve a context using ETS (which would certainly complicate programming), or would a call to hibernate do the trick?

Maybe another way to ask this question could be: what is the cost of calling a garbage collection frequently?

Also, would anyone care to define a meaning of "the near future" within this context? Should one measure "the near future"  in milliseconds, seconds or minutes?

Kind regards

V/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20130722/4d2db003/attachment.htm>


More information about the erlang-questions mailing list