本站部分文章、图片属于网络上可搜索到的公开信息,均用于学习和交流用途,不能代表睿象云的观点、立场或意见。我们接受网民的监督,如发现任何违法内容或侵犯了您的权益,请第一时间联系小编邮箱jiasou666@gmail.com 处理。
blocked for more than 120 seconds
在导入数据的时候,服务器突然无反应,连接不上,基本上就判定死掉了,重启服务器后查看日志如下:
Mar 26 08:13:01 localhost kernel: INFO: task flush-8:0:26079 blocked for more than 120 seconds.Mar 26 08:13:01 localhost kernel: Tainted: P --------------- 2.6.32-431.el6.x86_64 #1Mar 26 08:13:01 localhost kernel: "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.Mar 26 08:13:01 localhost kernel: flush-8:0 D 0000000000000001 0 26079 2 0x00000080Mar 26 08:13:01 localhost kernel: ffff8804359118c0 0000000000000046 0000000000000000 ffff880436a5cb18Mar 26 08:13:01 localhost kernel: ffff880435911860 ffffffff81068a53 ffffffffa0109300 ffff880436a5cb18Mar 26 08:13:01 localhost kernel: ffff880436a5d098 ffff880435911fd8 000000000000fbc8 ffff880436a5d098Mar 26 08:13:01 localhost kernel: Call Trace:Mar 26 08:13:01 localhost kernel: [] ? dequeue_entity+0x113/0x2e0Mar 26 08:13:01 localhost kernel: [] ? noalloc_get_block_write+0x0/0x60 [ext4]Mar 26 08:13:01 localhost kernel: [] ? sync_page+0x0/0x50Mar 26 08:13:01 localhost kernel: [] io_schedule+0x73/0xc0Mar 26 08:13:01 localhost kernel: [] sync_page+0x3d/0x50Mar 26 08:13:01 localhost kernel: [] __wait_on_bit_lock+0x5a/0xc0Mar 26 08:13:01 localhost kernel: [] __lock_page+0x67/0x70Mar 26 08:13:01 localhost kernel: [] ? wake_bit_function+0x0/0x50Mar 26 08:13:01 localhost kernel: [] ? pagevec_lookup_tag+0x25/0x40Mar 26 08:13:01 localhost kernel: [] write_cache_pages_da+0x44f/0x470 [ext4]Mar 26 08:13:01 localhost kernel: [] ? jbd2_journal_start+0xb5/0x100 [jbd2]Mar 26 08:13:01 localhost kernel: [] ext4_da_writepages+0x2d2/0x620 [ext4]Mar 26 08:13:01 localhost kernel: [] do_writepages+0x21/0x40Mar 26 08:13:01 localhost kernel: [] writeback_single_inode+0xdd/0x290Mar 26 08:13:01 localhost kernel: [] writeback_sb_inodes+0xbd/0x170Mar 26 08:13:01 localhost kernel: [] writeback_inodes_wb+0xab/0x1b0Mar 26 08:13:01 localhost kernel: [] wb_writeback+0x2f3/0x410Mar 26 08:13:01 localhost kernel: [] ? thread_return+0x4e/0x76eMar 26 08:13:01 localhost kernel: [] ? del_timer_sync+0x22/0x30Mar 26 08:13:01 localhost kernel: [] wb_do_writeback+0x1a5/0x240Mar 26 08:13:01 localhost kernel: [] bdi_writeback_task+0x63/0x1b0Mar 26 08:13:01 localhost kernel: [] ? bit_waitqueue+0x17/0xd0Mar 26 08:13:01 localhost kernel: [] ? bdi_start_fn+0x0/0x100Mar 26 08:13:01 localhost kernel: [] bdi_start_fn+0x86/0x100Mar 26 08:13:01 localhost kernel: [] ? bdi_start_fn+0x0/0x100Mar 26 08:13:01 localhost kernel: [] kthread+0x96/0xa0Mar 26 08:13:01 localhost kernel: [] child_rip+0xa/0x20Mar 26 08:13:01 localhost kernel: [] ? kthread+0x0/0xa0Mar 26 08:13:01 localhost kernel: [] ? child_rip+0x0/0x20
linux会设置40%的可用内存用来做系统cache,当flush数据时这40%内存中的数据由于和IO同步问题导致超时(120s),所将40%减小到10%,避免超时。
修改内核参数:
| # vim /etc/sysctrl.conf vm.dirty_background_ratio=5 vm.dirty_ratio=10 |
暂时没有评论,来抢沙发吧~