2017-07-25 49 views
0

不尊重從鈷內存docs,我們設置max_cobalt_cpu_usage限制250Mmax_cobalt_gpu_usage到150M,並發現鈷實際使用的最大內存約爲370M播放4K時視頻大約12小時,它已經超過了250M了很多,那麼什麼樣的內存(例如malloc/new/mmap等)被計入max_cobalt_cpu_usage?如何設置max_cobalt_cpu_usage並將實際內存使用量保持在max_cobalt_cpu_usage之內?內存限制設置可以由鈷

PS.The memory statistical approach is as follows: 
1>Move focus to the cobalt icon, drop the memory cache, record the memory free value(memoryBegin) from /proc/meminfo; 
2>Enter cobalt youtube, and keep playing 4K videos for about 12 hours; 
3>During playing the videos, record the memory free value(memoryEnd) from /proc/meminfo every 10s(drop the memory cache before record the memory); 
4>Find the minimum memoryEnd as memoryEndMin; 
5>memoryBegin - memoryEndMin = 370M; 

回答

0

什麼樣的內存(例如的malloc /新/ MMAP等)計入max_cobalt_cpu_usage?

SbSystemGetUsedCPUMemory()返回的值用於確定當前的cpu內存使用情況。請確保它返回預期值。

請注意,緩存不會動態重新調整大小以保持在限制範圍內。初始條件必須設置爲考慮需要設置的最大內存限制。

您可以手動減小高速緩存的大小(請參閱memory_tuning.md文檔),也可以使用--reduce_cpu_memory_by = Xmb,這將允許AutoSet內存設置減少其內存使用量。

有關內存使用的更多信息,請使用--memory_tracker作爲命令行參數。