Koozali.org: home of the SME Server

Obsolete Releases => SME Server 9.x => Topic started by: toothandnail on August 26, 2015, 09:24:14 PM

Title: [Solved] CPU throttling problem
Post by: toothandnail on August 26, 2015, 09:24:14 PM
I've just finished installing an SME 9 server running an AMDPhenom II X2 545. Nice quick machine, much better than the old one that I had running on that site.

Small problem I've hit is that it is not automatically loading the powernow_k8.ko module on boot. I can use modprbe to load it once the machine is booted and then manually run /etc/init.d/cpuspeed start which starts CPU throttling as it should. However, I've so far failed completely to get it to work automatically.

I did a bit of hunting and found that the suggested method of loading modules in CentOS 6 is to create a file in /etc/sysconfig/modules with the necessary load instructions. Following the instructions I found, I've created an executable script as below:

Code: [Select]
#!/bin/sh
/sbin/modinfo -F filename powernow_k8 >/dev/null 2>&1
if [ $? -eq 0 ]
then
        modprobe powernow_k8 >/dev/null 2>&1
fi

However, when the machine is restarted, the powernow_k8 module is still not loaded. I've tried without the condition testing and I've also tried using the absolute path to modprobe. Still nothing....

Any suggestions as to a working method to load the module under SME 9?

Paul.

Title: Re: CPU throttling problem
Post by: CharlieBrady on August 27, 2015, 05:46:12 PM
You can find this in /etc/rc.sysinit:

Code: [Select]
# Load other user-defined modules
for file in /etc/sysconfig/modules/*.modules ; do
  [ -x $file ] && $file
done

So that tells us that /etc/sysconfig/modules should be a directory, and you should put an executable file called, say, powernow_k8.modules there.

I suggest you make it just:

Code: [Select]
#! /bin/sh
modprobe powernow_k8

and see what shows up on the console when you boot up.

Title: Re: CPU throttling problem
Post by: toothandnail on August 27, 2015, 06:41:59 PM
Thanks for the suggestion. Tried that, still not loading. Unfortunately, I'm not on site (and won't be able to get back there for a few days), so I couldn't see any errors during boot.

For the moment, I've put this into /etc/rc.d/rc.local (not the recommended way of doing it, I know...):

Code: [Select]
modprobe powernow-k8
/etc/rc.d/init.d/cpuspeed start

That is working, so until I can get back to the site, that will have to do. I'll check a reboot with your suggestion next time I get to the site and see if that gives me any useful information.

Paul.
Title: Re: CPU throttling problem
Post by: guest22 on August 28, 2015, 02:21:56 AM
I did a bit of hunting and found that the suggested method of loading modules in CentOS 6 is to create a file in /etc/sysconfig/modules with the necessary load instructions. Following the instructions I found, I've created an executable script as below:


what is the _exact_ name of your script in the /etc/sysconfig/modules directory?
Title: Re: CPU throttling problem
Post by: toothandnail on August 28, 2015, 07:56:02 PM

what is the _exact_ name of your script in the /etc/sysconfig/modules directory?

:) That was the clue to a partial solution. When I looked, I'd named the file powernowk8.module. Changed to powernowk8.modules and it now loads the module on boot.

The odd thing is the /etc/init.d/cpuspeed is not being run, so the only governor available is performance. Manually running "/etc/init.d/cpuspeed start" after  boot brings the other governors in. I'm far from sure why it doesn't run during boot - something else to check...

Paul.
Title: Re: CPU throttling problem
Post by: guest22 on August 28, 2015, 08:12:59 PM
Is cpuspeed a SME Server managed service? In other words, does it have it's own 'service' in the config db?
Title: Re: CPU throttling problem
Post by: toothandnail on August 28, 2015, 08:58:51 PM
Is cpuspeed a SME Server managed service? In other words, does it have it's own 'service' in the config db?

I think so, though I'm not positive. looking through a dump of the configuration database, I found this:

Code: [Select]
cpuspeed=service
However, I can't use the "service cpuspeed" command to start it, while I can't use "/etc/init.d/cpuspeed <start><stop>" commands.

I did notice during boot the last time I was on the site that cpuspeed was shown as off in the screen messages.

Paul.


Title: Re: CPU throttling problem
Post by: guest22 on August 28, 2015, 09:20:46 PM
Whats the output of 'config show cpuspeed' ?
Title: Re: CPU throttling problem
Post by: toothandnail on August 28, 2015, 09:38:50 PM
Whats the output of 'config show cpuspeed' ?

Code: [Select]
[root@dominator ~]# config show cpuspeed
cpuspeed=service

Paul.
Title: Re: CPU throttling problem
Post by: guest22 on August 28, 2015, 09:41:29 PM
Try this:


'config setprop cpuspeed status enabled'


and reboot
Title: Re: CPU throttling problem
Post by: toothandnail on August 29, 2015, 12:04:09 AM
Try this:


'config setprop cpuspeed status enabled'


and reboot

Thanks - that was the final step. Had to hold off rebooting for a while - system was in the middle of its nightly virus scan (which reflects the speed of the old hardware - the scan used to take around 9 to 10 hours, new hardware has reduced that to around 2.75 - 3 hours..)

This was an upgrade to new (well, different) hardware. I installed SME 9 x64, then restored the backup from the older machine which was running SME 8.1. The old box was a dual-cpu machine with 2 2.0 GHZ Zenon processors. They weren't capable of variable speed. I'm wondering if the fact that the cpuspeed service was disabled could have been inherited from the backup?

Paul.
Title: Re: CPU throttling problem
Post by: janet on August 29, 2015, 02:03:21 AM
toothandnail
Quote
I'm wondering if the fact that the cpuspeed service was disabled could have been inherited from the backup?

Yes for sure. All those db settings in /home/e-smith/db get restored.