iSCSI存储上的页面分配失败

我们在Infiniband总线(ipoib)上运行CentOS 6.3 iscsi服务器(16GB RAM)。

当负载很高,我可以看到多个错误:

 Sep 3 23:22:20 stor4内核:tgtd:页面分配失败。 顺序:2,模式:0x20
 Sep 3 23:22:20 stor4 kernel:Pid:3637,comm:tgtd没有污染2.6.32#1
 Sep 3 23:22:20 stor4 kernel:呼叫跟踪:
 Sep 3 23:22:20 stor4 kernel:[]?  __alloc_pages_nodemask + 0x77f / 0x940
 Sep 3 23:22:20 stor4 kernel:[]?  kmem_getpages + 0X62 /量0x170
 Sep 3 23:22:20 stor4 kernel:[]?  fallback_alloc + 0x1ba / 0x270
 Sep 3 23:22:20 stor4 kernel:[]?  cache_grow + 0x2cf / 0×320
 Sep 3 23:22:20 stor4 kernel:[]?  ____ cache_alloc_node + 0x99 / 0x160
 Sep 3 23:22:20 stor4 kernel:[]?  pskb_expand_head + 0x64 / 0x270
 Sep 3 23:22:20 stor4 kernel:[]?  __kmalloc + 0x189 / 0x220
 Sep 3 23:22:20 stor4 kernel:[]?  pskb_expand_head + 0x64 / 0x270
 Sep 3 23:22:20 stor4 kernel:[]?  __pskb_pull_tail + 0x2aa / 0x360的
 Sep 3 23:22:20 stor4 kernel:[]?  tcp_init_tso_segs + 0×37 /为0x50
 Sep 3 23:22:20 stor4 kernel:[]?  dev_queue_xmit + 0x4bb / 0x6f0
 Sep 3 23:22:20 stor4 kernel:[]?  neigh_connected_output + 0xbd / 0x100的
 Sep 3 23:22:20 stor4 kernel:[]?  ip_finish_output + 0x237 / 0x310
 Sep 3 23:22:20 stor4 kernel:[]? 在ip_output + 0xb8 /将0xC0
 Sep 3 23:22:20 stor4 kernel:[]?  __ip_local_out + 0x9f / 0XB0
 Sep 3 23:22:20 stor4 kernel:[]?  ip_local_out + 0x25 /的0x30
 Sep 3 23:22:20 stor4 kernel:[]?  ip_queue_xmit + 0×190 /量0x420
 Sep 3 23:22:20 stor4 kernel:[]?  sock_aio_write + 0x167 /量0x180
 Sep 3 23:22:20 stor4 kernel:[]?  tcp_transmit_skb + 0x3fe / 0x7b0
 Sep 3 23:22:20 stor4 kernel:[]?  tcp_write_xmit + 0x1fb / 0xa20
 Sep 3 23:22:20 stor4 kernel:[]?  __tcp_push_pending_frames +的0x30 / 0xe0的
 Sep 3 23:22:20 stor4 kernel:[]?  tcp_push_pending_frames + 0x33 / 0x40的
 Sep 3 23:22:20 stor4 kernel:[]?  do_tcp_setsockopt + 0x3d6 / 0x480
 Sep 3 23:22:20 stor4 kernel:[]?  tcp_setsockopt + 0x2a /的0x30
 Sep 3 23:22:20 stor4 kernel:[]?  sock_common_setsockopt + 0×14 / 0x20的
 Sep 3 23:22:20 stor4 kernel:[]?  sys_setsockopt + 0x7f的/ 0xe0的
 Sep 3 23:22:20 stor4 kernel:[]?  system_call_fastpath + 0x16 / 0x1b
 Sep 3 23:22:20 stor4 kernel:Mem-Info:
 Sep 3 23:22:20 stor4 kernel:节点0 DMA per-cpu:
 Sep 3 23:22:20 stor4内核:CPU 0:hi:0,btch:1 usd:0
 Sep 3 23:22:20 stor4内核:CPU 1:hi:0,btch:1 usd:0
 Sep 3 23:22:20 stor4内核:CPU 2:hi:0,btch:1 usd:0
 Sep 3 23:22:20 stor4内核:CPU 3:hi:0,btch:1 usd:0
 Sep 3 23:22:20 stor4 kernel:节点0 DMA32 per-cpu:
 Sep 3 23:22:20 stor4 kernel:CPU 0:hi:186,btch:31 usd:183
 Sep 3 23:22:20 stor4 kernel:CPU 1:hi:186,btch:31 usd:23
 Sep 3 23:22:20 stor4 kernel:CPU 2:hi:186,btch:31 usd:183
 Sep 3 23:22:20 stor4 kernel:CPU 3:hi:186,btch:31 usd:181
 9月3日23:22:20 stor4内核:节点0正常每CPU:
 Sep 3 23:22:20 stor4 kernel:CPU 0:hi:186,btch:31 usd:171
 Sep 3 23:22:20 stor4 kernel:CPU 1:hi:186,btch:31 usd:29
 Sep 3 23:22:20 stor4 kernel:CPU 2:hi:186,btch:31 usd:32
 Sep 3 23:22:20 stor4 kernel:CPU 3:hi:186,btch:31 usd:32
 Sep 3 23:22:20 stor4 kernel:active_anon:1875 inactive_anon:2473 isolated_anon:0
 Sep 3 23:22:20 stor4 kernel:active_file:1243637 inactive_file:2505055 isolated_file:0
 Sep 3 23:22:20 stor4 kernel:unevictable:0 dirty:268338 writeback:0 unstable:0
 Sep 3 23:22:20 stor4 kernel:free:86050 slab_reclaimable:132377 slab_unreclaimable:23744
 Sep 3 23:22:20 stor4 kernel:mapped:1293 shmem:222 pagetables:720 bounce:0
 9月3日23:22:20 stor4内核:节点0 DMA免费:15732kB最低:124kB低:152kB高:184kB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB隔离(anon):0kB隔离(文件) :0kB present:15332kB mlocked:0kB脏:0kB回写:0kB映射:0kB shmem:0kB slab_reclaimable:0kB slab_unreclaimable:0kB kernel_stack:0kB pagetables:0kB不稳定:0kB反弹:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? 是
 Sep 3 23:22:20 stor4 kernel:lowmem_reserve []:0 2172 16060 16060
 Sep 3 23:22:20 stor4 kernel:Node 0 DMA32 free:107544kB min:18268kB low:22832kB high:27400kB active_anon:468kB inactive_anon:2364kB active_file:566208kB inactive_file:976112kB unevictable:0kB隔离(anon):0kB隔离(file) :0kB present:2224900kB mlocked:0kB dirty:96816kB writeback:0kB mapped:908kB shmem:12kB slab_reclaimable:176940kB slab_unreclaimable:968kB kernel_stack:64kB pagetables:192kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? 没有
 Sep 3 23:22:20 stor4 kernel:lowmem_reserve []:0 0 13887 13887
 9月3日23:22:20 stor4内核:节点0正常空闲:220924kB最低:116772kB低:145964kB高:175156kB active_anon:7032kB inactive_anon:7528kB active_file:4408340kB inactive_file:9044108kB unevictable:0kB隔离(anon):0kB隔离(文件) :0kB present:14220800kB mlocked:0kB dirty:976536kB writeback:0kB mapped:4264kB shmem:876kB slab_reclaimable:352568kB slab_unreclaimable:94008kB kernel_stack:2048kB pagetables:2688kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? 没有
 Sep 3 23:22:20 stor4 kernel:lowmem_reserve []:0 0 0 0
 Sep 3 23:22:20 stor4 kernel:Node 0 DMA:1 * 4kB 0 * 8kB 1 * 16kB 1 * 32kB 1 * 64kB 0 * 128kB 1 * 256kB 0 * 512kB 1 * 1024kB 1 * 2048kB 3 * 4096kB = 15732kB
 Sep 3 23:22:20 stor4 kernel:Node 0 DMA32:16305 * 4kB 4381 * 8kB 353 * 16kB 8 * 32kB 1 * 64kB 1 * 128kB 0 * 256kB 1 * 512kB 1 * 1024kB 0 * 2048kB 0 * 4096kB = 107900kB
 Sep 3 23:22:20 stor4 kernel:Node 0 Normal:14548 * 4kB 14808 * 8kB 2420 * 16kB 31 * 32kB 5 * 64kB 0 * 128kB 0 * 256kB 0 * 512kB 0 * 1024kB 0 * 2048kB 1 * 4096kB = 220784kB
 Sep 3 23:22:20 stor4内核:3748822共有pagecache页面
 Sep 3 23:22:20 stor4 kernel:交换caching中有0个页面
 Sep 3 23:22:20 stor4 kernel:交换caching统计信息:添加0,删除0,查找0/0
 Sep 3 23:22:20 stor4 kernel:Free swap = 975864kB
 Sep 3 23:22:20 stor4 kernel:Total swap = 975864kB
 Sep 3 23:22:20 stor4 kernel:4194303 pages RAM
 Sep 3 23:22:20 stor4 kernel:126915页保留
 Sep 3 23:22:20 stor4 kernel:共享3753534个页面
 9月3日23:22:20 stor4内核:213500页非共享

TCP堆栈和VMconfiguration:

 net.core.rmem_max = 83886080
 net.core.wmem_max = 83886080
 net.core.rmem_default = 65536
 net.core.wmem_default = 65536
 net.ipv4.tcp_rmem = 40960 1048560 4194304
 net.ipv4.tcp_wmem = 40960 196608 4194304
 net.ipv4.tcp_mem = 16388608 16388608 16388608
 vm.min_free_kbytes = 135168

额外的调整:

 / sbin / blockdev --setra 16384 / dev / sdb
 echo 2048> / sys / block / sdb / queue / nr_requests

问题在哪里? 谢谢。

有几件事情你可以尝试…但IPoIB上的iSCSI听起来有点混乱。 显然,如果您使用Infiniband,性能必须重要。

  • 在错误之外,性能如何?
  • 这是可重复的吗? 你可以按需求触发它,或只是在dmesg环形缓冲区中堆积的信息?
  • 在挂载的iSCSI设备上使用什么文件系统? 这可能会影响我的build议。

无论如何,因为你在CentOS 6.3上,我会认真考虑启用tuned-admconfiguration文件集。 对于你来说,如果还没有安装,运行yum install tuned tuned-utils并且尝试“企业存储”configuration文件:

tuned-adm profile enterprise-storage

这将把您的I / O电梯移动到截止日程安排程序 ,将kernel.sched_min_ granularity_ns更改为10ms,对vm子系统进行一些调整,删除写入障碍,修改CPU调速器并提高磁盘预读。 您也可以将您的sysctl和sysfs设置移动到一个自定义configuration文件。

恢复到您的原始设置可以通过tuned-adm off 。 这些命令在运行中是安全的。 你可以testing并报告回来吗?