Wednesday Apr 22, 2009

Processor Clock Throttling Support for Solaris

Solaris support for processor clock throttling is being introduced into Solaris 10 as part of the Solaris 10 5/09 release. The support is passive in nature in that throttling is not a result of any OS related monitoring. Instead, Solaris will throttle the processor clock speed as a result of receiving ACPI _TPC notifications from the firmware.

Throttling is not considered an effective method for saving power and will occur simultaneously with frequency clock scaling and ACPI C-State management (which are the preferred methods for processor power management). The support for processor clock throttling has been added to Solaris mostly as a firmware thermal management mechanism. Whether or not this feature is available depends solely upon the firmware. Here is a handy DTrace script that can be used to see if any throttling is supported on your system:

#!/usr/sbin/dtrace -As
cpu_ts_err_msg
{
    printf("%s", stringof(arg0));
} 

The script above must be run using anonymous DTrace. This means that the script above should be run before rebooting. After reboot any messages can be retrieved by executing "/usr/sbin/dtrace -a".

In addition, any clock throttling activity can be monitored using the following DTrace script:

#!/usr/sbin/dtrace -s
throttle_transition
{
    printf("%d", arg0);
} 

More information regarding processor clock throttling (ACPI T-States) can be found in the ACPI specification at http://www.acpi.info/

Monday May 05, 2008

AMD PowerNow! for Solaris

One of my earlier blog entries announced Enhanced Intel SpeedStep support in Solaris. At the tail end of that blog entry, I mentioned that AMD PowerNow! support in Solaris was not far off. And so it was. PowerNow! support for AMD processor families 10h and greater is now available in Solaris 10 Update 5 and OpenSolaris.

If you are wondering what AMD processor family 10h is, then you should be thinking of newer AMD processors like Barcelona. If you have Solaris running on your system you can retrieve the CPU family value via the cpu_info kstat:

kstat -m cpu_info -i 0 -s implementation        
module: cpu_info                        instance: 0     
name:   cpu_info0                       class:    misc
        implementation                  x86 (chipid 0x0 AuthenticAMD 100F23
family 16 model 2 step 3 clock 2000 MHz)

Note that the family value is printed in decimal, so the family value of 16 above is equivalent to 10 in hex and so, PowerNow! support exists in Solaris for this CPU.

The easiest way to tell if your Solaris AMD system supports PowerNow! is to display the new supported_frequencies_Hz kstat statistic that has been added to the cpu_info module:

$ kstat -m cpu_info -i 0 -s supported_frequencies_Hz
module: cpu_info                        instance: 0     
name:   cpu_info0                       class:    misc
        supported_frequencies_Hz
1000000000:1200000000:1400000000:1700000000:2000000000

The existence of more than one frequency in the list above indicates that Solaris supports frequency scaling of the CPU. To enable CPU power management on Solaris x86, a "cpupm" entry must be added to the power.conf(4) file. Additionally, a "cpu-threshold" entry can be added to power.conf(4) to define an idleness value by which the CPU can be power managed.

I frequently enable CPU power management on my Barcelona-based system and set its CPU idle threshold by adding the following two entries to my power.conf(4) file:

cpupm            enable
cpu-threshold    15s

After leaving my system idle for 15 seconds or more, I can see PowerNow in action by displaying the newly introduced current_clock_Hz kstat statistic:

kstat -m cpu_info -i 0 -s current_clock_Hz       
module: cpu_info                        instance: 0     
name:   cpu_info0                       class:    misc
        current_clock_Hz                1000000000
My CPU is now running at its lowest supported frequency, 1.0 GHz. This should save power and generate less heat. Cool!

Friday Sep 21, 2007

Introducing Enhanced Intel SpeedStep to Solaris

At long last, we've integrated CPU frequency scaling into Solaris. And we're making it available for the first time in SXDE 9/07. Though we've supported CPU power management on SPARC for several years, this is the first time that CPU power management is being made available on Solaris x86.

As the title of this inaugural post suggests, our first Solaris x86 CPU power management offering is for those systems running Solaris on Intel platforms. More specifically, Enhanced Intel SpeedStep on Solaris is only supported on systems running Intel processors that belong to Family 0xF - Models >=0x3 or Family 0x6 - Models >= E. You're probably asking yourself, "What does that mean to me?"

The family/model combinations listed above roughly translate to:

  • Pentium 4 and Intel Xeon processors
  • Intel Core Solo and Intel Core Duo processors
  • Intel Xeon Processor 5100 Series and Intel Core 2 Duo processors

But the easiest way to tell if your Solaris x86 system supports CPU power management is to display the new supported_frequencies_Hz kstat statistic that has been added to the cpu_info module:

$ kstat -m cpu_info -s supported_frequencies_Hz
module: cpu_info                        instance: 0
name:   cpu_info0                       class:    misc
        supported_frequencies_Hz        2800000000:3200000000

module: cpu_info instance: 1 name: cpu_info1 class: misc supported_frequencies_Hz 2800000000:3200000000

As you can see, there is more than one supported frequency listed for each of the CPU instances above. That means that Solaris supports frequency scaling of those CPUs.

With the knowledge that Solaris supports CPU power management on your system, you may be asking yourself, "How do I turn it on?" We've recently added a couple of new keywords to the power.conf(4) file. The new keywords "cpupm" and "cpu-threshold" can be used to control CPU power management behavior on your Solaris system.

I frequently enable CPU power management on my Pentium 4 system and set its CPU idle threshold by adding the following two entries to my power.conf(4) file:

cpupm            enable
cpu-threshold    15s

When I leave my system idle for 15 seconds or more, I can see the result of my "idleness" by displaying the newly introduced current_clock_Hz kstat statistic:

$ kstat -m cpu_info -s current_clock_Hz 
module: cpu_info                        instance: 0 
name:   cpu_info0                       class:    misc 
        current_clock_Hz                2800000000 
 
module: cpu_info                        instance: 1 
name:   cpu_info1                       class:    misc 
        current_clock_Hz                2800000000

My CPUs have been scaled to run at their lowest supported frequency, 2.8 GHz, and are consuming less power and are generating less heat as a result. Not bad, huh?

Well, if you're not running one of the Intel processors listed above, or if you're running an AMD processor, don't fret. We're busy working on extending our Solaris x86 CPU power management support, so there's a good chance that Solaris will be supporting your processor in one of the upcoming SXDE releases. You're sure to see more posts from me as things progress.

About

Mark Haywood

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
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
   
       
Today