2017-07-25 50 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作为命令行参数。