Re: How to obtain which interrupts cause system to hang?

2010-10-10 Thread b. f.
  PID USERNAMETHR PRI NICE   SIZERES STATETIME   WCPU COMMAND
   11 root  1 171 ki31 0K16K RUN 24.9H 86.47% idle: cpu0
   14 root  1 -44- 0K16K WAIT   689:52 10.25% swi1: net
2 root  1 -68- 0K16K sleep  207:35  4.69% ng_queue0
   40 root  1 -68- 0K16K -  101:37  1.46% dummynet


It looks like there's a bit going on here: you're using dummynet and
netgraph, too?  If this setup is unstable, or otherwise problematic,
I'd suggest asking on the freebsd-net mailing list.  I don't have much
experience with some of these utilities, and I've haven't been running
FreeBSD 7-* for a long time, so I've lost track of what problems have
been fixed and back-ported.  You may also want to look at your network
and polling MIB and debugging variables, to see if they indicate any
problems.

b.
___
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: How to obtain which interrupts cause system to hang?

2010-10-09 Thread b. f.
 How to obtain what nasty happen, which process take 36-50% of CPU
 resource?

It partly depends upon the version of the OS that you are running,
your hardware, and your configuration. 2008 interrupts/sec is high,
but not improbably so, for kern.hz=1000, and not beyond the
capabilities of today's average computer, although it may not be
optimal for your workloads.  So it may not actually be a problem with
too many interrupts, but rather with some erroneous system accounting.
 This can happen, for example, if your computer is using some of the
deeper power-saving C-states, but using them poorly, as for example
in:

http://lists.freebsd.org/pipermail/freebsd-current/2010-August/019383.html

So you may want to examine, and perhaps adjust, your choice of kernel
timers, kern.hz, and power-saving settings.  Device polling can also
be a factor, if you are using it.

b.
___
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: How to obtain which interrupts cause system to hang?

2010-10-09 Thread Ian Smith
In freebsd-questions Digest, Vol 331, Issue 13, Message: 8
On Sat, 9 Oct 2010 20:05:48 +0300 ??? ??? kes-...@yandex.ru wrote:
  Content-Type: text/plain; charset=windows-1251
 
Hi KES, long time ..

  #systat -v
  1 usersLoad  0.74  0.71  0.55  Oct  9 19:53
[..]
  Proc:Interrupts
r   p   d   s   w   Csw  Trp  Sys  Int  Sof  Flt 24 cow2008 total
2   3  39   23k   67  5639 1710   47 15 zfod  9 ata0 
  irq14
ozfod   nfe0 
  irq23
  23.1%Sys  50.8%Intr  1.3%User  0.0%Nice 24.8%Idle%ozfod  1999 cpu0: 
  time
  |||||||||||   daefr
  +  6 prcfr

Yes, system and esp. interrupt time is heavy .. 23k context switches!?

In addition to b. f.'s good advice .. as you later said, 2000 Hz slicing 
_should_ be ok, unless a slow CPU?  Or perhaps a fast CPU throttled back 
too far .. powerd?  Check sysctl dev.cpu.0.freq while this is happening.

Disable p4tcc if it's a modern CPU; that usually hurts more than helps. 
Disable polling if you're using that .. you haven't provided much info, 
like is this with any network load, despite nfe0 showing no interrupts?

  #top
  last pid: 24571;  load averages:  0.10,  0.49,  0.50up 0+19:15:01  
  19:56:36
  42 processes:  3 running, 39 sleeping
  CPU:  0.7% user,  0.0% nice, 21.0% system, 36.3% interrupt, 41.9% idle
  Mem: 305M Active, 767M Inact, 252M Wired, 468K Cache, 213M Buf, 650M Free
  Swap: 4063M Total, 4063M Free
  
PID USERNAMETHR PRI NICE   SIZERES STATETIME   WCPU COMMAND
   1054 bind  4   40   134M   109M kqread   0:51  0.00% named
986 root  1  440  5692K  1408K RUN  0:50  0.00% syslogd
   1162 clamav1   40  4616K  1468K accept   0:46  0.00% smtp-gated
  11731 clamav1  200 27948K  9728K pause0:03  0.00% freshclam
  11791 root  1 -580  7848K  4120K bpf  0:02  0.00% arpwatch
  13208 root  1  440 10700K  4144K select   0:01  0.00% sendmail
  13298 root  1   80  6748K  1440K nanslp   0:00  0.00% cron
  12802 root  1  440 22880K  4004K select   0:00  0.00% sshd
  
  
  How to obtain what nasty happen, which process take 36-50% of CPU
  resource?

Try 'top -S'. It's almost certainly system process[es], not shown above.

cheers, Ian
___
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