打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
readhat上的hung_task_timeout_secs参数

这是一个在客户现场碰到的问题,问题很简单,但是之前没有碰到过,大概是在readhat上装数据库较少吧,记录一下:
客户有一台服务器,安装了VMW软件做了虚拟化,在其上搭建了一台readhat虚拟机,起初给的内存为16G,在添加了12G的内存后,将虚拟机的内存调整到了20G
调整完后主机这边就一直报错:
Nov 5 13:05:41 RedHat5 kernel: INFO: task oracle:22439 blocked for more than 120 seconds.
Nov 5 13:05:41 RedHat5 kernel: “echo 0 > /proc/sys/kernel/hung_task_timeout_secs” disables this message.
查询了资料后对于该参数的了解为后台对进行的任务由于超时而挂起
从以上的报错信息也给出了简单的解决方案,就是禁止该120秒的超时:echo 0 > /proc/sys/kernel/hung_task_timeout_secs
随后询问了主机工程师:给出方案是按照告警里的提示将该提醒disable

后续询问后给出如下解释:
This is a know bug. By default Linux uses up to 40% of the available memory for file system caching.
After this mark has been reached the file system flushes all outstanding data to disk causing all following IOs going synchronous.
For flushing out this data to disk this there is a time limit of 120 seconds by default.
In the case here the IO subsystem is not fast enough to flush the data withing 120 seconds.
This especially happens on systems with a lof of memory.

The problem is solved in later kernels and there is not “fix” from Oracle.
I fixed this by lowering the mark for flushing the cache from 40% to 10% by setting “vm.dirty_ratio=10″ in /etc/sysctl.conf.
This setting does not influence overall database performance since you hopefully use Direct IO and bypass the file system cache completely.
告知是linux会设置40%的可用内存用来做系统cache,当flush数据时这40%内存中的数据由于和IO同步问题导致超时(120s),所将40%减小到10%,避免超时。

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
Linux内核死锁检测机制 | OenHan
浅谈linux的死锁检测
mysql提高insert into 插入速度的方法
从Oracle到PostgreSQL:一文掌握Checkpoint重要概念
mysql_优化参数整理
Python “黑魔法” 之 Generator Coroutines
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服