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