日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

[Erlang危机](5.1.1)内存

發布時間:2023/12/20 编程问答 21 豆豆
生活随笔 收集整理的這篇文章主要介紹了 [Erlang危机](5.1.1)内存 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

原創文章,轉載請注明出處:server非業余研究http://blog.csdn.net/erlib 作者Sunface聯系郵箱:cto@188.com


Memory

The memory reported by the Erlang VM in most tools will be a variant of what is reported by?erlang:memory()?:

Erlang VM大多數檢測內存的工具都是通過erlang:memory()來實現的。

-------------------------------------------------------------------------------------
1> erlang:memory().
[{total,13772400},
{processes,4390232},
{processes_used,4390112},
{system,9382168},
{atom,194289},
{atom_used,173419},
{binary,979264},
{code,4026603},
{ets,305920}]
--------------------------------------------------------------------------------------

?This requires some explaining.
?First of all, all the values returned are in bytes, and they represent memory allocated (memory actively used by the Erlang VM, not the memory set aside by the operating system for the Erlang VM). It will sooner or later look much smaller than what the operating system reports.

?這里須要解釋下:
?首先,全部的返回值都是字節(bytes)為單位的,它們表示眼下被分配的內存(Erlang VM實際使用的內存。不是操作系統給Erlang VM分配的內存),所以這個值要比操作系統分配的小非常多。

?The total field contains the sum of the memory used for processes and system (which is incomplete, unless the VM is instrumented!). processes is the memory used by Erlang processes, their stacks and heaps. system is the rest: memory used by ETS tables, atoms in the VM, refc binaries11, and some of the hidden data I mentioned was missing.
?If you want the total amount of memory owned by the virtual machine, as in the amount that will trip system limits (ulimit), this value is more difficult to get from within the VM.
?If you want the data without calling top or htop, you have to dig down into the VM’s memory allocators to find things out12.

?總字段包括了全部進程和系統(除instrumented模式外)的總內存占用大小。返回的processes項是指Erlang進程使用的堆棧總內存。system項就包括其余的:ETS表。VM中的原子,二進制數據11(refc binaries,詳細的可見堅強2002博客 - Sunface),和一些我沒有提及到的隱藏數據。
?假設你想得到VM在操作系統占用的總內存,這個值在訪問系統的限制下(ulimit),非常難從VM內部獲得。
?假設你想不調用top或htop命令來得到數據,你就不得不深入VM內存管理分配來找到你想要的12

?Fortunately, recon has the function recon_alloc:memory/1 to figure it out, where the argument is:
???used?reports the memory that is actively used for allocated Erlang data;
???allocated?reports the memory that is reserved by the VM. It includes the memory used, but also the memory yet-to-be-used but still given by the OS. This is the amount you want if you’re dealing with ulimit and OS-reported values.
???unused?reports the amount of memory reserved by the VM that is not being allocated. Equivalent to allocated-used.
???usage?returns a percentage (0.0 .. 1.0) of used over allocated memory ratios. There are additional options available, but you’ll likely only need them when investigating memory leaks in chapter 7

?只是。非常幸運的是。recon有一個函數:recon_alloc:memory/1能夠解決上述問題,參數例如以下:
? ? ? used:給Erlang data分配的內存?

? ? ? allocated:VM占用的總內存。它包括已使用的內存。也包括還已由OS分配給VM但尚未被分配的內存。假設你在處理ulimit和

OS-reported的值,這個參數就非常實用。

? ? ? unused:OS分配給VM可是尚未被VM分配的那部分內存。

? ? ? ? ?usage:返回各個功能使用內存的百分比。另一些額外的選項,只是你可能僅僅會在第七章的內存泄漏那里使用。

[11] See Section 7.2
[12] See Section 7.3.2

[注11]:參見章節7.2
[注12]:參見章節7.3.2

轉載于:https://www.cnblogs.com/jhcelue/p/6800565.html

總結

以上是生活随笔為你收集整理的[Erlang危机](5.1.1)内存的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。

主站蜘蛛池模板: 亚洲欧美视频二区 | 中出在线播放 | 黄瓜视频在线观看 | 一个人看的www片免费高清中文 | 人妻无码久久精品人妻 | 亚洲国产日韩一区无码精品久久久 | 日韩爽爽视频 | 男同志毛片特黄毛片 | 欧美性受xxxx黑人xyx性爽 | 日韩国产成人无码av毛片 | 国产丰满大乳奶水在线视频 | 日本爱爱免费视频 | 麻豆网站视频 | 欧美区视频 | 国产亚韩| 99热9| 亚洲四虎av | 福利在线播放 | 日本黄色不卡 | 日本不卡一区二区三区在线观看 | 久久偷拍免费视频 | 久久久久久久九九九九 | 色中文字幕在线观看 | 性色在线 | 无套内谢的新婚少妇国语播放 | 97国产精品| 亚洲精品在线观看免费 | 亚洲视频手机在线观看 | 二区中文字幕 | 亚洲乱码一区 | 亚洲成人av在线播放 | 欧美大片xxx | 人人插人人看 | 蜜臀视频在线播放 | 办公室荡乳欲伦交换bd电影 | 亚洲做受高潮 | 免费成人在线视频观看 | av资源一区 | 中文字幕人妻熟女在线 | 亚洲区色 | 亚洲精品国产精品乱码在线观看 | 野花视频在线免费观看 | 成年人福利视频 | 一卡二卡三卡在线观看 | 三级免费看 | 少妇做爰k8经典 | 国产99久久久 | 欧美黑人疯狂性受xxxxx野外 | 国产黄色大片 | www.白浆| 日本一道本 | 成人a站 | 欧美日韩二区三区 | 黄色片在哪里看 | 天天综合天天做天天综合 | 日韩午夜精品 | 欧美中字| 91视频在线网站 | www.久久av.com| 国产精品国产成人国产三级 | 欧美精品区 | 青青草官网| 久久亚洲AV成人无码国产野外 | 欧美视频免费 | 亚洲小说在线 | 在线观看欧美精品 | 国产精品亚洲αv天堂无码 伊人性视频 | 香蕉网站在线观看 | 国产欧美一区二区三区精品酒店 | 一级欧美一级日韩片 | 天天摸天天操天天干 | 一级做a爰片久久毛片潮喷 天天透天天干 | 五月婷婷中文字幕 | 欧美啪视频 | 国产视频一区在线观看 | 国产又粗又长又黄 | 九九热精 | 都市激情一区 | 成色网| 一本一道久久a久久精品综合 | 一级片免费 | 国产老熟女一区二区三区 | 97人人人 | 毛片无限看 | 国产一及毛片 | 欧美色图亚洲激情 | 超碰免费观看 | 99精品无码一区二区 | 亚洲一区区 | 一区精品视频 | 韩国三级hd中文字幕的背景音乐 | 精品一二三区 | 精品人伦一区二区三区蜜桃网站 | av黄色免费| 精品人妻一区二区免费 | 久章草影院 | 久久亚洲天堂网 | 猛男被粗大男男1069 | 小伸进喷水网站 |