Invalid memory stats from vmstat and sysctl vm.vmtotal?

Steven Hartland killing at multiplay.co.uk
Fri Dec 2 16:05:08 UTC 2011


----- Original Message ----- 
From: "Jason Hellenthal" <jhell at DataIX.net>
> Just to put some visuals to this...
> 
> .
> `-- DIE
>    |-- Core1  [Idle]
>    |-- Core2  [35% ]
>    |   `-- thread127
>    |-- Core3  [40% ]
>    |   `-- thread127
>    `-- Core4  [100%]
>        `-- thread127
>
> In this case you would say the DIE should be at a total of 175% ?

I think your getting confused there; it sounds like your referring to
a single CPU capable of multiple tasks via either multiple cores or
HTT as an UP machine? If so that's your problem this isn't UP it SMP.

Have a look on your machine in /var/run/dmesg.boot if your see
it reporting more than one core then your SMP not UP hence the
confusion as each of these cores be they real, virtual or physical
represents a possible thread of 100% so even if you have a single
physical CPU with 4 cores that still represents a possible total
of 400%

e.g the following shows a machine capable of 1600% if all cores
are busy.

FreeBSD/SMP: Multiprocessor System Detected: 16 CPUs
FreeBSD/SMP: 2 package(s) x 4 core(s) x 2 SMT threads
 cpu0 (BSP): APIC ID:  0
 cpu1 (AP): APIC ID:  1
 cpu2 (AP): APIC ID:  2
 cpu3 (AP): APIC ID:  3
 cpu4 (AP): APIC ID:  4
 cpu5 (AP): APIC ID:  5
 cpu6 (AP): APIC ID:  6
 cpu7 (AP): APIC ID:  7
 cpu8 (AP): APIC ID: 16
 cpu9 (AP): APIC ID: 17
 cpu10 (AP): APIC ID: 18
 cpu11 (AP): APIC ID: 19
 cpu12 (AP): APIC ID: 20
 cpu13 (AP): APIC ID: 21
 cpu14 (AP): APIC ID: 22
 cpu15 (AP): APIC ID: 23

If you want proper UP which will total 100% you could remove
SMP from your kernel but I wouldnt advise that ;-)

    Regards
    Steve

================================================
This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. 

In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337
or return the E.mail to postmaster at multiplay.co.uk.



More information about the freebsd-hackers mailing list