RDS Instance Active+Free Memory is less than Total Memory

0

I've created Aurora PostgreSQL with 'db.r5.2xlarge' instance type which has 64GiB memory. I checked 'Enhanced Monitoring' for one of the RDS instance, checked graph for - Total Memory, Active Memory, Free Memory. My expectation was at any point in time, sum of Free Memory and Active Memory should be equal to Total Memory.

But, in monitoring graph, I can see sum of Free and Active memory is ~18GiB. And total memory is 62.13GiB.

RDS memory usage graph

I want to understand if I'm reading metrices correctly. Why there is so much difference between sum of active , free memory And total memory?

已提问 2 年前1526 查看次数
1 回答
1
已接受的回答

Please note, total memory is not the summation of free and active memory of your Aurora Postgres instances. In Aurora Postgres, I/O is handled by the Aurora storage driver. There is no file system or secondary level of caching for tables or indexes. This means that shared_buffers should be larger than what the PostgreSQL community recommends.

For Aurora DB instances, the default value of the DB parameter group shared_buffers is set between 50% and 75%, depending on the instance class. This is because Aurora PostgreSQL eliminates double buffering and doesn't utilize file system cache. As a result, Aurora PostgreSQL can increase shared_buffers to improve performance. It's a best practice to use the default value of 75% for the shared_buffers DB parameter when using Aurora PostgreSQL. A smaller value can degrade performance by reducing the available memory to the data pages while also increasing I/O on the Aurora storage subsystem.[1]

[1] https://aws.amazon.com/premiumsupport/knowledge-center/rds-aurora-postgresql-shared-buffers/

You can read more about memory and buffer related parameters in Aurora Postgres here: https://aws.amazon.com/blogs/database/amazon-aurora-postgresql-parameters-part-1-memory-and-query-plan-management/#:~:text=Memory%20and%20buffer%20related%20parameters

AWS
支持工程师
Rajan_L
已回答 2 年前
profile picture
专家
已审核 4 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则