Saturday, February 5, 2011

vmalloc and pfring

Just incase anyone else out there is playing with pfring dependent systems... you might run into a condition where you try to spawn more pfring threads than the running system has allocated memory to support (side note, when things randomly fail for no good reason... checking dmesg should be your first course of action).

Anyway, you can set the vmalloc size as a boot parameter in grub... and if you want a fancy way of warning users if this problem may apply to them:

if [ `cat /proc/cpuinfo |grep processor|awk '{print $3}'` -gt 4 ] && [ `cat /proc/meminfo | grep VmallocTotal|awk '{print $2}'` -lt 262144 ];then
    echo "Your current Vmalloc value may be insufficient to handle the number of pf_ring threads your processor is capable of. Please consider settting vmalloc=256M as a kernel boot parameter to fix this"
fi

0 comments:

Post a Comment