# Getting CPU temp of FX-8150



## SageRaven (Mar 31, 2012)

FreeBSD/amd64 9.0-RELEASE with custom kernel.

I've got a new Asus Sabertooth 990FX motherboard with the FX-8150.  For some reason, I cannot seem to glean the CPU temp out of sysctl the way I once did with my old M4A78T-E and Phenom X4 965 (dev.cpu.???.temperature).

I've looked at a few guides, but I can't seem to figure out what BIOS knobs, kernel drivers, and software I can use to get core temps.  Do I need a port for this CPU?

Any pointers would be greatly appreciated.

P.S. -- I can't say I'm too pleased with the upgrade so far.  My system "feels" a little more sluggish with this 3.6GHz 8-core than my old 3.4GHz 4-core.  Running "openssl speed" seems to confirm a slight performance loss.  I hope I'm doing something stupid and that I didn't invest in a lemon.  Anyone have good things to say about the FX-8150?


----------



## tingo (Apr 1, 2012)

Have you tried the amdtemp(4) module?


----------



## Crest (Apr 1, 2012)

The Bulldozer core is about 20% slower per cycle than the Thuban core. Two Bulldozer cores form a module. The cores in a module share certain execution uints responsible for floating point and vector math. This results in smaller cores with lower throughput per core. It also allows for more cores and higher integer throughput. It's a nice idea for a server CPU. It's less suited to current desktop applications. They don't profit from the higher number of cores and suffer from the reduced per core performance (per cycle).

Both CPUs are more than fast enough. The FX-8150 should outperform the Phenom 2 X4 in a make -j `sysctl -n hw.ncpu` buildworld. The Thuban cores will at least match the FX-8150 other less parallel tasks.


----------



## mc1 (Apr 2, 2012)

Maybe try this:

`kldload amdtemp`
`sysctl -a | grep -i "temp"`

If that works add amdtemp to the kernel configuration or /boot/loader.conf.

Please let us know if this works for you.  Good luck.


----------



## SageRaven (Apr 2, 2012)

For the folks who suggested loading amdtemp(4), it did not work.  I'm pretty certain it worked on the X4 but not on the 8150.  I can't see any acpi.therm oid's, either.  I've even upgraded by mb to the latest and greatest BIOS rev (1102), and nothing.


----------



## SageRaven (Apr 2, 2012)

Crest said:
			
		

> Both CPUs are more than fast enough. The FX-8150 should outperform the Phenom 2 X4 in a make -j `sysctl -n hw.ncpu` buildworld. The Thuban cores will at least match the FX-8150 other less parallel tasks.



I had hoped that having more cores would give my ZFS setup a little more of a boost, as well.  I assumed having more cores to service various i/o threads might lead to more more responsive system.

Some port builds do scream with the extra 4 cores.  I think clang utilizes multiple cores (at least the chromium build does), and it does make builds a lot faster.  Ditto for multi-threaded apps like pigz/pbzip2/pxz. 

Thanks for the explanation, though.  I probably should have bought the P2-X6 for the same price.


----------



## redw0lfx (Apr 2, 2012)

I think some slowness might be noticed on the bulldozer because of the way work is given to the CPU on Linux and FreeBSD systems vs Windows.  Because two cores share the some resources, work should be loaded onto each CPU in an odd pattern, CPU #1, CPU #3, cpu #5, then CPU #2, etc.  Under Windows 7 and 8, it already does this, but the scheduler on Linux and FreeBSD wants to assign work to the CPUs in sequential order from my understanding.

Can't help you on the temperature issue though as I have the same problem.


----------



## mc1 (Apr 3, 2012)

Sorry, 

I had a similar situation with the FX-8120, when I custom compiled the kernel / world with amdtemp as an option I seemed to get accurate temps.  I was, however using the FreebsdBSD 10, current source.  I will try again with FreebsdBSD 9 stable source to see if I can get it to work.  Will post results shortly along with kernel configuration file.  I did not try the kldload method before that, but it seemed like it should work.  After trying the kldload method myself it did not work.  How weird.


----------



## mc1 (Apr 3, 2012)

In response to the zfs speed issue:

Adding these lines to the sysctl.conf file seemed to speed some things up for me quite a bit.  May cause issues elsewhere, may want to experiment with different numbers. A little tuning for sched_ule. 


```
kern.sched.slice=1
kern.sched.steal_idle=1
kern.sched.steal_thresh=1
```


----------



## SageRaven (Apr 6, 2012)

mc1 said:
			
		

> Sorry,
> 
> I had a similar situation with the FX-8120, when I custom compiled the kernel / world with amdtemp as an option I seemed to get accurate temps.  I was, however using the FreebsdBSD 10, current source.  I will try again with FreebsdBSD 9 stable source to see if I can get it to work.  Will post results shortly along with kernel configuration file.  I did not try the kldload method before that, but it seemed like it should work.  After trying the kldload method myself it did not work.  How weird.



I tried compiling amdtemp into the kernel for both 9.0-RELEASE and 9.0-STABLE.  Same issue.

I'm usually a little too timid to run CURRENT on my main workstation.  Maybe I'll try a VM when I have time.


----------



## tingo (Apr 10, 2012)

SageRaven said:
			
		

> For the folks who suggested loading amdtemp(4), it did not work.  I'm pretty certain it worked on the X4 but not on the 8150.  I can't see any acpi.therm oid's, either.  I've even upgraded by mb to the latest and greatest BIOS rev (1102), and nothing.



Did you try a verbose boot before loading amdtemp(4), to see if anything gets logged in /var/log/messages?


----------



## lockdoc (Apr 11, 2012)

In FreeBSD 9, amdtemp does not support the Bulldozer yet. I have the FX-8120. You will have to fetch the sources of amdtemp from head and recompile the module, then it will work.

```
dev.cpu.0.temperature: 40.5C
dev.cpu.1.temperature: 40.5C
dev.cpu.2.temperature: 40.5C
dev.cpu.3.temperature: 40.5C
dev.cpu.4.temperature: 40.5C
dev.cpu.5.temperature: 40.5C
dev.cpu.6.temperature: 40.5C
dev.cpu.7.temperature: 40.5C
```


----------

