[arch-general] Powertop tunables and performance + Other optimizations

Martin Cigorraga msx at archlinux.us
Mon Jun 11 03:31:39 EDT 2012

On 31 May 2012 10:31, Sergi Pons Freixes <sachiel2014 at gmail.com> wrote:

> 2012/5/31 Martin Cigorraga <msx at archlinux.us>:
> > From my subjective own experience, it don't, the only thing I don't
> > activate when my laptop is plugged is the mouse switch since it instructs
> > the system to turnoff the USB port whenever there's no activity on it and
> > that can be very annoying, believe me xD
> I've been playing interactively with the tunables, and completely
> agree about how annoying is the auto suspend for the USB mouse :P.
> I'll probably make all the others permanent.
> > Combining Powertop 2 with Liquorix kernel, Ulatencyd, e4rat, preload and
> > some more fancy tweakes here and there -sysctl.conf, grub kernel line,
> > etc.- I have a feather-light, lightspeed KDE SC full suite with every eye
> > candy effect on and the best part is my notebook -Pavilion dv7-4287cl-
> > reminds _cool_ all the time.
> Sounds really nice. I've never heard about the kernel and software you
> mention, and after reading about them it sounds really interesting. Do
> you have any reference (website/blog/wiki/whatever) with these
> optimizations, apart from the Arch Wiki?

Sorry for the delay amigo català, this is what I do to squeeze the most of
my system -meaning 'system'  the combination of hardware and software-,
depending on your own hardware and software choices/combination it may or
may not help you at all or even worst, leave your system unusable... with
that in mind check out my following tweaks:

My laptop is a Pavilion dv7-4287cl, a first-gen i5 (Quad, 2,66mhz), 8gbRAM,
720hd5400rpm, hybrid video system sporting an ATi Radeon HD 5600 series.

~ $ lspci
00:00.0 Host bridge: Intel Corporation Core Processor DRAM Controller (rev
00:01.0 PCI bridge: Intel Corporation Core Processor PCI Express x16 Root
Port (rev 02)
00:02.0 VGA compatible controller: Intel Corporation Core Processor
Integrated Graphics Controller (rev 02)
00:16.0 Communication controller: Intel Corporation 5 Series/3400 Series
Chipset HECI Controller (rev 06)
00:1a.0 USB controller: Intel Corporation 5 Series/3400 Series Chipset USB2
Enhanced Host Controller (rev 05)
00:1b.0 Audio device: Intel Corporation 5 Series/3400 Series Chipset High
Definition Audio (rev 05)
00:1c.0 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI
Express Root Port 1 (rev 05)
00:1c.1 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI
Express Root Port 2 (rev 05)
00:1d.0 USB controller: Intel Corporation 5 Series/3400 Series Chipset USB2
Enhanced Host Controller (rev 05)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev a5)
00:1f.0 ISA bridge: Intel Corporation Mobile 5 Series Chipset LPC Interface
Controller (rev 05)
00:1f.2 SATA controller: Intel Corporation 5 Series/3400 Series Chipset 4
port SATA AHCI Controller (rev 05)
00:1f.3 SMBus: Intel Corporation 5 Series/3400 Series Chipset SMBus
Controller (rev 05)
00:1f.6 Signal processing controller: Intel Corporation 5 Series/3400
Series Chipset Thermal Subsystem (rev 05)
01:00.0 VGA compatible controller: ATI Technologies Inc Madison [Radeon HD
5000M Series] (rev ff)
01:00.1 Audio device: ATI Technologies Inc Redwood HDMI Audio [Radeon HD
5600 Series] (rev ff)
02:00.0 Network controller: Broadcom Corporation BCM4313 802.11b/g/n
Wireless LAN Controller (rev 01)
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B
PCI Express Gigabit Ethernet controller (rev 03)
7f:00.0 Host bridge: Intel Corporation Core Processor QuickPath
Architecture Generic Non-core Registers (rev 02)
7f:00.1 Host bridge: Intel Corporation Core Processor QuickPath
Architecture System Address Decoder (rev 02)
7f:02.0 Host bridge: Intel Corporation Core Processor QPI Link 0 (rev 02)
7f:02.1 Host bridge: Intel Corporation Core Processor QPI Physical 0 (rev
7f:02.2 Host bridge: Intel Corporation Core Processor Reserved (rev 02)
7f:02.3 Host bridge: Intel Corporation Core Processor Reserved (rev 02)

Make sure to check out the microcode kmod! (actually in [extra])

As you note this laptop runs nearly enterily Intel chipset so if your PC(s)
runs AMD take for sure much of the kernel line tweaks will not work since
their meant for Intel hardware.
I have several entries in my GRUB but the one I boot most is this following:

kernel /boot/vmlinuz-linux-lqx root=/dev/sda2 ro rootfstype=ext4 hpet=force
i915.i915_enable_rc6=1 pcie_aspm=force irqpoll i915.lvds_downclock=1
radeon.pcie_gen2=1 i915.semaphores=1 elevator=bfs
init=/usr/sbin/e4rat-preload-lite resume=/dev/sda2 acpi_backlight=vendor

rootfstype=ext4 : I forget to remove it, actually it isn't needed.
hpet=force i915.i915_enable_rc6=1 i915.lvds_downclock=1 i915.semaphores=1 :
these tweaks are meant for Intel chipset to preserve battery life - I can't
notice any performance hit with them on.
pcie_aspm=force :  makes sure it's activated.
radeon.pcie_gen2=1 : boosts F/LOSS radeon module - only for ATi RadeonHD
elevator=bfs : makes sure the Brain Fuck Scheduler is enabled.
init=/usr/sbin/e4rat-preload-lite : enable e4rat-lite optimizations.
resume=/dev/sda2 : restore from hibernation - in the event I hibernate my
laptop; most of time I just suspend it [0]
acpi_backlight=vendor : needs this to be able to control screen bright
within KDE SC.
irqpoll : it's not until recent kernels my crappy hardware works smooth, I
used to need this at boot time to force kernel assign IRQs in a clean way.
(I suggest to google all of these to get a wider idea about what they are
and what they do)

I'm currently running the Liquorix kernel 3.4.2-1-lqx #1 ZEN SMP PREEMPT
and it works great, KDE SC feels a lot more responsive than the stock
kernel, however you might want to check this Phoronix entry [1] before
making your choice.

3. /etc/sysctl.conf
Check it at http://pastebin.com/Tb0WtihW

4. /etc/rc.conf
There're a number of modules and daemons that can help you achieve a
responsive desktop while at the same time keep the power consumption
MODULES=(microcode acpi-cpufreq fuse cpufreq_ondemand cpufreq_performance
cpufreq_conservative cpufreq_powersave autofs4)
DAEMONS=(hwclock syslog-ng dbus !wicd ufw !network !netfs networkmanager
preload !ntpd irqbalance ulatencyd @crond acpid cpufreq colord
dnscrypt-proxy laptop-mode rpcbind nfs-common !sensors !sensord
!avahi-daemon !avahi-dnsconfd autofs sshd !kdm)
preload : helps speed up system files loading by caching them in memory.
irqbalance : does what it's named after :)
ulatencyd : a *MUST* if you run KDE SC with composite enabled. It works by
tweaking CGROUPS kernel feature on the fly to adjust CPU workload so your
KDE SC system behaves like if you were running dwm.
laptop-mode : helps maximize battery life.

Verynice is another good daemon to have in mind; while I find ulatencyd
makes a better job with KDE SC, verynice is useful if you *not* run KDE SC
but still wants some kind of  workload manager. I found ulatencyd is
heavier on resources than verynice but handles better KDE SC so in the long
run it makes a better job, on the other side I tend to install verynice on
every other machine I do not install ulatencyd.

5. PowerTOP2
It's a bit frustrating to have to activate it everytime the computer wakes
up but for me it's a _must_. I added the executable to the wheel group in
the sudoers file so I don't need to enter my pwd every time I launch it - I
don't like much the idea but didn't find a better way, it's the eternal
trade-off between security and usability o_o

I can't think about anything much else I've done so far to both optimize
overall computing experience and save battery charge when not plugged; when
on the road I tend to work the much as I can with the console (thanks
tmux!) and launch dwm when I need a graphical application, this way I
minimize X server impact on battery life.

These optimizations comes from the wiki and from over the net  -from
AskUbuntu for example- and I don't remember anymore were I found this or
that one but I'm sure the original posts are easy to find as well new and
better ways to optimize your system, there's plenty room to improve here so
I would love to hear if you have any tip to share about it :)

Happy tweaking!

[0] http://xkcd.com/705/


More information about the arch-general mailing list