How did GPCC calculate buffer/cache usage in cluster metrics page.
search cancel

How did GPCC calculate buffer/cache usage in cluster metrics page.

book

Article ID: 296373

calendar_today

Updated On:

Products

VMware Tanzu Greenplum

Issue/Introduction

How did GPCC calculate buffer/cache usage in cluster metrics page.

We may notice buffer/cache usage is near 100%, while memory used is less than 10% in GPCC cluster metrics page.

Environment

Product Version: 7.0

Resolution

Here is how GPCC calculate the buffer/cache usage.

+ get the Buffers from /proc/meminfo.
+ get the Cached from /proc/meminfo.
+ get the SReclaimable (if it exists) from /proc/meminfo.
+ get the MemTotal from /proc/meminfo .
+ store the Cached +SReclaimable in mem_cached column of “gpmetics.gpcc_system_history” table.
+ store the Buffers in mem_buffers column of “gpmetics.gpcc_system_history” table.
+ store the MemTotal in mem_total column of “gpmetics.gpcc_system_history” table.
+ the web page will show avg(mem_buffers + mem_cached) / avg(mem_total)) as the “buffer/cache” over the time.