Professional Web Applications Themes

multiprocessors - FreeBSD

Bill wrote:   try top(1) the output of top should contain a "C" column. if this column contains "0"s and "1"s both your CPUs are used zheyu...

  1. #1

    Default Re: multiprocessors

    Bill wrote:
     
    try top(1)

    the output of top should contain a "C" column. if this column contains
    "0"s and "1"s both your CPUs are used

    zheyu
    FreeBSD Guest

  2. #2

    Default Re: multiprocessors

    On Wed, Apr 06, 2005 at 10:34:43PM -0700, Bill wrote: 

    No (on i386).
     

    Yes, see the handbook.

    Kris

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.0 (FreeBSD)

    iD8DBQFCVLl3Wry0BWjoQKURAlY2AJ9LRuhagCpTgHyu3E1vFQ Am6K35XACeOd4N
    ZunHWBjUeIB353wyGbnwitk=
    =4MIW
    -----END PGP SIGNATURE-----

    Kris Guest

  3. #3

    Default multiprocessors

    Is there a comand to use so as to see if freebsd is using both
    processors?



    Bill Guest

  4. #4

    Default Re: multiprocessors

    There is a line for cpu put it only shows one. Im used to linux and when
    I do a top in Linux I see two lines for my cpus.

    Is the stock kernel that gets installed when doing a new install smp
    enabled?

    Do i need to rebuild my kernel for smp?

    On Wed, 2005-04-06 at 21:16, FreeBSD Deamon wrote: 
    > try top(1)
    >
    > the output of top should contain a "C" column. if this column contains
    > "0"s and "1"s both your CPUs are used
    >
    > zheyu
    >[/ref]


    Bill Guest

  5. #5

    Default Re: multiprocessors

    Well then maybe i should build a new kernel then.

    Im running freeBSD 5.3 on a dual 450mhz Compaq Proliant 3000

    On Wed, 2005-04-06 at 21:39, Kris Kennaway wrote: 
    >
    > No (on i386).

    >
    > Yes, see the handbook.
    >
    > Kris[/ref]


    Bill Guest

  6. #6

    Default Re: multiprocessors

    Bill wrote: [/ref]
     [/ref][/ref]

    sysctl hw.ncpu, I think.

    You can also look at /var/run/dmesg.boot and look for:

    FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
    cpu0 (BSP): APIC ID: 1
    cpu1 (AP): APIC ID: 0

    BSP stands for bootstrap processor and AP for application processor.
    The BSP is the one used to load the system until this message comes up:

    SMP: AP CPU #1 Launched!

    which will happen right before the kernel launches init.
     [/ref]
     

    You are looking in the wrong place. A C *column*, not a CPU *row*.
    FreeBSD will only ever show the total CPU time on the CPU row. This is
    something like what you will see on an SMP system:

    PID USERNAME PRI NICE SIZE RES STATE C TIME WCPU CPU COMMAND
    89704 emccoy 96 0 2484K 1660K CPU1 0 0:00 0.51% 0.05% top
    97005 root 96 0 3092K 1248K select 1 29:28 0.00% 0.00% ntpd

    First, note the state for top: it's CPU1. Second, the "C" column is 0
    for top, 1 for ntpd. The "C" column is the last CPU the process ran on.

    The WCPU and CPU columns, by the way, are both *per-CPU*, as you can see
    here:

    CPU states: 2.7% user, 0.0% nice, 47.5% system, 0.8% interrupt, 49.0%
    idle
    89739 emccoy 110 0 1324K 684K CPU0 0 0:43 99.00% 87.50% cat

    So another way to tell if SMP is working is if the summary row says 50%
    idle but you've got a process which shows 100% active.
     

    No.
     

    Yes. The good news is that it's very easy. The Handbook has
    information on how to do it. Basically all you need to do is add
    "options SMP" and make sure "device apic" is enabled (it is by default I
    believe, even for the GENERIC kernel).

    Eric Guest

  7. #7

    Default Re: multiprocessors

    Eric McCoy wrote: 

    Except that that column isn't present by default when it's not running
    SMP, even if there are two processors. Here's the output from a fresh
    install (yesterday) on a dual Opteron without SMP enabled yet:

    PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND
    240 root 96 0 3268K 1776K select 0:07 0.00% 0.00% dhclient
    408 root 96 0 9468K 3572K select 0:00 0.00% 0.00% sendmail
    425 root 8 0 3620K 1264K nanslp 0:00 0.00% 0.00% cron


    Tom
    Tom Guest

Similar Threads

  1. Win2003 Does'nt See Multiprocessors
    By Geary Boulrice in forum Windows Server
    Replies: 1
    Last Post: June 21st, 06:17 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139