charleschchen
作者charleschchen·2021-09-09 17:31
系统架构师·浪潮商用机器有限公司

AIX环境dump device too small告警问题分析

字数 2178阅读 2673评论 0赞 3

问题现象

某客户环境,分区内存为96GB,dump device设置为4GB,上线后频繁出现dump device too small告警。经查,sysdumpdev -e预估的 dump size 达到了 32GB 左右。

问题分析

客户环境 dump device too small 告警问题触发的原因是用户改动了一处默认参数:

# sysdumpdev -l

primary /dev/lg_dumplv

secondary /dev/sysdumpnull

copy directory /var/adm/ras

forced copy flag TRUE

always allow dump FALSE

dump compression ON

type of dump fw-assisted

full memory dump disallow <= 此处默认值应为 disallow ,即 selective memory dump 模式;客户报 dump device too small 的环境误将其改为 allow ,即 full memory dump 模式;

通常情况下,如果系统发生不可恢复的错误,需要宕机并记录 dump ,作用类似飞机的黑匣子。其过程如下( selective memory dump 模式 ):

system dump 默认是由固件辅助进行,故障 OS 根据 MDT/CDT (主 dump 表,组件 dump 表)来决定需要拷贝到 dump 设备文件的内容,由固件( POWER HYPERVISOR )保留内存内容并重启分区 OS ;在 OS 重启时, AIX 的 bootloader 会将保留的 dump 内容(保存在内存中)进行压缩,并拷贝到 dump 设备文件上,释放内存并启动 OS.

根据上述的说明,实际 dump 内容通常是选择性的、针对故障记录的,而且是压缩存储的,因此其大小通常比内存使用值小得多。比如 96GB 内存的分区常见的 dump size 通常在数 GB 左右。

Firmware Assisted Dump 支持的另外一种 dump 模式是 full memory dump 模式, dump 过程与上述类似,但不需要故障 OS 参与,即不需要读取 MDT/CDT 来决定需要拷贝到 dump 设备文件的内容。

Full memory dump 设置为 allow 的好处是,当故障系统不能正常响应 dump 请求时,仍可以直接将全部分区内存压缩记录到 dump 设备。由其原理可知,该设置造成的负面结果是 dump size需求会大大增加,正比于分区实配内存容量,而与 OS实际使用的内存量无关。因此,在客户环境中, 96GB 内存的分区的预估 dump size 达到了 32GB 左右。

考虑到 POWER/AIX 环境使用 firmware assisted dump 之后(在 POWER6/AIX6.1 以上的环境),已经最小化故障 OS 的工作量,实际故障宕机的情况下,成功生成 dump 的成功率极高,

"When a firmware assisted dump is initiated, the failing operating system determines the data that needs to be included in the dump, and then requests that the platform firmware freeze this area of physical memory. Writing of the dump data is deferred until the operating system is booted again.

The main objective of the firmware assisted dump feature is to minimize the amount of work that must be done by the failing operating system. A secondary benefit of the feature is that the overall recovery time can be reduced, since the dump data can be written to the dump device in parallel with the normal boot of the operating system."

因此,使用默认的selective memory dump模式已经足够应付大多数系统宕机场景 ;对于少部分罕见的必须启用 full memory dump 的场景,可以根据 support 人员特别指引,针对部分分区激活此设定。注意如果出现 full memory dump 的情况,因为需要拷贝的内容极大(全部分区内存),分区重启需要的时间会大大增加(很可能需要半小时以上的时间)。

综上,建议客户改回默认 dump 设定,命令如下:


# sysdumpdev -f disallow

如果觉得我的文章对您有用,请点赞。您的支持将鼓励我继续创作!

3

添加新评论0 条评论

Ctrl+Enter 发表

作者其他文章

相关文章

相关问题

相关资料

X社区推广