暂无图片
暂无图片
13
暂无图片
暂无图片
暂无图片

OceanBase内存相关日志

OceannBase 2022-11-22
485

OceanBase 数据库支持通过日志来查看内存的使用情况。

租户统计

对租户的总内存进行统计,每行代表一个租户。

[2021-09-09 17:13:17.232782] INFO  [LIB] ob_malloc_allocator.cpp:505 [43566][0][Y0-0000000000000000-0-0] [lt=5] [dc=0] [MEMORY] tenant: 501, limit: 1,073,741,824 hold: 2,097,152 rpc_hold: 0 cache_hold: 0 cache_used: 0 cache_item_count: 0
[2021-09-09 17:13:17.232962] INFO  [LIB] ob_malloc_allocator.cpp:505 [43566][0][Y0-0000000000000000-0-0] [lt=5] [dc=0] [MEMORY] tenant: 502, limit: 1,073,741,824 hold: 4,194,304 rpc_hold: 0 cache_hold: 0 cache_used: 0 cache_item_count: 0
[2021-09-09 17:13:17.233133] INFO  [LIB] ob_malloc_allocator.cpp:505 [43566][0][Y0-0000000000000000-0-0] [lt=5] [dc=0] [MEMORY] tenant: 503, limit: 1,073,741,824 hold: 2,097,152 rpc_hold: 0 cache_hold: 0 cache_used: 0 cache_item_count: 0
[2021-09-09 17:13:17.233308] INFO  [LIB] ob_malloc_allocator.cpp:505 [43566][0][Y0-0000000000000000-0-0] [lt=5] [dc=0] [MEMORY] tenant: 504, limit: 1,073,741,824 hold: 8,388,608 rpc_hold: 0 cache_hold: 0 cache_used: 0 cache_item_count: 0
[2021-09-09 17:13:17.233485] INFO  [LIB] ob_malloc_allocator.cpp:505 [43566][0][Y0-0000000000000000-0-0] [lt=5] [dc=0] [MEMORY] tenant: 505, limit: 1,073,741,824 hold: 2,097,152 rpc_hold: 0 cache_hold: 0 cache_used: 0 cache_item_count: 0
[2021-09-09 17:13:17.233659] INFO  [LIB] ob_malloc_allocator.cpp:505 [43566][0][Y0-0000000000000000-0-0] [lt=5] [dc=0] [MEMORY] tenant: 506, limit: 4,294,967,296 hold: 2,097,152 rpc_hold: 0 cache_hold: 0 cache_used: 0 cache_item_count: 0
[2021-09-09 17:13:17.233832] INFO  [LIB] ob_malloc_allocator.cpp:505 [43566][0][Y0-0000000000000000-0-0] [lt=5] [dc=0] [MEMORY] tenant: 507, limit: 1,073,741,824 hold: 2,097,152 rpc_hold: 0 cache_hold: 0 cache_used: 0 cache_item_count: 0
[2021-09-09 17:13:17.234014] INFO  [LIB] ob_malloc_allocator.cpp:505 [43566][0][Y0-0000000000000000-0-0] [lt=5] [dc=0] [MEMORY] tenant: 508, limit: 1,073,741,824 hold: 6,291,456 rpc_hold: 0 cache_hold: 0 cache_used: 0 cache_item_count: 0
[2021-09-09 17:13:17.234187] INFO  [LIB] ob_malloc_allocator.cpp:505 [43566][0][Y0-0000000000000000-0-0] [lt=4] [dc=0] [MEMORY] tenant: 509, limit: 1,073,741,824 hold: 2,097,152 rpc_hold: 0 cache_hold: 0 cache_used: 0 cache_item_count: 0
[2021-09-09 17:13:17.234358] INFO  [LIB] ob_malloc_allocator.cpp:505 [43566][0][Y0-0000000000000000-0-0] [lt=5] [dc=0] [MEMORY] tenant: 510, limit: 2,147,483,648 hold: 2,097,152 rpc_hold: 0 cache_hold: 0 cache_used: 0 cache_item_count: 0
[2021-09-09 17:13:17.234532] INFO  [LIB] ob_malloc_allocator.cpp:505 [43566][0][Y0-0000000000000000-0-0] [lt=5] [dc=0] [MEMORY] tenant: 512, limit: 1,073,741,824 hold: 2,097,152 rpc_hold: 0 cache_hold: 0 cache_used: 0 cache_item_count: 0

租户 ctx 统计

租户下各个 ctx 的内存统计,ctx 是粗粒度的划分方式,一个租户会有多个 ctx。

[MEMORY] ctx_id=           DEFAULT_CTX_ID hold_bytes=    534,773,760
[MEMORY] ctx_id=          MEMSTORE_CTX_ID hold_bytes=    123,731,968
[MEMORY] ctx_id=         TRANS_CTX_MGR_ID hold_bytes=     12,582,912
[MEMORY] ctx_id=     REPLAY_STATUS_CTX_ID hold_bytes=     20,971,520
[MEMORY] ctx_id=        PLAN_CACHE_CTX_ID hold_bytes=     14,680,064
[MEMORY] ctx_id=                WORK_AREA hold_bytes=      2,097,152

租户 ctx 下 mod 统计

租户 ctx 下更精细的内存统计,一个 ctx 下会有多个 mod。

[MEMORY] tenant_id=    1 ctx_id=           DEFAULT_CTX_ID hold=    534,773,760 used=    431,805,528
[MEMORY] hold=    142,591,488 used=    140,579,840 count=      30 avg_used=      4,685,994 mod=MysqlRequesReco
[MEMORY] hold=    125,798,400 used=    125,767,680 count=      60 avg_used=      2,096,128 mod=SqlExecutor
[MEMORY] hold=    104,857,600 used=    104,855,040 count=       1 avg_used=    104,855,040 mod=TransAudit
[MEMORY] hold=     23,867,392 used=     19,660,800 count=      14 avg_used=      1,404,342 mod=LOCALDEVICE
[MEMORY] hold=     12,579,840 used=     12,576,768 count=       6 avg_used=      2,096,128 mod=PartitLogServic
[MEMORY] hold=     10,483,200 used=     10,480,640 count=       5 avg_used=      2,096,128 mod=Election
[MEMORY] hold=      4,496,000 used=      4,483,464 count=      67 avg_used=         66,917 mod=ResultSet
[MEMORY] hold=      4,193,280 used=      4,192,256 count=       2 avg_used=      2,096,128 mod=OB_KVSTORE_CACHE
[MEMORY] hold=      2,154,368 used=        408,600 count=  24,952 avg_used=             16 mod=Number
[MEMORY] hold=      2,096,640 used=      2,096,128 count=       1 avg_used=      2,096,128 mod=ElectionGroup
[MEMORY] hold=      1,700,736 used=      1,687,552 count=     206 avg_used=          8,192 mod=MemtableCallbac

租户下 PM 统计

PM 内存都是 SQL 执行过程中临时内存,SQL 执行结束释放。

[MEMORY][PM] tid=     48768 used=              0 hold=      2,097,152 pm=0x7f4e3066eec0 ctx_name=DEFAULT_CTX_ID
[MEMORY][PM] tid=     48770 used=      2,096,192 hold=      2,097,152 pm=0x7f4e3005aec0 ctx_name=DEFAULT_CTX_ID
[MEMORY][PM] tid=     48771 used=      2,161,792 hold=      4,194,304 pm=0x7f4e2fd50ec0 ctx_name=DEFAULT_CTX_ID
[MEMORY][PM] tid=     48772 used=    124,691,512 hold=    127,926,272 pm=0x7f4e2fa46ec0 ctx_name=DEFAULT_CTX_ID
[MEMORY][PM] tid=     48773 used=              0 hold=      4,194,304 pm=0x7f4e2f73cec0 ctx_name=DEFAULT_CTX_ID
[MEMORY][PM] tid=     48774 used=              0 hold=      2,097,152 pm=0x7f4e2f432ec0 ctx_name=DEFAULT_CTX_ID
[MEMORY][PM] tid=     48775 used=              0 hold=      2,097,152 pm=0x7f4e2f128ec0 ctx_name=DEFAULT_CTX_ID
[MEMORY][PM] tid=     48776 used=              0 hold=      2,097,152 pm=0x7f4e2ee1eec0 ctx_name=DEFAULT_CTX_ID
[MEMORY][PM] tid=     48777 used=              0 hold=      2,097,152 pm=0x7f4e2eb14ec0 ctx_name=DEFAULT_CTX_ID
[MEMORY][PM] tid=     48780 used=              0 hold=      2,097,152 pm=0x7f4e2dff6ec0 ctx_name=DEFAULT_CTX_ID
[MEMORY][PM] tid=     48784 used=              0 hold=      2,097,152 pm=0x7f4e2d3ceec0 ctx_name=DEFAULT_CTX_ID
[MEMORY][PM] tid=   summary used=    128,949,496 hold=    153,092,096
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论