did something change in SMP scheduling from 5.4 to 6.0?

Randy Schultz schultz at sgi.com
Thu Jan 26 09:05:38 PST 2006


Hey all,

I am curious if something changed in the way extra cpus are utilized in 6.0
vs. 5.4 in a SMP kernel.

My system is a dual-proc Xeon box.  When I was using 5.4 top would show
both procs being used roughly the same, e.g. the "C" column usually had
almost as many processes running on the second cpu as on the first.  On
Jan 23 I did a cvsup and compiled a new 6.0-STABLE SMP kernel.  Now 
watching top I rarely see the second proc being used, even though 
roundrobin is enabled.  FWIW, here's some possibly relevant config bits:
Dude ? sysctl -a|egrep smp
kern.timecounter.smp_tsc: 0
kern.smp.forward_roundrobin_enabled: 1
kern.smp.forward_signal_enabled: 1
kern.smp.cpus: 4
kern.smp.disabled: 0
kern.smp.active: 1
kern.smp.maxcpus: 16
Dude ? 
Dude ? sysctl -a|egrep hyperth
machdep.hyperthreading_allowed: 0

I've attached the output of a typical top with some builds running.  
Unfortunately I don't have any saved data from 5.4.

I do see the second processor being used but those times are rare.  When it 
does happen it seems almost exclusively when I'm seriously hammering the 
system.  This makes me think something has changed with 6.0 behind-the-scenes
such that if the system doesn't need the extra power then it sticks to cpu 0.  
I poked around the release notes and handbook but failed to find anything
on this topic.  Am I all wet and simply have something misconfigured or 
indeed all is well with 6.x doing it's thing hugging cpu 0?

--
 Randy    (schultz at sgi.com)  715-726-2832     email bodhisattva     <*>

 "There is no fire like passion, there is no shark like hatred,
 there is no snare like folly, there is no torrent like greed."
-------------- next part --------------
last pid: 86336;  load averages:  0.37,  0.31,  0.22     up 2+22:34:02  10:21:42
148 processes: 2 running, 146 sleeping
CPU states: 14.9% user,  0.0% nice, 10.2% system,  0.0% interrupt, 74.8% idle
Mem: 312M Active, 963M Inact, 187M Wired, 11M Cache, 112M Buf, 529M Free
Swap: 4096M Total, 4096M Free

  PID USERNAME  THR PRI NICE   SIZE    RES STATE  C   TIME   WCPU COMMAND
86122 root        1   8    0  1612K  1500K wait   0   0:00 16.50% make
86335 root        1 139    0   584K   476K RUN    0   0:00 16.50% make
86288 root        1  -8    0  1648K  1184K piperd 0   0:00 16.50% sh
85738 root        1  -8    0 21276K 20924K piperd 0   0:02 14.99% ruby18
86121 root        1   8    0  1636K  1172K wait   0   0:00 14.99% sh
  655 schultz     1  76    0 30148K 29220K select 0  15:43  0.00% Xorg
11160 schultz     1  76    0  2644K  1924K select 0   2:20  0.00% top
80862 schultz     7  20    0   203M   190M kserel 0   2:06  0.00% firefox-bin
  667 schultz     1  76    0 14136K 10276K select 0   0:32  0.00% xchat
 4023 schultz     1  76    0  6924K  5948K select 0   0:31  0.00% xterm-static
 3013 schultz     8  20    0 55640K 41624K kserel 0   0:29  0.00% evolution-2.2
 4006 schultz     1  76    0  5468K  4492K select 0   0:25  0.00% xterm-static
  801 schultz     1  76    0  5472K  4496K select 0   0:20  0.00% xterm-static
  592 root        1  76    0  1216K   676K select 0   0:19  0.00% moused
41670 schultz     1  76    0  8672K  6968K select 0   0:15  0.00% pine
  692 schultz     1  76    0  5484K  4424K select 0   0:11  0.00% xterm-static
10846 schultz     1  76    0  5452K  4460K select 0   0:10  0.00% xterm-static
  708 schultz     1  76    0  5500K  4524K select 0   0:09  0.00% xterm-static
 1172 schultz     1  76    0  5452K  4476K select 0   0:09  0.00% xterm-static
80886 schultz     1  76    0  2632K  1912K CPU0   0   0:08  0.00% top
  494 root        1  76    0  2924K  1760K select 0   0:08  0.00% ntpd
  888 schultz     1  76    0  5452K  4448K select 0   0:07  0.00% xterm-static
  660 schultz     1  76    0  5400K  3548K select 0   0:06  0.00% fvwm
12259 schultz     1  76    0  5472K  4496K select 0   0:05  0.00% xterm-static
81573 schultz     1  76    0  5468K  4492K select 0   0:05  0.00% xterm-static
20918 schultz     1  76    0  5500K  4524K select 0   0:05  0.00% xterm-static
32772 schultz     1  76    0  5452K  4448K select 0   0:05  0.00% xterm-static
  385 root        1  76    0  1300K   828K select 0   0:04  0.00% syslogd
 9622 schultz     1  76    0  5468K  4504K select 0   0:03  0.00% xterm-static
 9287 schultz     1  76    0  5468K  4504K select 0   0:03  0.00% xterm-static
14583 schultz     1  76    0  5500K  4536K select 0   0:02  0.00% xterm-static
20866 schultz     1  76    0  5480K  4512K select 0   0:02  0.00% xterm-static
20907 schultz     1  76    0  5468K  4504K select 0   0:02  0.00% xterm-static
  688 schultz     1  76    0  4888K  3680K select 0   0:02  0.00% gconfd-2
  664 schultz     1  76    0  4664K  3040K select 0   0:02  0.00% FvwmPager
 3018 schultz     7  20    0 32768K 18764K kserel 0   0:02  0.00% evolution-alar
45374 schultz     1 139    0  3336K  2780K select 0   0:01  0.00% ssh
  662 schultz     1  76    0  4844K  3992K select 0   0:01  0.00% xclock
 3015 schultz     8  20    0 19500K 13188K kserel 0   0:01  0.00% evolution-data
  533 root        1   8    0  1336K  1004K nanslp 0   0:01  0.00% cron
  465 root        1  76    0  1216K   760K select 0   0:00  0.00% usbd
  663 schultz     1  76    0  4636K  3016K select 0   0:00  0.00% FvwmButtons
85699 schultz     1  76    0  5472K  4508K select 0   0:00  0.00% xterm-static
69066 schultz     1  76    0  6284K  3244K select 0   0:00  0.00% sshd
24786 schultz     1  76    0  3416K  2784K select 0   0:00  0.00% ssh
82035 schultz     1  76    0  3604K  3004K select 0   0:00  0.00% ssh
75451 schultz     1  76    0  3292K  2732K select 0   0:00  0.00% ssh
16459 schultz     1 139    0  3428K  2792K select 0   0:00  0.00% ssh
  517 root        1  20    0  3424K  2776K pause  0   0:00  0.00% sendmail
  521 smmsp       1  20    0  3304K  2672K pause  0   0:00  0.00% sendmail
 3533 schultz     1  76    0  6084K  3096K select 0   0:00  0.00% sshd
  864 schultz     1 139    0  5452K  3740K select 0   0:00  0.00% bonobo-activat
85713 schultz     1  76    0  3292K  2744K select 0   0:00  0.00% ssh
68864 schultz     1  76    0  3292K  2772K select 0   0:00  0.00% ssh
79603 schultz     1  76    0  3292K  2740K select 0   0:00  0.00% ssh
33080 schultz     1  76    0  3292K  2768K select 0   0:00  0.00% ssh
79588 schultz     1  76    0  6084K  3128K select 0   0:00  0.00% sshd
33049 schultz     1  76    0  6084K  3112K select 0   0:00  0.00% sshd
79602 schultz     1 139    0  3292K  2740K select 0   0:00  0.00% ssh
85615 schultz     1  76    0  3292K  2744K select 0   0:00  0.00% ssh
 3769 schultz     1  76    0  3292K  2712K select 0   0:00  0.00% ssh
69050 root        1   4    0  6104K  3120K sbwait 0   0:00  0.00% sshd
33040 root        1   4    0  6104K  3104K sbwait 0   0:00  0.00% sshd
79571 root        1   4    0  6104K  3120K sbwait 0   0:00  0.00% sshd
79568 root        1   4    0  6104K  3120K sbwait 0   0:00  0.00% sshd
 4038 root        1  20    0   856K   620K pause  0   0:00  0.00% ksh
33046 root        1   4    0  6104K  3104K sbwait 0   0:00  0.00% sshd
 3755 root        1   4    0  6108K  3088K sbwait 0   0:00  0.00% sshd
 3530 root        1   4    0  6104K  3088K sbwait 0   0:00  0.00% sshd
  709 schultz     1  20    0   872K   648K pause  0   0:00  0.00% ksh
79628 schultz     1  76    0  3292K  2780K select 0   0:00  0.00% ssh


More information about the freebsd-questions mailing list