Хабр Курсы для всех
РЕКЛАМА
Практикум, Хекслет, SkyPro, авторские курсы — собрали всех и попросили скидки. Осталось выбрать!
net.ipv4.neigh.default.gc_thresh1 = 1024
net.ipv4.neigh.default.gc_thresh2 = 2048
net.ipv4.neigh.default.gc_thresh3 = 4096
ncpus=`grep -ciw ^processor /proc/cpuinfo`
test "$ncpus" -gt 1 || exit 1
n=0
for irq in `cat /proc/interrupts | grep eth | awk '{print $1}' | sed s/\://g`
do
f="/proc/irq/$irq/smp_affinity"
test -r "$f" || continue
cpu=$[$ncpus - ($n % $ncpus) - 1]
if [ $cpu -ge 0 ]
then
mask=`printf %x $[2 ** $cpu]`
echo "Assign SMP affinity: eth$n, irq $irq, cpu $cpu, mask 0x$mask"
echo "$mask" > "$f"
let n+=1
fi
done
root@ххх:/proc/irq# echo 100000000 > 109/smp_affinity
-bash: echo: write error: Value too large for defined data type----total-cpu-usage---- -dsk/total- -net/total- ---paging-- ---system--
usr sys idl wai hiq siq| read writ| recv send| in out | int csw
15 12 70 0 0 2| 17M 1380M|1109M 28M| 0 0 | 469k 847k
15 12 70 0 0 3| 16M 1669M|1116M 28M| 0 0 | 481k 868k
14 12 72 0 0 2|8924k 1374M| 998M 25M| 0 0 | 438k 766k
15 13 69 0 0 3| 23M 1672M|1130M 28M| 0 0 | 482k 822k
15 12 70 0 0 3| 16M 1542M|1119M 28M| 0 0 | 482k 869k
15 13 69 0 0 3| 20M 1521M|1121M 28M| 0 0 | 483k 894k
15 12 70 0 0 3| 15M 1647M|1130M 28M| 0 0 | 482k 897k
15 12 71 1 0 2| 18M 1356M|1357M 34M| 0 0 | 477k 857k
15 13 69 0 0 2|8596k 1524M|1118M 28M| 0 0 | 478k 920k
15 12 70 0 0 3| 12M 1642M|1112M 28M| 0 0 | 479k 873k
15 12 70 0 0 2| 24M 1384M|1119M 28M| 0 0 | 473k 898k
15 13 70 0 0 3| 22M 1610M|1113M 28M| 0 0 | 477k 930k
15 12 70 0 0 2| 18M 1406M|1114M 28M| 0 0 | 472k 929k
Большие потоки трафика и управление прерываниями в Linux