Re: Re[2]: How to obtain what swi1:net is doing?

2010-11-13 Thread Ivan Voras
2010/11/13 Коньков Евгений kes-...@yandex.ru:

 IV net.isr.direct_force=0
 IV net.isr.maxthreads=2
 FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
 FreeBSD/SMP: 1 package(s) x 2 core(s) x 2 SMT threads
  cpu0 (BSP): APIC ID:  0
  cpu1 (AP): APIC ID:  1
  cpu2 (AP): APIC ID:  4
  cpu3 (AP): APIC ID:  5
 ioapic0: Changing APIC ID to 6
 ioapic0 Version 2.0 irqs 0-23 on motherboard
 netisr_init: forcing maxthreads to 1 and bindthreads to 0 for device polling

 # cat /boot/loader.conf
 net.isr.maxthreads=2

 maxthreads does not affected

I don't understand: how is it not affected?

On a system with maxthreads=2, here is how it shows:

betelgeuse:/home/ivoras# ps axuHc | grep isr
root  12  3.0  0.0 0   432  ??  WL   12:21PM   0:09.21
intr/swi1: netisr 7
root  12  0.0  0.0 0   432  ??  WL   12:21PM   0:00.00
intr/swi1: netisr 0

I.e. there are two threads here, bound to CPU cores 0 and 7.

 #uname -r
 9.0-CURRENT

Yes, multithreaded netisr was introduced in FreeBSD 8, it wasn't there in 7.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re[2]: How to obtain what swi1:net is doing?

2010-11-12 Thread Коньков Евгений
Здравствуйте, Ivan.

Вы писали 12 ноября 2010 г., 1:33:14:

IV On 11/11/10 20:20, Коньков Евгений wrote:
 Hi, all

IV How to obtain what swi1:net  is doing?

IV The short answer is: depending on what your network card is, it could be
IV everything related to TCP/IP-level processing.

IV In your case, you are doing a lot of work in netgraph and dummynet, 
IV probably shaping, but have high dummynet usage which probably means its
IV handling the lower level of network IO, probably with a high packet rate.

IV You might try including the following loader.conf tunables:

IV net.isr.direct_force=0
IV net.isr.maxthreads=2
FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
FreeBSD/SMP: 1 package(s) x 2 core(s) x 2 SMT threads
 cpu0 (BSP): APIC ID:  0
 cpu1 (AP): APIC ID:  1
 cpu2 (AP): APIC ID:  4
 cpu3 (AP): APIC ID:  5
ioapic0: Changing APIC ID to 6
ioapic0 Version 2.0 irqs 0-23 on motherboard
netisr_init: forcing maxthreads to 1 and bindthreads to 0 for device polling

# cat /boot/loader.conf
net.isr.maxthreads=2

maxthreads does not affected
#uname -r
9.0-CURRENT


IV ... and report if it helps you. (but be careful: here you must measure
IV real-world performance not CPU usage!)


 last pid: 65736;  load averages:  3.54,  4.46,  3.92up 4+07:51:26  
 21:19:08
 215 processes: 8 running, 195 sleeping, 12 waiting
 CPU 0:  2.9% user,  0.0% nice, 42.9% system, 11.4% interrupt, 42.9% idle
 CPU 1:  0.0% user,  0.0% nice, 54.3% system, 17.1% interrupt, 28.6% idle
 CPU 2:  2.9% user,  0.0% nice, 57.1% system,  5.7% interrupt, 34.3% idle
 CPU 3:  0.0% user,  0.0% nice, 45.7% system, 17.1% interrupt, 37.1% idle
 Mem: 502M Active, 87M Inact, 324M Wired, 24M Cache, 112M Buf, 1053M Free
 Swap: 20G Total, 72K Used, 20G Free

PID USERNAME   PRI NICE   SIZERES STATE  C   TIME   WCPU COMMAND
 15 root   -44- 0K 8K CPU1   3  31.4H 71.39% swi1: net
 35 root   -68- 0K 8K CPU0   0  21.7H 50.20% dummynet
 14 root   171 ki31 0K 8K RUN0  74.8H 42.87% idle: cpu0
 11 root   171 ki31 0K 8K CPU3   3  78.4H 31.79% idle: cpu3
 13 root   171 ki31 0K 8K RUN1  80.3H 29.69% idle: cpu1
 12 root   171 ki31 0K 8K RUN2  76.9H 23.49% idle: cpu2
   1698 root   -68- 0K 8K sleep  2 312:30 15.38% ng_queue0
   1700 root   -68- 0K 8K sleep  3 313:02 15.09% ng_queue2
   1699 root   -68- 0K 8K sleep  2 314:18 14.89% ng_queue1
   1701 root   -68- 0K 8K sleep  1 312:54 14.06% ng_queue3
 63829 www 500   185M   123M select 0   0:47  4.05% httpd
 59213 root960   400M 61940K CPU3   2  32:24  2.98% rtorrent
 16 root   -32- 0K 8K WAIT   2 129:41  0.39% swi4: clock 
 sio


IV ___
IV freebsd-questions@freebsd.org mailing list
IV http://lists.freebsd.org/mailman/listinfo/freebsd-questions
IV To unsubscribe, send any mail to
IV freebsd-questions-unsubscr...@freebsd.org




-- 
С уважением,
 Коньков  mailto:kes-...@yandex.ru

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org