Linux內核內存管理算法Buddy和Slab: /proc/meminfo、/proc/buddyinfo、/proc/slabinfo


 

slabtop

cat /proc/slabinfo

# name            <active_objs> <num_objs> <objsize> <objperslab> <pagesperslab> : tunables <limit> <batchcount> <sharedfactor> : slabdata <active_slabs> <num_slabs> <sharedavail>
ovl_inode            552    552    680   24    4 : tunables    0    0    0 : slabdata     23     23      0
ext4_groupinfo_4k   7440   7440    136   30    1 : tunables    0    0    0 : slabdata    248    248      0
RAWv6                104    104   1216   26    8 : tunables    0    0    0 : slabdata      4      4      0
UDPLITEv6              0      0   1216   26    8 : tunables    0    0    0 : slabdata      0      0      0
UDPv6                104    104   1216   26    8 : tunables    0    0    0 : slabdata      4      4      0
tw_sock_TCPv6        208    208    256   16    1 : tunables    0    0    0 : slabdata     13     13      0
TCPv6                452    570   2176   15    8 : tunables    0    0    0 : slabdata     38     38      0
cfq_queue              0      0    232   17    1 : tunables    0    0    0 : slabdata      0      0      0
bsg_cmd                0      0    312   26    2 : tunables    0    0    0 : slabdata      0      0      0
UDP-Lite               0      0   1088   30    8 : tunables    0    0    0 : slabdata      0      0      0
flow_cache             0      0    144   28    1 : tunables    0    0    0 : slabdata      0      0      0
xfrm_dst_cache        84     84    576   28    4 : tunables    0    0    0 : slabdata      3      3      0
UDP                  180    180   1088   30    8 : tunables    0    0    0 : slabdata      6      6      0
tw_sock_TCP          176    176    256   16    1 : tunables    0    0    0 : slabdata     11     11      0
TCP                  632    864   1984   16    8 : tunables    0    0    0 : slabdata     54     54      0

 

echo `cat /proc/slabinfo |awk 'BEGIN{sum=0;}{sum=sum+$3*$4;}END{print sum/1024/1024}'` MB

 

 

參考:

系統技術非業余研究:Linux Used內存到底哪里去了

 

Linux內核內存管理算法Buddy和Slab


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM