ipvsadm 提示Memory allocation problem
ipvsadm
Memory allocation problem
查看/var/log/messages:
提示 vmap allocation for size 12513280 failed: use vmalloc=<size> to increase size.
该语句重复很多次。
通过vmap allocation for size 12513280 failed上网查找,发现是虚拟地址空间不足导致的。下面是原文:
The kernel reserves a small chunk of memory at boot time for use as virtual addressing space. This space is used by drivers and the kernel (among other things) to map hardware to chunks of memory in fixed places. If your 32-bit machine has 1Gb or less of RAM the Linux kernel reserves a minimum of 128Mb for virtual memory addressing
执行cat /proc/meminfo | grep Vmalloc命令,
VmallocTotal: 122880kB
VmallocUsed: 5892kB
VmallocChunk: 103312kB
可以看到内核允许最大的虚拟地址空间120M
于是修改kernel /vmlinuz-2.6.32-220-el6.i686 root=UUID=1029384-7e40-ffd2-9968-7a8b9e78f9g7s ro vmalloc=600M
而后 有我的问题
ipvsadm -A -n (vip)-s rr
ipvsadm -a -t (vip:80) -r (节点:80) -g
而后报错
Memory allocation problem
ipvsadm -A -n (vip:80)-s rr
不报错l