[curious] interface aliases changing performance

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[curious] interface aliases changing performance

Vadim Goncharov
Hi!

After looking at humotous quoting about a man trying to ban unused addresses in
his network by putting 65535 ifcong_XXX_aliasYYY lines to rc.conf, I decided to
check this performance issue on a 6.2-RELEASE (GENERIC) and compare it with
Linux. Below are results from two machines.

First, I've found that both FreeBSD and Linux clearly use linked-list insertion
to tail of queue, because time was growing as O(N^2). Then, Linux deleted it
slowly at first, then faster (is it using LIFO?..).

But Linux with iproute2 was 6 times faster on addition (FreeBSD did it ONE HOUR!),
and even more faster on deletion. Why?..


FreeBSD (addition only):

$ cat /usr/local/etc/rc.d/evil_ifconfig.sh
#!/bin/sh

i=0
starttime=$(date +%s)

while [ $i -lt 65534 ]; do
        ipa=$(($i % 256))
        net=$(($i / 256))
        /sbin/ifconfig re0 192.168.$net.$ipa/32 alias
        [ $ipa -eq 0 ] && echo $0: starting net $net @ $((`date +%s` - $starttime)) sec | tee -a /root/evil_ifconfig.log
        i=$(($i + 1))
done

$ head -n 20 /var/run/dmesg.boot
Copyright (c) 1992-2007 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
        The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 6.2-RELEASE #0: Fri Jan 12 11:05:30 UTC 2007
    [hidden email]:/usr/obj/usr/src/sys/SMP
ACPI APIC Table: <GBT    GBTUACPI>
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: Intel(R) Pentium(R) D CPU 2.80GHz (2813.54-MHz 686-class CPU)
  Origin = "GenuineIntel"  Id = 0xf47  Stepping = 7
  Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
  Features2=0x641d<SSE3,RSVD2,MON,DS_CPL,CNTX-ID,CX16,<b14>>
  AMD Features=0x20100000<NX,LM>
  AMD Features2=0x1<LAHF>
  Cores per package: 2
real memory  = 1073676288 (1023 MB)
avail memory = 1041485824 (993 MB)
FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
 cpu0 (BSP): APIC ID:  0
 cpu1 (AP): APIC ID:  1

$ cat /root/evil_ifconfig.log
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 0 @ 0 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 1 @ 6 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 2 @ 12 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 3 @ 17 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 4 @ 23 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 5 @ 29 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 6 @ 35 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 7 @ 42 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 8 @ 48 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 9 @ 54 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 10 @ 60 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 11 @ 67 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 12 @ 73 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 13 @ 80 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 14 @ 86 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 15 @ 93 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 16 @ 100 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 17 @ 106 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 18 @ 113 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 19 @ 120 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 20 @ 127 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 21 @ 135 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 22 @ 142 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 23 @ 149 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 24 @ 156 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 25 @ 164 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 26 @ 171 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 27 @ 179 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 28 @ 186 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 29 @ 194 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 30 @ 202 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 31 @ 209 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 32 @ 217 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 33 @ 225 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 34 @ 233 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 35 @ 241 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 36 @ 249 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 37 @ 257 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 38 @ 266 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 39 @ 274 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 40 @ 282 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 41 @ 291 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 42 @ 299 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 43 @ 308 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 44 @ 316 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 45 @ 325 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 46 @ 334 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 47 @ 343 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 48 @ 351 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 49 @ 360 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 50 @ 369 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 51 @ 378 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 52 @ 387 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 53 @ 397 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 54 @ 406 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 55 @ 415 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 56 @ 424 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 57 @ 434 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 58 @ 443 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 59 @ 453 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 60 @ 463 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 61 @ 472 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 62 @ 482 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 63 @ 492 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 64 @ 502 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 65 @ 512 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 66 @ 522 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 67 @ 532 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 68 @ 542 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 69 @ 552 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 70 @ 562 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 71 @ 572 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 72 @ 583 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 73 @ 593 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 74 @ 604 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 75 @ 614 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 76 @ 625 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 77 @ 636 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 78 @ 646 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 79 @ 657 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 80 @ 668 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 81 @ 679 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 82 @ 690 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 83 @ 701 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 84 @ 712 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 85 @ 724 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 86 @ 735 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 87 @ 746 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 88 @ 758 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 89 @ 769 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 90 @ 780 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 91 @ 792 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 92 @ 804 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 93 @ 815 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 94 @ 827 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 95 @ 839 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 96 @ 851 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 97 @ 863 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 98 @ 875 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 99 @ 887 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 100 @ 899 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 101 @ 911 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 102 @ 924 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 103 @ 936 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 104 @ 948 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 105 @ 961 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 106 @ 973 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 107 @ 986 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 108 @ 999 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 109 @ 1011 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 110 @ 1024 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 111 @ 1037 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 112 @ 1050 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 113 @ 1063 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 114 @ 1076 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 115 @ 1089 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 116 @ 1102 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 117 @ 1115 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 118 @ 1129 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 119 @ 1142 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 120 @ 1155 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 121 @ 1169 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 122 @ 1182 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 123 @ 1196 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 124 @ 1209 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 125 @ 1223 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 126 @ 1237 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 127 @ 1251 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 128 @ 1264 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 129 @ 1278 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 130 @ 1292 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 131 @ 1307 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 132 @ 1321 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 133 @ 1335 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 134 @ 1349 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 135 @ 1363 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 136 @ 1378 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 137 @ 1392 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 138 @ 1407 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 139 @ 1421 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 140 @ 1436 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 141 @ 1451 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 142 @ 1465 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 143 @ 1480 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 144 @ 1495 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 145 @ 1510 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 146 @ 1525 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 147 @ 1540 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 148 @ 1555 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 149 @ 1570 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 150 @ 1586 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 151 @ 1601 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 152 @ 1616 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 153 @ 1632 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 154 @ 1647 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 155 @ 1663 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 156 @ 1678 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 157 @ 1694 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 158 @ 1710 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 159 @ 1725 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 160 @ 1741 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 161 @ 1757 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 162 @ 1773 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 163 @ 1789 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 164 @ 1805 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 165 @ 1821 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 166 @ 1838 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 167 @ 1854 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 168 @ 1870 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 169 @ 1887 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 170 @ 1903 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 171 @ 1920 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 172 @ 1936 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 173 @ 1953 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 174 @ 1970 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 175 @ 1986 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 176 @ 2003 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 177 @ 2020 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 178 @ 2037 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 179 @ 2054 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 180 @ 2071 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 181 @ 2088 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 182 @ 2106 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 183 @ 2123 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 184 @ 2140 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 185 @ 2158 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 186 @ 2175 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 187 @ 2193 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 188 @ 2211 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 189 @ 2228 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 190 @ 2246 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 191 @ 2264 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 192 @ 2282 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 193 @ 2300 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 194 @ 2317 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 195 @ 2336 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 196 @ 2354 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 197 @ 2372 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 198 @ 2390 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 199 @ 2408 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 200 @ 2427 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 201 @ 2445 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 202 @ 2464 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 203 @ 2482 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 204 @ 2501 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 205 @ 2519 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 206 @ 2538 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 207 @ 2557 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 208 @ 2576 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 209 @ 2595 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 210 @ 2614 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 211 @ 2633 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 212 @ 2652 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 213 @ 2671 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 214 @ 2691 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 215 @ 2710 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 216 @ 2729 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 217 @ 2749 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 218 @ 2768 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 219 @ 2788 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 220 @ 2807 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 221 @ 2827 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 222 @ 2847 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 223 @ 2866 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 224 @ 2886 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 225 @ 2906 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 226 @ 2926 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 227 @ 2946 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 228 @ 2966 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 229 @ 2986 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 230 @ 3007 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 231 @ 3027 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 232 @ 3047 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 233 @ 3068 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 234 @ 3088 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 235 @ 3109 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 236 @ 3129 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 237 @ 3150 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 238 @ 3171 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 239 @ 3192 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 240 @ 3212 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 241 @ 3233 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 242 @ 3254 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 243 @ 3275 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 244 @ 3296 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 245 @ 3317 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 246 @ 3339 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 247 @ 3360 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 248 @ 3381 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 249 @ 3403 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 250 @ 3424 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 251 @ 3446 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 252 @ 3468 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 253 @ 3492 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 254 @ 3513 sec
/usr/local/etc/rc.d/evil_ifconfig.sh: starting net 255 @ 3535 sec


The same on Linux:

$ cat /root/evil_ifconfig.sh
#!/bin/sh

i=0
starttime=$(date +%s)

while [ $i -lt 65534 ]; do
        ipa=$(($i % 256))
        net=$(($i / 256))
        ip a a 172.18.$net.$ipa/32 dev eth0
        [ $ipa -eq 0 ] && echo $0: starting net $net @ $((`date +%s` - $starttime)) sec | tee -a /root/evil_ifconfig.log
        i=$(($i + 1))
done

$ cat /proc/cpuinfo      # 4 processor machine, showing one node
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 15
model name      : Intel(R) Xeon(R) CPU            5150  @ 2.66GHz
stepping        : 6
cpu MHz         : 2660.033
cache size      : 4096 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 2
fpu             : yes
fpu_exception   : yes
cpuid level     : 10
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx lm
constant_tsc pni monitor ds_cpl vmx est tm2 cx16 xtpr lahf_lm
bogomips        : 5328.25
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

$ free
             total       used       free     shared    buffers     cached
Mem:       8179404     513200    7666204          0      75896     190356
-/+ buffers/cache:     246948    7932456
Swap:      2104472          0    2104472

$ uname -a
Linux node-7 2.6.16.21-0.8-smp #1 SMP Mon Jul 3 18:25:39 UTC 2006 x86_64 x86_64
x86_64 GNU/Linux

$ cat /root/eveil_ifconfig.log
./evil_ifconfig.sh: starting net 0 @ 0 sec
./evil_ifconfig.sh: starting net 1 @ 0 sec
./evil_ifconfig.sh: starting net 2 @ 1 sec
./evil_ifconfig.sh: starting net 3 @ 1 sec
./evil_ifconfig.sh: starting net 4 @ 1 sec
./evil_ifconfig.sh: starting net 5 @ 1 sec
./evil_ifconfig.sh: starting net 6 @ 1 sec
./evil_ifconfig.sh: starting net 7 @ 2 sec
./evil_ifconfig.sh: starting net 8 @ 2 sec
./evil_ifconfig.sh: starting net 9 @ 2 sec
./evil_ifconfig.sh: starting net 10 @ 2 sec
./evil_ifconfig.sh: starting net 11 @ 3 sec
./evil_ifconfig.sh: starting net 12 @ 3 sec
./evil_ifconfig.sh: starting net 13 @ 3 sec
./evil_ifconfig.sh: starting net 14 @ 3 sec
./evil_ifconfig.sh: starting net 15 @ 3 sec
./evil_ifconfig.sh: starting net 16 @ 4 sec
./evil_ifconfig.sh: starting net 17 @ 4 sec
./evil_ifconfig.sh: starting net 18 @ 4 sec
./evil_ifconfig.sh: starting net 19 @ 5 sec
./evil_ifconfig.sh: starting net 20 @ 5 sec
./evil_ifconfig.sh: starting net 21 @ 5 sec
./evil_ifconfig.sh: starting net 22 @ 5 sec
./evil_ifconfig.sh: starting net 23 @ 6 sec
./evil_ifconfig.sh: starting net 24 @ 6 sec
./evil_ifconfig.sh: starting net 25 @ 6 sec
./evil_ifconfig.sh: starting net 26 @ 7 sec
./evil_ifconfig.sh: starting net 27 @ 7 sec
./evil_ifconfig.sh: starting net 28 @ 8 sec
./evil_ifconfig.sh: starting net 29 @ 8 sec
./evil_ifconfig.sh: starting net 30 @ 9 sec
./evil_ifconfig.sh: starting net 31 @ 9 sec
./evil_ifconfig.sh: starting net 32 @ 10 sec
./evil_ifconfig.sh: starting net 33 @ 10 sec
./evil_ifconfig.sh: starting net 34 @ 11 sec
./evil_ifconfig.sh: starting net 35 @ 11 sec
./evil_ifconfig.sh: starting net 36 @ 12 sec
./evil_ifconfig.sh: starting net 37 @ 13 sec
./evil_ifconfig.sh: starting net 38 @ 13 sec
./evil_ifconfig.sh: starting net 39 @ 14 sec
./evil_ifconfig.sh: starting net 40 @ 15 sec
./evil_ifconfig.sh: starting net 41 @ 15 sec
./evil_ifconfig.sh: starting net 42 @ 16 sec
./evil_ifconfig.sh: starting net 43 @ 17 sec
./evil_ifconfig.sh: starting net 44 @ 18 sec
./evil_ifconfig.sh: starting net 45 @ 19 sec
./evil_ifconfig.sh: starting net 46 @ 19 sec
./evil_ifconfig.sh: starting net 47 @ 20 sec
./evil_ifconfig.sh: starting net 48 @ 21 sec
./evil_ifconfig.sh: starting net 49 @ 22 sec
./evil_ifconfig.sh: starting net 50 @ 23 sec
./evil_ifconfig.sh: starting net 51 @ 24 sec
./evil_ifconfig.sh: starting net 52 @ 25 sec
./evil_ifconfig.sh: starting net 53 @ 26 sec
./evil_ifconfig.sh: starting net 54 @ 27 sec
./evil_ifconfig.sh: starting net 55 @ 28 sec
./evil_ifconfig.sh: starting net 56 @ 29 sec
./evil_ifconfig.sh: starting net 57 @ 30 sec
./evil_ifconfig.sh: starting net 58 @ 31 sec
./evil_ifconfig.sh: starting net 59 @ 33 sec
./evil_ifconfig.sh: starting net 60 @ 34 sec
./evil_ifconfig.sh: starting net 61 @ 35 sec
./evil_ifconfig.sh: starting net 62 @ 36 sec
./evil_ifconfig.sh: starting net 63 @ 37 sec
./evil_ifconfig.sh: starting net 64 @ 39 sec
./evil_ifconfig.sh: starting net 65 @ 40 sec
./evil_ifconfig.sh: starting net 66 @ 41 sec
./evil_ifconfig.sh: starting net 67 @ 43 sec
./evil_ifconfig.sh: starting net 68 @ 44 sec
./evil_ifconfig.sh: starting net 69 @ 45 sec
./evil_ifconfig.sh: starting net 70 @ 47 sec
./evil_ifconfig.sh: starting net 71 @ 48 sec
./evil_ifconfig.sh: starting net 72 @ 49 sec
./evil_ifconfig.sh: starting net 73 @ 51 sec
./evil_ifconfig.sh: starting net 74 @ 52 sec
./evil_ifconfig.sh: starting net 75 @ 54 sec
./evil_ifconfig.sh: starting net 76 @ 55 sec
./evil_ifconfig.sh: starting net 77 @ 57 sec
./evil_ifconfig.sh: starting net 78 @ 58 sec
./evil_ifconfig.sh: starting net 79 @ 60 sec
./evil_ifconfig.sh: starting net 80 @ 62 sec
./evil_ifconfig.sh: starting net 81 @ 63 sec
./evil_ifconfig.sh: starting net 82 @ 65 sec
./evil_ifconfig.sh: starting net 83 @ 66 sec
./evil_ifconfig.sh: starting net 84 @ 68 sec
./evil_ifconfig.sh: starting net 85 @ 70 sec
./evil_ifconfig.sh: starting net 86 @ 71 sec
./evil_ifconfig.sh: starting net 87 @ 73 sec
./evil_ifconfig.sh: starting net 88 @ 75 sec
./evil_ifconfig.sh: starting net 89 @ 77 sec
./evil_ifconfig.sh: starting net 90 @ 78 sec
./evil_ifconfig.sh: starting net 91 @ 80 sec
./evil_ifconfig.sh: starting net 92 @ 82 sec
./evil_ifconfig.sh: starting net 93 @ 84 sec
./evil_ifconfig.sh: starting net 94 @ 86 sec
./evil_ifconfig.sh: starting net 95 @ 88 sec
./evil_ifconfig.sh: starting net 96 @ 89 sec
./evil_ifconfig.sh: starting net 97 @ 91 sec
./evil_ifconfig.sh: starting net 98 @ 93 sec
./evil_ifconfig.sh: starting net 99 @ 95 sec
./evil_ifconfig.sh: starting net 100 @ 97 sec
./evil_ifconfig.sh: starting net 101 @ 99 sec
./evil_ifconfig.sh: starting net 102 @ 101 sec
./evil_ifconfig.sh: starting net 103 @ 103 sec
./evil_ifconfig.sh: starting net 104 @ 105 sec
./evil_ifconfig.sh: starting net 105 @ 107 sec
./evil_ifconfig.sh: starting net 106 @ 109 sec
./evil_ifconfig.sh: starting net 107 @ 111 sec
./evil_ifconfig.sh: starting net 108 @ 113 sec
./evil_ifconfig.sh: starting net 109 @ 116 sec
./evil_ifconfig.sh: starting net 110 @ 118 sec
./evil_ifconfig.sh: starting net 111 @ 120 sec
./evil_ifconfig.sh: starting net 112 @ 122 sec
./evil_ifconfig.sh: starting net 113 @ 124 sec
./evil_ifconfig.sh: starting net 114 @ 126 sec
./evil_ifconfig.sh: starting net 115 @ 129 sec
./evil_ifconfig.sh: starting net 116 @ 131 sec
./evil_ifconfig.sh: starting net 117 @ 133 sec
./evil_ifconfig.sh: starting net 118 @ 136 sec
./evil_ifconfig.sh: starting net 119 @ 138 sec
./evil_ifconfig.sh: starting net 120 @ 140 sec
./evil_ifconfig.sh: starting net 121 @ 143 sec
./evil_ifconfig.sh: starting net 122 @ 145 sec
./evil_ifconfig.sh: starting net 123 @ 147 sec
./evil_ifconfig.sh: starting net 124 @ 150 sec
./evil_ifconfig.sh: starting net 125 @ 152 sec
./evil_ifconfig.sh: starting net 126 @ 155 sec
./evil_ifconfig.sh: starting net 127 @ 157 sec
./evil_ifconfig.sh: starting net 128 @ 159 sec
./evil_ifconfig.sh: starting net 129 @ 162 sec
./evil_ifconfig.sh: starting net 130 @ 164 sec
./evil_ifconfig.sh: starting net 131 @ 167 sec
./evil_ifconfig.sh: starting net 132 @ 169 sec
./evil_ifconfig.sh: starting net 133 @ 172 sec
./evil_ifconfig.sh: starting net 134 @ 175 sec
./evil_ifconfig.sh: starting net 135 @ 177 sec
./evil_ifconfig.sh: starting net 136 @ 180 sec
./evil_ifconfig.sh: starting net 137 @ 182 sec
./evil_ifconfig.sh: starting net 138 @ 185 sec
./evil_ifconfig.sh: starting net 139 @ 188 sec
./evil_ifconfig.sh: starting net 140 @ 191 sec
./evil_ifconfig.sh: starting net 141 @ 193 sec
./evil_ifconfig.sh: starting net 142 @ 196 sec
./evil_ifconfig.sh: starting net 143 @ 199 sec
./evil_ifconfig.sh: starting net 144 @ 201 sec
./evil_ifconfig.sh: starting net 145 @ 204 sec
./evil_ifconfig.sh: starting net 146 @ 207 sec
./evil_ifconfig.sh: starting net 147 @ 210 sec
./evil_ifconfig.sh: starting net 148 @ 213 sec
./evil_ifconfig.sh: starting net 149 @ 216 sec
./evil_ifconfig.sh: starting net 150 @ 218 sec
./evil_ifconfig.sh: starting net 151 @ 221 sec
./evil_ifconfig.sh: starting net 152 @ 224 sec
./evil_ifconfig.sh: starting net 153 @ 227 sec
./evil_ifconfig.sh: starting net 154 @ 230 sec
./evil_ifconfig.sh: starting net 155 @ 233 sec
./evil_ifconfig.sh: starting net 156 @ 236 sec
./evil_ifconfig.sh: starting net 157 @ 239 sec
./evil_ifconfig.sh: starting net 158 @ 242 sec
./evil_ifconfig.sh: starting net 159 @ 245 sec
./evil_ifconfig.sh: starting net 160 @ 248 sec
./evil_ifconfig.sh: starting net 161 @ 251 sec
./evil_ifconfig.sh: starting net 162 @ 254 sec
./evil_ifconfig.sh: starting net 163 @ 258 sec
./evil_ifconfig.sh: starting net 164 @ 261 sec
./evil_ifconfig.sh: starting net 165 @ 264 sec
./evil_ifconfig.sh: starting net 166 @ 267 sec
./evil_ifconfig.sh: starting net 167 @ 270 sec
./evil_ifconfig.sh: starting net 168 @ 273 sec
./evil_ifconfig.sh: starting net 169 @ 277 sec
./evil_ifconfig.sh: starting net 170 @ 280 sec
./evil_ifconfig.sh: starting net 171 @ 283 sec
./evil_ifconfig.sh: starting net 172 @ 286 sec
./evil_ifconfig.sh: starting net 173 @ 290 sec
./evil_ifconfig.sh: starting net 174 @ 293 sec
./evil_ifconfig.sh: starting net 175 @ 296 sec
./evil_ifconfig.sh: starting net 176 @ 300 sec
./evil_ifconfig.sh: starting net 177 @ 303 sec
./evil_ifconfig.sh: starting net 178 @ 306 sec
./evil_ifconfig.sh: starting net 179 @ 310 sec
./evil_ifconfig.sh: starting net 180 @ 313 sec
./evil_ifconfig.sh: starting net 181 @ 317 sec
./evil_ifconfig.sh: starting net 182 @ 320 sec
./evil_ifconfig.sh: starting net 183 @ 324 sec
./evil_ifconfig.sh: starting net 184 @ 327 sec
./evil_ifconfig.sh: starting net 185 @ 331 sec
./evil_ifconfig.sh: starting net 186 @ 334 sec
./evil_ifconfig.sh: starting net 187 @ 338 sec
./evil_ifconfig.sh: starting net 188 @ 341 sec
./evil_ifconfig.sh: starting net 189 @ 345 sec
./evil_ifconfig.sh: starting net 190 @ 349 sec
./evil_ifconfig.sh: starting net 191 @ 352 sec
./evil_ifconfig.sh: starting net 192 @ 356 sec
./evil_ifconfig.sh: starting net 193 @ 360 sec
./evil_ifconfig.sh: starting net 194 @ 363 sec
./evil_ifconfig.sh: starting net 195 @ 367 sec
./evil_ifconfig.sh: starting net 196 @ 371 sec
./evil_ifconfig.sh: starting net 197 @ 374 sec
./evil_ifconfig.sh: starting net 198 @ 378 sec
./evil_ifconfig.sh: starting net 199 @ 382 sec
./evil_ifconfig.sh: starting net 200 @ 386 sec
./evil_ifconfig.sh: starting net 201 @ 389 sec
./evil_ifconfig.sh: starting net 202 @ 393 sec
./evil_ifconfig.sh: starting net 203 @ 397 sec
./evil_ifconfig.sh: starting net 204 @ 401 sec
./evil_ifconfig.sh: starting net 205 @ 405 sec
./evil_ifconfig.sh: starting net 206 @ 409 sec
./evil_ifconfig.sh: starting net 207 @ 413 sec
./evil_ifconfig.sh: starting net 208 @ 417 sec
./evil_ifconfig.sh: starting net 209 @ 421 sec
./evil_ifconfig.sh: starting net 210 @ 425 sec
./evil_ifconfig.sh: starting net 211 @ 428 sec
./evil_ifconfig.sh: starting net 212 @ 432 sec
./evil_ifconfig.sh: starting net 213 @ 436 sec
./evil_ifconfig.sh: starting net 214 @ 441 sec
./evil_ifconfig.sh: starting net 215 @ 445 sec
./evil_ifconfig.sh: starting net 216 @ 449 sec
./evil_ifconfig.sh: starting net 217 @ 453 sec
./evil_ifconfig.sh: starting net 218 @ 457 sec
./evil_ifconfig.sh: starting net 219 @ 461 sec
./evil_ifconfig.sh: starting net 220 @ 465 sec
./evil_ifconfig.sh: starting net 221 @ 469 sec
./evil_ifconfig.sh: starting net 222 @ 473 sec
./evil_ifconfig.sh: starting net 223 @ 477 sec
./evil_ifconfig.sh: starting net 224 @ 482 sec
./evil_ifconfig.sh: starting net 225 @ 486 sec
./evil_ifconfig.sh: starting net 226 @ 490 sec
./evil_ifconfig.sh: starting net 227 @ 494 sec
./evil_ifconfig.sh: starting net 228 @ 498 sec
./evil_ifconfig.sh: starting net 229 @ 503 sec
./evil_ifconfig.sh: starting net 230 @ 507 sec
./evil_ifconfig.sh: starting net 231 @ 511 sec
./evil_ifconfig.sh: starting net 232 @ 516 sec
./evil_ifconfig.sh: starting net 233 @ 520 sec
./evil_ifconfig.sh: starting net 234 @ 524 sec
./evil_ifconfig.sh: starting net 235 @ 529 sec
./evil_ifconfig.sh: starting net 236 @ 533 sec
./evil_ifconfig.sh: starting net 237 @ 537 sec
./evil_ifconfig.sh: starting net 238 @ 542 sec
./evil_ifconfig.sh: starting net 239 @ 546 sec
./evil_ifconfig.sh: starting net 240 @ 551 sec
./evil_ifconfig.sh: starting net 241 @ 555 sec
./evil_ifconfig.sh: starting net 242 @ 559 sec
./evil_ifconfig.sh: starting net 243 @ 564 sec
./evil_ifconfig.sh: starting net 244 @ 568 sec
./evil_ifconfig.sh: starting net 245 @ 573 sec
./evil_ifconfig.sh: starting net 246 @ 578 sec
./evil_ifconfig.sh: starting net 247 @ 582 sec
./evil_ifconfig.sh: starting net 248 @ 587 sec
./evil_ifconfig.sh: starting net 249 @ 591 sec
./evil_ifconfig.sh: starting net 250 @ 596 sec
./evil_ifconfig.sh: starting net 251 @ 601 sec
./evil_ifconfig.sh: starting net 252 @ 605 sec
./evil_ifconfig.sh: starting net 253 @ 610 sec
./evil_ifconfig.sh: starting net 254 @ 615 sec
./evil_ifconfig.sh: starting net 255 @ 619 sec
./evil_ifconfig.sh  27,29s user 599,00s system 100% cpu 10:23,74 total


Deleting in Linux (modified only one letter, so output looks the same except
times):

$ cat evil_ifconfig.sh
#!/bin/sh

i=0
starttime=$(date +%s)

while [ $i -lt 65534 ]; do
        ipa=$(($i % 256))
        net=$(($i / 256))
        ip a d 172.18.$net.$ipa/32 dev eth0
        [ $ipa -eq 0 ] && echo $0: starting net $net @ $((`date +%s` - $starttime)) sec | tee -a /root/evil_ifconfig.log
        i=$(($i + 1))
done

$ ./evil_ifconfig.sh
./evil_ifconfig.sh: starting net 0 @ 0 sec
./evil_ifconfig.sh: starting net 1 @ 4 sec
./evil_ifconfig.sh: starting net 2 @ 8 sec
./evil_ifconfig.sh: starting net 3 @ 12 sec
./evil_ifconfig.sh: starting net 4 @ 16 sec
./evil_ifconfig.sh: starting net 5 @ 19 sec
./evil_ifconfig.sh: starting net 6 @ 23 sec
./evil_ifconfig.sh: starting net 7 @ 27 sec
./evil_ifconfig.sh: starting net 8 @ 31 sec
./evil_ifconfig.sh: starting net 9 @ 34 sec
./evil_ifconfig.sh: starting net 10 @ 38 sec
./evil_ifconfig.sh: starting net 11 @ 42 sec
./evil_ifconfig.sh: starting net 12 @ 46 sec
./evil_ifconfig.sh: starting net 13 @ 49 sec
./evil_ifconfig.sh: starting net 14 @ 53 sec
./evil_ifconfig.sh: starting net 15 @ 57 sec
./evil_ifconfig.sh: starting net 16 @ 60 sec
./evil_ifconfig.sh: starting net 17 @ 64 sec
./evil_ifconfig.sh: starting net 18 @ 68 sec
./evil_ifconfig.sh: starting net 19 @ 71 sec
./evil_ifconfig.sh: starting net 20 @ 75 sec
./evil_ifconfig.sh: starting net 21 @ 78 sec
./evil_ifconfig.sh: starting net 22 @ 82 sec
./evil_ifconfig.sh: starting net 23 @ 85 sec
./evil_ifconfig.sh: starting net 24 @ 89 sec
./evil_ifconfig.sh: starting net 25 @ 92 sec
./evil_ifconfig.sh: starting net 26 @ 96 sec
./evil_ifconfig.sh: starting net 27 @ 99 sec
./evil_ifconfig.sh: starting net 28 @ 103 sec
./evil_ifconfig.sh: starting net 29 @ 106 sec
./evil_ifconfig.sh: starting net 30 @ 109 sec
./evil_ifconfig.sh: starting net 31 @ 113 sec
./evil_ifconfig.sh: starting net 32 @ 116 sec
./evil_ifconfig.sh: starting net 33 @ 119 sec
./evil_ifconfig.sh: starting net 34 @ 123 sec
./evil_ifconfig.sh: starting net 35 @ 126 sec
./evil_ifconfig.sh: starting net 36 @ 129 sec
./evil_ifconfig.sh: starting net 37 @ 133 sec
./evil_ifconfig.sh: starting net 38 @ 136 sec
./evil_ifconfig.sh: starting net 39 @ 139 sec
./evil_ifconfig.sh: starting net 40 @ 142 sec
./evil_ifconfig.sh: starting net 41 @ 145 sec
./evil_ifconfig.sh: starting net 42 @ 149 sec
./evil_ifconfig.sh: starting net 43 @ 152 sec
./evil_ifconfig.sh: starting net 44 @ 155 sec
./evil_ifconfig.sh: starting net 45 @ 158 sec
./evil_ifconfig.sh: starting net 46 @ 161 sec
./evil_ifconfig.sh: starting net 47 @ 164 sec
./evil_ifconfig.sh: starting net 48 @ 167 sec
./evil_ifconfig.sh: starting net 49 @ 170 sec
./evil_ifconfig.sh: starting net 50 @ 173 sec
./evil_ifconfig.sh: starting net 51 @ 176 sec
./evil_ifconfig.sh: starting net 52 @ 179 sec
./evil_ifconfig.sh: starting net 53 @ 182 sec
./evil_ifconfig.sh: starting net 54 @ 185 sec
./evil_ifconfig.sh: starting net 55 @ 188 sec
./evil_ifconfig.sh: starting net 56 @ 191 sec
./evil_ifconfig.sh: starting net 57 @ 194 sec
./evil_ifconfig.sh: starting net 58 @ 197 sec
./evil_ifconfig.sh: starting net 59 @ 200 sec
./evil_ifconfig.sh: starting net 60 @ 202 sec
./evil_ifconfig.sh: starting net 61 @ 205 sec
./evil_ifconfig.sh: starting net 62 @ 208 sec
./evil_ifconfig.sh: starting net 63 @ 211 sec
./evil_ifconfig.sh: starting net 64 @ 214 sec
./evil_ifconfig.sh: starting net 65 @ 216 sec
./evil_ifconfig.sh: starting net 66 @ 219 sec
./evil_ifconfig.sh: starting net 67 @ 222 sec
./evil_ifconfig.sh: starting net 68 @ 224 sec
./evil_ifconfig.sh: starting net 69 @ 227 sec
./evil_ifconfig.sh: starting net 70 @ 230 sec
./evil_ifconfig.sh: starting net 71 @ 232 sec
./evil_ifconfig.sh: starting net 72 @ 235 sec
./evil_ifconfig.sh: starting net 73 @ 237 sec
./evil_ifconfig.sh: starting net 74 @ 240 sec
./evil_ifconfig.sh: starting net 75 @ 243 sec
./evil_ifconfig.sh: starting net 76 @ 245 sec
./evil_ifconfig.sh: starting net 77 @ 248 sec
./evil_ifconfig.sh: starting net 78 @ 250 sec
./evil_ifconfig.sh: starting net 79 @ 253 sec
./evil_ifconfig.sh: starting net 80 @ 255 sec
./evil_ifconfig.sh: starting net 81 @ 257 sec
./evil_ifconfig.sh: starting net 82 @ 260 sec
./evil_ifconfig.sh: starting net 83 @ 262 sec
./evil_ifconfig.sh: starting net 84 @ 265 sec
./evil_ifconfig.sh: starting net 85 @ 267 sec
./evil_ifconfig.sh: starting net 86 @ 269 sec
./evil_ifconfig.sh: starting net 87 @ 272 sec
./evil_ifconfig.sh: starting net 88 @ 274 sec
./evil_ifconfig.sh: starting net 89 @ 276 sec
./evil_ifconfig.sh: starting net 90 @ 278 sec
./evil_ifconfig.sh: starting net 91 @ 281 sec
./evil_ifconfig.sh: starting net 92 @ 283 sec
./evil_ifconfig.sh: starting net 93 @ 285 sec
./evil_ifconfig.sh: starting net 94 @ 287 sec
./evil_ifconfig.sh: starting net 95 @ 289 sec
./evil_ifconfig.sh: starting net 96 @ 292 sec
./evil_ifconfig.sh: starting net 97 @ 294 sec
./evil_ifconfig.sh: starting net 98 @ 296 sec
./evil_ifconfig.sh: starting net 99 @ 298 sec
./evil_ifconfig.sh: starting net 100 @ 300 sec
./evil_ifconfig.sh: starting net 101 @ 302 sec
./evil_ifconfig.sh: starting net 102 @ 304 sec
./evil_ifconfig.sh: starting net 103 @ 306 sec
./evil_ifconfig.sh: starting net 104 @ 308 sec
./evil_ifconfig.sh: starting net 105 @ 310 sec
./evil_ifconfig.sh: starting net 106 @ 312 sec
./evil_ifconfig.sh: starting net 107 @ 314 sec
./evil_ifconfig.sh: starting net 108 @ 316 sec
./evil_ifconfig.sh: starting net 109 @ 318 sec
./evil_ifconfig.sh: starting net 110 @ 320 sec
./evil_ifconfig.sh: starting net 111 @ 322 sec
./evil_ifconfig.sh: starting net 112 @ 323 sec
./evil_ifconfig.sh: starting net 113 @ 325 sec
./evil_ifconfig.sh: starting net 114 @ 327 sec
./evil_ifconfig.sh: starting net 115 @ 329 sec
./evil_ifconfig.sh: starting net 116 @ 331 sec
./evil_ifconfig.sh: starting net 117 @ 332 sec
./evil_ifconfig.sh: starting net 118 @ 334 sec
./evil_ifconfig.sh: starting net 119 @ 336 sec
./evil_ifconfig.sh: starting net 120 @ 337 sec
./evil_ifconfig.sh: starting net 121 @ 339 sec
./evil_ifconfig.sh: starting net 122 @ 341 sec
./evil_ifconfig.sh: starting net 123 @ 342 sec
./evil_ifconfig.sh: starting net 124 @ 344 sec
./evil_ifconfig.sh: starting net 125 @ 345 sec
./evil_ifconfig.sh: starting net 126 @ 347 sec
./evil_ifconfig.sh: starting net 127 @ 348 sec
./evil_ifconfig.sh: starting net 128 @ 350 sec
./evil_ifconfig.sh: starting net 129 @ 351 sec
./evil_ifconfig.sh: starting net 130 @ 352 sec
./evil_ifconfig.sh: starting net 131 @ 354 sec
./evil_ifconfig.sh: starting net 132 @ 355 sec
./evil_ifconfig.sh: starting net 133 @ 356 sec
./evil_ifconfig.sh: starting net 134 @ 357 sec
./evil_ifconfig.sh: starting net 135 @ 359 sec
./evil_ifconfig.sh: starting net 136 @ 360 sec
./evil_ifconfig.sh: starting net 137 @ 361 sec
./evil_ifconfig.sh: starting net 138 @ 362 sec
./evil_ifconfig.sh: starting net 139 @ 363 sec
./evil_ifconfig.sh: starting net 140 @ 364 sec
./evil_ifconfig.sh: starting net 141 @ 366 sec
./evil_ifconfig.sh: starting net 142 @ 367 sec
./evil_ifconfig.sh: starting net 143 @ 368 sec
./evil_ifconfig.sh: starting net 144 @ 369 sec
./evil_ifconfig.sh: starting net 145 @ 370 sec
./evil_ifconfig.sh: starting net 146 @ 371 sec
./evil_ifconfig.sh: starting net 147 @ 372 sec
./evil_ifconfig.sh: starting net 148 @ 373 sec
./evil_ifconfig.sh: starting net 149 @ 374 sec
./evil_ifconfig.sh: starting net 150 @ 375 sec
./evil_ifconfig.sh: starting net 151 @ 375 sec
./evil_ifconfig.sh: starting net 152 @ 376 sec
./evil_ifconfig.sh: starting net 153 @ 377 sec
./evil_ifconfig.sh: starting net 154 @ 378 sec
./evil_ifconfig.sh: starting net 155 @ 379 sec
./evil_ifconfig.sh: starting net 156 @ 380 sec
./evil_ifconfig.sh: starting net 157 @ 381 sec
./evil_ifconfig.sh: starting net 158 @ 381 sec
./evil_ifconfig.sh: starting net 159 @ 382 sec
./evil_ifconfig.sh: starting net 160 @ 383 sec
./evil_ifconfig.sh: starting net 161 @ 384 sec
./evil_ifconfig.sh: starting net 162 @ 384 sec
./evil_ifconfig.sh: starting net 163 @ 385 sec
./evil_ifconfig.sh: starting net 164 @ 386 sec
./evil_ifconfig.sh: starting net 165 @ 386 sec
./evil_ifconfig.sh: starting net 166 @ 387 sec
./evil_ifconfig.sh: starting net 167 @ 388 sec
./evil_ifconfig.sh: starting net 168 @ 388 sec
./evil_ifconfig.sh: starting net 169 @ 389 sec
./evil_ifconfig.sh: starting net 170 @ 390 sec
./evil_ifconfig.sh: starting net 171 @ 390 sec
./evil_ifconfig.sh: starting net 172 @ 391 sec
./evil_ifconfig.sh: starting net 173 @ 391 sec
./evil_ifconfig.sh: starting net 174 @ 392 sec
./evil_ifconfig.sh: starting net 175 @ 392 sec
./evil_ifconfig.sh: starting net 176 @ 393 sec
./evil_ifconfig.sh: starting net 177 @ 393 sec
./evil_ifconfig.sh: starting net 178 @ 394 sec
./evil_ifconfig.sh: starting net 179 @ 394 sec
./evil_ifconfig.sh: starting net 180 @ 395 sec
./evil_ifconfig.sh: starting net 181 @ 395 sec
./evil_ifconfig.sh: starting net 182 @ 396 sec
./evil_ifconfig.sh: starting net 183 @ 396 sec
./evil_ifconfig.sh: starting net 184 @ 397 sec
./evil_ifconfig.sh: starting net 185 @ 397 sec
./evil_ifconfig.sh: starting net 186 @ 398 sec
./evil_ifconfig.sh: starting net 187 @ 398 sec
./evil_ifconfig.sh: starting net 188 @ 399 sec
./evil_ifconfig.sh: starting net 189 @ 399 sec
./evil_ifconfig.sh: starting net 190 @ 399 sec
./evil_ifconfig.sh: starting net 191 @ 400 sec
./evil_ifconfig.sh: starting net 192 @ 400 sec
./evil_ifconfig.sh: starting net 193 @ 400 sec
./evil_ifconfig.sh: starting net 194 @ 401 sec
./evil_ifconfig.sh: starting net 195 @ 401 sec
./evil_ifconfig.sh: starting net 196 @ 402 sec
./evil_ifconfig.sh: starting net 197 @ 402 sec
./evil_ifconfig.sh: starting net 198 @ 402 sec
./evil_ifconfig.sh: starting net 199 @ 403 sec
./evil_ifconfig.sh: starting net 200 @ 403 sec
./evil_ifconfig.sh: starting net 201 @ 403 sec
./evil_ifconfig.sh: starting net 202 @ 403 sec
./evil_ifconfig.sh: starting net 203 @ 404 sec
./evil_ifconfig.sh: starting net 204 @ 404 sec
./evil_ifconfig.sh: starting net 205 @ 404 sec
./evil_ifconfig.sh: starting net 206 @ 405 sec
./evil_ifconfig.sh: starting net 207 @ 405 sec
./evil_ifconfig.sh: starting net 208 @ 405 sec
./evil_ifconfig.sh: starting net 209 @ 406 sec
./evil_ifconfig.sh: starting net 210 @ 406 sec
./evil_ifconfig.sh: starting net 211 @ 406 sec
./evil_ifconfig.sh: starting net 212 @ 406 sec
./evil_ifconfig.sh: starting net 213 @ 407 sec
./evil_ifconfig.sh: starting net 214 @ 407 sec
./evil_ifconfig.sh: starting net 215 @ 407 sec
./evil_ifconfig.sh: starting net 216 @ 407 sec
./evil_ifconfig.sh: starting net 217 @ 408 sec
./evil_ifconfig.sh: starting net 218 @ 408 sec
./evil_ifconfig.sh: starting net 219 @ 408 sec
./evil_ifconfig.sh: starting net 220 @ 409 sec
./evil_ifconfig.sh: starting net 221 @ 409 sec
./evil_ifconfig.sh: starting net 222 @ 409 sec
./evil_ifconfig.sh: starting net 223 @ 409 sec
./evil_ifconfig.sh: starting net 224 @ 410 sec
./evil_ifconfig.sh: starting net 225 @ 410 sec
./evil_ifconfig.sh: starting net 226 @ 410 sec
./evil_ifconfig.sh: starting net 227 @ 410 sec
./evil_ifconfig.sh: starting net 228 @ 411 sec
./evil_ifconfig.sh: starting net 229 @ 411 sec
./evil_ifconfig.sh: starting net 230 @ 411 sec
./evil_ifconfig.sh: starting net 231 @ 411 sec
./evil_ifconfig.sh: starting net 232 @ 412 sec
./evil_ifconfig.sh: starting net 233 @ 412 sec
./evil_ifconfig.sh: starting net 234 @ 412 sec
./evil_ifconfig.sh: starting net 235 @ 412 sec
./evil_ifconfig.sh: starting net 236 @ 413 sec
./evil_ifconfig.sh: starting net 237 @ 413 sec
./evil_ifconfig.sh: starting net 238 @ 413 sec
./evil_ifconfig.sh: starting net 239 @ 413 sec
./evil_ifconfig.sh: starting net 240 @ 413 sec
./evil_ifconfig.sh: starting net 241 @ 414 sec
./evil_ifconfig.sh: starting net 242 @ 414 sec
./evil_ifconfig.sh: starting net 243 @ 414 sec
./evil_ifconfig.sh: starting net 244 @ 414 sec
./evil_ifconfig.sh: starting net 245 @ 415 sec
./evil_ifconfig.sh: starting net 246 @ 415 sec
./evil_ifconfig.sh: starting net 247 @ 415 sec
./evil_ifconfig.sh: starting net 248 @ 415 sec
./evil_ifconfig.sh: starting net 249 @ 415 sec
./evil_ifconfig.sh: starting net 250 @ 416 sec
./evil_ifconfig.sh: starting net 251 @ 416 sec
./evil_ifconfig.sh: starting net 252 @ 416 sec
./evil_ifconfig.sh: starting net 253 @ 416 sec
./evil_ifconfig.sh: starting net 254 @ 416 sec
./evil_ifconfig.sh: starting net 255 @ 417 sec
./evil_ifconfig.sh  21,84s user 392,17s system 99% cpu 6:56,71 total


--
WBR, Vadim Goncharov. ICQ#166852181       mailto:[hidden email]
[Moderator of RU.ANTI-ECOLOGY][FreeBSD][http://antigreen.org][LJ:/nuclight]

_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-performance
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: interface aliases - not so curious

Vadim Goncharov
22.02.08 @ 12:18 Niki Denev wrote:

> On Thu, Feb 21, 2008 at 2:18 PM, Vadim Goncharov  
> <[hidden email]> wrote:
>> Hi!
>>
>> After looking at humorous quoting about a man trying to ban unused  
>> addresses in
>> his network by putting 65535 ifcong_XXX_aliasYYY lines to rc.conf, I  
>> decided to
>> check this performance issue on a 6.2-RELEASE (GENERIC) and compare it  
>> with
>> Linux. Below are results from two machines.
>>
>> First, I've found that both FreeBSD and Linux clearly use linked-list  
>> insertion
>> to tail of queue, because time was growing as O(N^2). Then, Linux  
>> deleted it
>> slowly at first, then faster (is it using LIFO?..).
>>
>> But Linux with iproute2 was 6 times faster on addition (FreeBSD did it  
>> ONE HOUR!),
>> and even more faster on deletion. Why?..

[...skip...]

> The hardware seems very different between the two cases.
> Pentium D's are probably much slower than the new Xeons, and
> have less cache.
> Also, is your Pentium D machine really SMP or just HTT?

I've shown dmesg output in my letter, SMP GENERIC kernel told both CPUs  
are activated. HTT is present in features, I didn't any tuning with the  
machine, so probably it is real SMP, I don't know :)

Although this part is really curious rather than practical, we should  
think about another performance-related thing: as addresses are stored in  
linked list, what is overhead on multi-interface machine on EVERY inbound  
packet? Imagine an mpd PPPoE router with 2000 interfaces - every packet  
will cause lookup into this list in ip_input() - and ENTIRE list for every  
forwarded packet. If ipfw is enebled with ``me'' rules - EVERY such rule  
will cause such overhead, too.

Should we turn an alias address list into Radix or hash, as it was with  
VLAN interfaces?

--
WBR, Vadim Goncharov
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-performance
To unsubscribe, send any mail to "[hidden email]"