原创文章,转载请注明: 转载自系统技术非业余研究

本文链接地址: Erlang 17.5引入+hpds命令行控制进程默认字典大小

Erlang 17.5发布引入控制进程默认字典大小的命令行参数:

Erlang/OTP 17.5 has been released
Written by Henrik, 01 Apr 2015

Some highlights of the release are:
ERTS: Added command line argument option for setting the initial size of process dictionaries.

源码变化参看: https://github.com/erlang/otp/commit/c7a07bf984739bcc679d800e5383c01e1d07ffa5
文档:https://github.com/erlang/otp/commit/89987ada3c997fd9f1e1f8c8ed73da0394bda4ee

这个+hpds参数默认是字典有10个槽位,由于典型的Erlang VM内有成千上万的进程,官方又不鼓励使用字典,因为破坏fp语义,所以这些默认的字典占用的内存是浪费掉了。 挑小了对于内存敏感的嵌入式机器还是挺可观的;调大了对字典性能有一定的提升。

祝玩得开心!

Post Footer automatically generated by wp-posturl plugin for wordpress.