FreeBSD does not use all cpus on top show.

Dmitriy Kirhlarov dkirhlarov at mow.oilspace.com
Wed Sep 13 23:50:33 PDT 2006


On Thu, Sep 14, 2006 at 12:36:33PM +0800, Huang wen hui wrote:
> hi,
> I have HP Server install FreeBSD 6.1R/amd64 with 2CPUs ,2 logical CPUs
> per core.
> On top show, It should show 4 cpus, but I never see 1 and 3 cpu on show.
> Does anything I miss?

You must switch off hiper threading in bios and in your system.

> 
> --hwh
> 
> # dmesg
> Copyright (c) 1992-2006 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 6.1-RELEASE #0: Sun May 7 04:15:57 UTC 2006
> root at bloom.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP
> ACPI APIC Table: <HP 00000083>
> Timecounter "i8254" frequency 1193182 Hz quality 0
> CPU: Intel(R) Xeon(TM) CPU 3.20GHz (3200.13-MHz K8-class CPU)
> Origin = "GenuineIntel" Id = 0xf4a Stepping = 10
> 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=0x20000800<SYSCALL,LM>
> AMD Features2=0x1<LAHF>
> Logical CPUs per core: 2
> real memory = 6912208896 (6591 MB)
> avail memory = 6150582272 (5865 MB)
> FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
> cpu0 (BSP): APIC ID: 0
> cpu1 (AP): APIC ID: 1
> cpu2 (AP): APIC ID: 6
> cpu3 (AP): APIC ID: 7
> ioapic0 <Version 2.0> irqs 0-23 on motherboard
> ioapic1 <Version 2.0> irqs 24-47 on motherboard
> ioapic2 <Version 2.0> irqs 48-71 on motherboard
> ioapic3 <Version 2.0> irqs 72-95 on motherboard
> ioapic4 <Version 2.0> irqs 96-119 on motherboard
> kbd1 at kbdmux0
> acpi0: <HP P51> on motherboard
> acpi0: Power Button (fixed)
> Timecounter "ACPI-safe" frequency 3579545 Hz quality 1000
> acpi_timer0: <24-bit timer at 3.579545MHz> port 0x908-0x90b on acpi0
> cpu0: <ACPI CPU> on acpi0
> cpu1: <ACPI CPU> on acpi0
> cpu2: <ACPI CPU> on acpi0
> cpu3: <ACPI CPU> on acpi0
> pcib0: <ACPI Host-PCI bridge> on acpi0
> pci0: <ACPI PCI bus> on pcib0
> pcib1: <ACPI PCI-PCI bridge> at device 2.0 on pci0
> pci2: <ACPI PCI bus> on pcib1
> pcib2: <ACPI PCI-PCI bridge> at device 0.0 on pci2
> pci3: <ACPI PCI bus> on pcib2
> bge0: <Broadcom BCM5704C Dual Gigabit Ethernet, ASIC rev. 0x2100> mem
> 0xfdef0000-0xfdefffff irq 25 at device 1.0 on pci3
> miibus0: <MII bus> on bge0
> brgphy0: <BCM5704 10/100/1000baseTX PHY> on miibus0
> brgphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseTX,
> 1000baseTX-FDX, auto
> bge0: Ethernet address: 00:18:71:74:2a:bf
> bge1: <Broadcom BCM5704C Dual Gigabit Ethernet, ASIC rev. 0x2100> mem
> 0xfdee0000-0xfdeeffff irq 26 at device 1.1 on pci3
> miibus1: <MII bus> on bge1
> brgphy1: <BCM5704 10/100/1000baseTX PHY> on miibus1
> brgphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseTX,
> 1000baseTX-FDX, auto
> bge1: Ethernet address: 00:18:71:74:2a:be
> pcib3: <ACPI PCI-PCI bridge> at device 0.2 on pci2
> pci4: <ACPI PCI bus> on pcib3
> ciss0: <HP Smart Array 6i> port 0x4000-0x40ff mem
> 0xfdff0000-0xfdff1fff,0xfdf80000-0xfdfbffff irq 51 at device 3.0 on pci4
> ciss0: [GIANT-LOCKED]
> pcib4: <ACPI PCI-PCI bridge> at device 6.0 on pci0
> pci5: <ACPI PCI bus> on pcib4
> pcib5: <ACPI PCI-PCI bridge> at device 0.0 on pci5
> pci6: <ACPI PCI bus> on pcib5
> pcib6: <ACPI PCI-PCI bridge> at device 0.2 on pci5
> pci10: <ACPI PCI bus> on pcib6
> uhci0: <Intel 82801EB (ICH5) USB controller USB-A> port 0x2000-0x201f
> irq 16 at device 29.0 on pci0
> uhci0: [GIANT-LOCKED]
> usb0: <Intel 82801EB (ICH5) USB controller USB-A> on uhci0
> usb0: USB revision 1.0
> uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
> uhub0: 2 ports with 2 removable, self powered
> uhci1: <Intel 82801EB (ICH5) USB controller USB-B> port 0x2020-0x203f
> irq 19 at device 29.1 on pci0
> uhci1: [GIANT-LOCKED]
> usb1: <Intel 82801EB (ICH5) USB controller USB-B> on uhci1
> usb1: USB revision 1.0
> uhub1: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
> uhub1: 2 ports with 2 removable, self powered
> uhci2: <Intel 82801EB (ICH5) USB controller USB-C> port 0x2040-0x205f
> irq 18 at device 29.2 on pci0
> uhci2: [GIANT-LOCKED]
> usb2: <Intel 82801EB (ICH5) USB controller USB-C> on uhci2
> usb2: USB revision 1.0
> uhub2: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
> uhub2: 2 ports with 2 removable, self powered
> uhci3: <Intel 82801EB (ICH5) USB controller USB-D> port 0x2060-0x207f
> irq 16 at device 29.3 on pci0
> uhci3: [GIANT-LOCKED]
> usb3: <Intel 82801EB (ICH5) USB controller USB-D> on uhci3
> usb3: USB revision 1.0
> uhub3: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
> uhub3: 2 ports with 2 removable, self powered
> ehci0: <Intel 82801EB/R (ICH5) USB 2.0 controller> mem
> 0xfbef0000-0xfbef03ff irq 23 at device 29.7 on pci0
> ehci0: [GIANT-LOCKED]
> usb4: EHCI version 1.0
> usb4: companion controllers, 2 ports each: usb0 usb1 usb2 usb3
> usb4: <Intel 82801EB/R (ICH5) USB 2.0 controller> on ehci0
> usb4: USB revision 2.0
> uhub4: Intel EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
> uhub4: 8 ports with 8 removable, self powered
> pcib7: <ACPI PCI-PCI bridge> at device 30.0 on pci0
> pci1: <ACPI PCI bus> on pcib7
> pci1: <display, VGA> at device 3.0 (no driver attached)
> pci1: <base peripheral> at device 4.0 (no driver attached)
> pci1: <base peripheral> at device 4.2 (no driver attached)
> isab0: <PCI-ISA bridge> at device 31.0 on pci0
> isa0: <ISA bus> on isab0
> atapci0: <Intel ICH5 UDMA100 controller> port
> 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0x500-0x50f at device 31.1 on pci0
> ata0: <ATA channel 0> on atapci0
> ata1: <ATA channel 1> on atapci0
> acpi_tz0: <Thermal Zone> on acpi0
> atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64 irq 1 on acpi0
> atkbd0: <AT Keyboard> flags 0x1 irq 1 on atkbdc0
> kbd0 at atkbd0
> atkbd0: [GIANT-LOCKED]
> psm0: <PS/2 Mouse> irq 12 on atkbdc0
> psm0: [GIANT-LOCKED]
> psm0: model Generic PS/2 mouse, device ID 0
> sio0: <Standard PC COM port> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0
> sio0: type 16550A
> fdc0: <floppy drive controller (FDE)> port 0x3f2-0x3f5 irq 6 drq 2 on acpi0
> fdc0: [FAST]
> orm0: <ISA Option ROMs> at iomem
> 0xc0000-0xc7fff,0xc8000-0xcbfff,0xee000-0xeffff on isa0
> ppc0: cannot reserve I/O port range
> sc0: <System console> at flags 0x100 on isa0
> sc0: VGA <16 virtual consoles, flags=0x300>
> sio1 at port 0x2f8-0x2ff irq 3 on isa0
> sio1: type 16550A
> vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
> Timecounters tick every 1.000 msec
> module_register_init: MOD_LOAD (amr_linux, 0xffffffff8062a040, 0) error 6
> acd0: CDROM <HL-DT-ST GCR-8240N/2.03> at ata0-master PIO4
> SMP: AP CPU #1 Launched!
> SMP: AP CPU #3 Launched!
> SMP: AP CPU #2 Launched!
> da0 at ciss0 bus 0 target 0 lun 0
> da0: <COMPAQ RAID 5 VOLUME OK> Fixed Direct Access SCSI-0 device
> da0: 135.168MB/s transfers
> da0: 700049MB (1433700592 512 byte sectors: 255H 63S/T 65535C)
> Trying to mount root from ufs:/dev/da0s1a
> bge0: link state changed to DOWN
> bge0: link state changed to UP
> ciss0: *** Parity/consistency initialization complete, logical drive 0
> ciss0: logical drive 0 () completed consistency initialisation
> 
> 
> #top
> last pid: 70381; load averages: 0.45, 0.48, 0.46 up 6+16:30:06 12:35:43
> 91 processes: 2 running, 89 sleeping
> CPU states: 12.2% user, 0.0% nice, 0.0% system, 0.2% interrupt, 87.6% idle
> Mem: 1177M Active, 3993M Inact, 269M Wired, 265M Cache, 214M Buf, 19M Free
> Swap: 4096M Total, 4096M Free
> 
> PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMAND
> 51047 root 6 20 0 748M 198M kserel 0 704:28 0.98% java
> 4887 root 9 20 0 359M 84468K kserel 0 134:36 0.00% java
> 97183 mysql 14 20 0 1175M 729M kserel 0 55:03 0.00% mysqld
> 4883 root 11 20 0 383M 88096K kserel 0 27:03 0.00% java
> 34821 root 5 20 0 1240M 43328K kserel 0 9:03 0.00% java
> 4938 root 1 96 0 7612K 1808K select 0 0:21 0.00% ntpd
> 2353 root 1 96 0 9356K 2644K select 0 0:10 0.00% sendmail
> 56321 root 1 96 0 28680K 5356K select 0 0:03 0.00% xterm
> 56318 root 1 96 0 28688K 5364K select 0 0:03 0.00% xterm
> 56322 root 1 96 0 28672K 5284K select 0 0:03 0.00% xterm
> 56315 root 1 96 0 51940K 10428K select 0 0:02 0.00% Xorg
> 2363 root 1 8 0 3560K 1064K nanslp 0 0:01 0.00% cron
> 2197 root 1 96 0 3540K 996K select 0 0:01 0.00% syslogd
> 2385 root 1 4 0 3504K 804K select 0 0:01 0.00% moused
> 2294 root 1 96 0 2420K 836K select 0 0:01 0.00% usbd
> 56320 root 1 96 0 27288K 5016K select 2 0:00 0.00% xclock
> 34284 root 1 20 0 7420K 2968K pause 0 0:00 0.00% csh
> 2357 smmsp 1 20 0 9224K 2368K pause 0 0:00 0.00% sendmail
> 70316 hwh 1 96 0 29368K 3380K select 2 0:00 0.00% sshd
> 2347 root 1 96 0 18428K 2256K select 0 0:00 0.00% sshd
> 56319 root 1 4 0 16056K 2904K select 0 0:00 0.00% twm
> 2145 root 1 4 0 620K 340K select 0 0:00 0.00% devd
> 70313 root 1 4 0 29392K 3356K sbwait 2 0:00 0.00% sshd
> 59068 root 1 4 0 29392K 3348K sbwait 0 0:00 0.00% sshd
> 70334 root 1 20 0 7352K 3008K pause 2 0:00 0.00% csh
> 56323 root 1 5 0 7092K 2900K ttyin 0 0:00 0.00% csh
> 59079 root 1 5 0 13304K 3308K ttyin 0 0:00 0.00% mysql
> 70317 hwh 1 20 0 7096K 2956K pause 2 0:00 0.00% csh
> 59071 hwh 1 4 0 29368K 3372K select 0 0:00 0.00% sshd
> 34038 root 1 8 0 17136K 1312K wait 0 0:00 0.00% login
> 51502 root 1 8 0 17136K 1444K wait 0 0:00 0.00% login
> 56292 root 1 20 0 7080K 2904K pause 2 0:00 0.00% csh
> 51547 root 1 5 0 7076K 2892K ttyin 2 0:00 0.00% csh
> 56324 root 1 5 0 7080K 2860K ttyin 0 0:00 0.00% csh
> 56325 root 1 5 0 7080K 2860K ttyin 0 0:00 0.00% csh
> 59072 hwh 1 20 0 7096K 2924K pause 0 0:00 0.00% csh
> 59076 root 1 20 0 7080K 2888K pause 2 0:00 0.00% csh
> 97159 mysql 1 8 0 5064K 1212K wait 0 0:00 0.00% sh
> 59075 hwh 1 8 0 17136K 1420K wait 0 0:00 0.00% su
> 70333 hwh 1 8 0 17136K 1428K wait 0 0:00 0.00% su
> 56296 root 1 8 0 5044K 1540K wait 0 0:00 0.00% sh
> 70381 root 1 96 0 6912K 2076K CPU2 2 0:00 0.00% top
> 56291 root 1 8 0 17112K 1356K wait 2 0:00 0.00% su
> 56314 root 1 8 0 4352K 1404K wait 0 0:00 0.00% xinit
> 50549 root 1 5 0 3504K 916K ttyin 2 0:00 0.00% getty
> 51509 root 1 5 0 3504K 932K ttyin 0 0:00 0.00% getty
> 
> 
> _______________________________________________
> freebsd-stable at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-stable
> To unsubscribe, send any mail to "freebsd-stable-unsubscribe at freebsd.org"

-- 
Dmitriy Kirhlarov
OILspace, 26 Leninskaya sloboda, bld. 2, 2nd floor, 115280 Moscow, Russia
P:+7 495 105 7247 ext.208 F:+7 495 105 7246 E:DmitriyKirhlarov at oilspace.com
OILspace - The resource enriched - www.oilspace.com


More information about the freebsd-stable mailing list