FreeBSD: Dealing with powerd and tunning


One thing that annoys me is the fact Xorg seems to use more cpu in FreeBSD than in Linux. I moved from default PC-BSD desktop to Gnome to reduce consumption. Gnome runs fine in FreeBSD (PC-BSD) but Xorg continue to suck. I left this issue for a while whereas tunning powerd and the whole system.

So, I started with powerd. After so many tests, I felt comfortable with the following settings:

/etc/rc.conf:


##############################################
# powerd: adaptive speed while on AC power, adaptive while on battery power
powerd_enable=”YES”
powerd_flags=”-a adaptive -b adaptive -n adaptive -i 85 -r 75 -p 500″

#http://wiki.freebsd.org/TuningPowerConsumption
performance_cx_lowest=”C2″
performance_cpu_freq=”800″
economy_cx_lowest=”C2″
economy_cpu_freq=”NONE”
##############################################

/boot/device.hints

#JES
#Problem with powerd (no decrease freq, always max)
#http://markmail.org/message/vb7bjn5m7ughralg#query:freebsd%20powerd%20no%20decrease%20frequency+page:1+mid:cmd4aovw5ff6ojge+state:results
#http://old.nabble.com/Dell-Precision-m4400-acline-problems-td28941873.html
#http://wiki.freebsd.org/TuningPowerConsumption
hint.p4tcc.0.disable=”1″
hint.acpi_throttle.0.disable=”1″
hint.p4tcc.1.disable=”1″
hint.acpi_throttle.1.disable=”1″

/boot/loader.conf

################
#JES
u3g_load=”YES”
umass_load=”YES”
acpi_ibm_load=”YES”

cpufreq_load=”YES”

With this settings my top processes are:

last pid: 76103; load averages: 0.36, 0.26, 0.32 up 0+00:59:44 10:12:11
128 processes: 1 running, 127 sleeping
CPU: 5.1% user, 0.0% nice, 2.6% system, 0.0% interrupt, 92.3% idle
Mem: 378M Active, 375M Inact, 461M Wired, 3132K Cache, 410M Buf, 2638M Free
Swap: 6067M Total, 6067M Free

PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMAND
2943 root 1 50 0 598M 441M select 1 7:25 14.26% Xorg
4016 jjess 3 62 0 326M 164M ucond 0 1:35 2.88% opera
3124 jjess 2 47 0 165M 25756K piperd 0 0:19 0.00% gnome-terminal
3931 jjess 1 49 0 32444K 6064K select 1 0:14 0.00% conky
3133 jjess 1 44 0 127M 31584K select 0 0:10 0.00% compiz

Sometimes Xorg drops to 5% or raises up 20-30%. But at least the CPUs temperature are more stable (41-45º). Setting the lowest frequency to 800Khz instead of “NONE” provides more performance and the laptop is more responsive (less delay when switching from one terminal to another, or moving from one workspace to another).

About jjjesss

I'm a guy interested in technology, bsd fan and concerned about the world around.
This entry was posted in BSD, FreeBSD, Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s