LoginSignup
0
0

More than 5 years have passed since last update.

Erlang processのheap割り当てサイズの推移

Last updated at Posted at 2015-04-15

Erlang processのheap割り当てサイズの推移

Erlang processのメモリ使用量を計ったところ, 同じ値を取ることが多かったので気になって調べてみました.
特に結論やまとめがある訳ではないです^^;;

検証コード

start() ->
    {ok, Fd} = file:open("result", [write]),
    loop(Fd, []).

loop(Fd, List) ->
    {_, Mem} = erlang:process_info(self(), memory),
    file:write(Fd, <<(integer_to_binary(Mem))/binary, "\n">>),
    loop(Fd, [1 | List]).

結果

(縦軸:Bytes, 横軸:ループ回数)
image.png

image (1).png

googleスプレッドシートで作成したら, 下の画像が少し残念な感じになりましたが...
GCが走りつつ, 2~1.5倍程度ずつ増やしていっているようですね.

0
0
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0