Archive

Posts Tagged ‘r13b03’

R13B03 binary vheap有助减少binary内存压力

November 29th, 2009 Comments off

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

本文链接地址: R13B03 binary vheap有助减少binary内存压力

R13B03 binary vheap有助减少binary内存压力.

参看:http://www.erlang.org/download/otp_src_R13B03.readme

OTP-8202 A new garbage collecting strategy for binaries which is more
aggressive than the previous implementation. Binaries now has
a virtual binary heap tied to each process. When binaries are
created or received to a process it will check if the heap
limit has been reached and if a reclaim should be done. This
imitates the behavior of ordinary Erlang terms. The virtual
heaps are grown and shrunk like ordinary heaps. This will
lessen the memory footprint of binaries in a system.

原来的binary和其他类型的eterm是混在一起的,当进程的heap用完的时候,才进行GC,腾出空间。现在是把binary单独抽取出来,单独计数, 当binary用量过大的时候,马上就GC。

这个策略对于我们的服务器程序很有帮助,因为我们的服务器程序基本上包都是binary, 很容易出现binary无法及时回收,导致内存耗光的情况。

具体的改进效果待进一步的观察。

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

Categories: Erlang探索 Tags: , ,