amazon-web-services - RDS 吃掉所有交换空间

标签 amazon-web-services memory swap amazon-rds

我们一直在 RDS 中使用 MariaDB,我们注意到交换空间越来越高而没有被回收。然而,可用内存似乎没问题。请检查附件。

实例类型:db.t2.micro

可用内存:125Mb

交换空间:每 24 小时增加 5Mb

IOPS:已禁用

存储:10Gb(SSD)

很快 RDS 将吃掉所有交换空间,这将给应用程序带来很多问题。 有人有类似的问题吗? 最大交换空间是多少? (在文档中没有找到任何内容)

请帮忙!

enter image description here

enter image description here

最佳答案

有人遇到类似问题吗?

我在不同的实例类型上遇到了类似的问题。即使您切换到具有更多内存的更高实例类型,交换的趋势仍然存在。

您可以找到 AWS 的解释 here

Amazon RDS DB instances need to have pages in the RAM only when the pages are being accessed currently, for example, when executing queries. Other pages that are brought into the RAM by previously executed queries can be flushed to swap space if they haven't been used recently. It's a best practice to let the operating system (OS) swap older pages instead of forcing the OS to keep pages in memory. This helps make sure that there is enough free RAM available for upcoming queries.

分辨率:

Check both the FreeableMemory and the SwapUsage Amazon CloudWatch metrics to understand the overall memory usage pattern of your DB instance. Check these metrics for a decrease in the FreeableMemory metric that occurs at the same time as an increase in the SwapUsage metric. This can indicate that there is pressure on the memory of the DB instance.

最大交换空间是多少?

通过启用增强监控,您应该能够看到操作系统指标,例如可用交换内存量(以千字节为单位)。 查看详情here

关于amazon-web-services - RDS 吃掉所有交换空间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37393813/

相关文章:

c - 关于内存对齐的一些困惑

java - BufferedReader 字符串内存泄漏?

c - 如何通过良好的设计保留堆栈空间?

javascript - 在 div 之间交换类

C++,重载 std::swap,编译器错误,VS 2010

amazon-web-services - AWS CodePipeline : How to make ECR Image build by CodeBuild as an artifact for the remaining stages?

java - 获取 S3 中的上传和下载进度百分比

amazon-web-services - AWS API Gateway-如何在正文映射模板中获取日期/时间戳/纪元?

amazon-web-services - 通过 Cloud Formation 在 AWS Managed Cassandra Services 中创建表

c++ - 我不知道如何打印数组,反过来,我也不知道如何交换数组中的元素