Page 1 of 1

more power-saving options (C-states..) + acpi boot

Posted: 13 Mar 2014 11:33
by Andy22
Hi,

enabling the default power service, did nothing on my system regarding saving power, despite it reported to throttle my cpu to 300 MHz.

I followed this guide: https://wiki.freebsd.org/TuningPowerConsumption and got some improvements. It seems the C-states of modern CPU's are not used by default and need manual attention. Would be nice to have those better power saving features accessible in the web gui, without the need to study yet a other freeBSD/nas4free guide :p

I'm also wondering if freeBSD supports the C3/C4/C5/C6 states and how to check if they are supported/enabled? I also wonder what other more modern power settings exists and if they can be used on nas4free? We have rather short burst of high server usage, with very long phases if idles. So reducing power as much as possible on those long idle times is attractive from a power bill perspective.

I also have to experiment with WOL, i'm just used to magic packets and not sure if u can setup it in a way that u don't need special tools on the client to wake the server? Is it possible to get the server to sleep and wake it just my "trying" to access the samba share or trying to access via a svn/git client?

thx
Andy

PS: It seems nas4free only manually boots into a acpi configuration, where those advanced power features are accessible/controllable. I would like a way to control this in the webgui and have some control over the more advanced acpi/power options.

Re: more power-saving options (C-states..) + acpi boot

Posted: 13 Mar 2014 12:29
by chrisf4lc0n
I followed the same guide you mentioned and achieved C states by loading them in webGUI under System>Advanced>Command Scripts, just created 2 entries due to a dual core CPU:
sysctl dev.cpu.1.cx_lowest=C3
sysctl dev.cpu.0.cx_lowest=C3
Both PostInit...
My lowest C state is just C3. To see what is your lowest C state you will need to do the following:

Code: Select all

sysctl dev.cpu | grep cx
My output:

Code: Select all

dev.cpu.0.cx_supported: C1/1/1 C2/3/80
dev.cpu.0.cx_lowest: C3
dev.cpu.0.cx_usage: 10.59% 89.40% last 823us
dev.cpu.1.cx_supported: C1/1/1 C2/3/80
dev.cpu.1.cx_lowest: C3
dev.cpu.1.cx_usage: 7.94% 92.05% last 2889us
Hope it helps.

Re: more power-saving options (C-states..) + acpi boot

Posted: 13 Mar 2014 12:35
by chrisf4lc0n
You can also force the disks to spin down, by adding lines for every HDD you have got connected:
System>Advanced>Command Scripts PostInit
camcontrol standby ada0 -t 600
and for every ada device on...
It spins your HDDs down after 10 minutes of idle...

I also did this:
viewtopic.php?f=66&t=5546

Re: more power-saving options (C-states..) + acpi boot

Posted: 13 Mar 2014 12:38
by Andy22
ah thx will try this, btw how does booting in acpi mode fit in here, since by default nas4free selects the "none acpi" boot option.

So whats the actual difference booting default vs acpi mode and how does it relate to certain power options?

Re: more power-saving options (C-states..) + acpi boot

Posted: 13 Mar 2014 19:51
by Andy22
chrisf4lc0n wrote:I followed the same guide you mentioned and achieved C states by loading them in webGUI under System>Advanced>Command Scripts, just created 2 entries due to a dual core CPU:
sysctl dev.cpu.1.cx_lowest=C3
sysctl dev.cpu.0.cx_lowest=C3
Both PostInit...
Is there a reason u use those as "Command Scripts", compared to directly adding them to the "sysctl.conf" tab?

Re: more power-saving options (C-states..) + acpi boot

Posted: 14 Mar 2014 09:19
by raulfg3
Better if use "sysctl.conf" tab

But "sysctl.conf" tab is only in latest N4F release 9.2.0.1.847 and newer