Sutff about my job and comments about personal activities. Take a look to the first idea.

Tuesday, October 10, 2006

CPU Frequency

Intel pentium 4 has a cpufreq capability (p4-clockmod module) which can lower the frequency of the cpu... but what about using maximum speed when needed?
The kernel has it's own governors named "conservative", "ondemand", "powersave", "userspace" which let you dinamically change the frequency ( modules: cpufreq_conservative, cpufreq_ondemand, cpufreq_powersave, cpufreq_userspace)

cpufrequtils helps in configuring the max/min frequency and governor

cpufreq-info will give you the current governor and frequency without digging in sysfs

cpufreq-set will dinamically let you change the governor

$ cpufreq-set -g [ondemand|performance] 


You can control if nice process increment cpu frequency using
/sys/devices/system/cpu/cpu0/cpufreq/ondemand/ignore_nice_load


sysfsutils helps configuring sysfs in /etc/sysfs.conf
devices/system/cpu/cpu0/cpufreq/ondemand/ignore_nice_load = 1


A useful reference is How to make firefox faster

Saturday, October 07, 2006

Debian available updates

At debian, there is a program named "apt-show-versions" which show the updates available... even tough I've a 2mbit dsl link I usually just upgrade the major/minor updates (no revisions), after having a list of 400 packages to update every 2 weeks and not even use some of them, I decided to give my script power a try... so I create a script to just list to avoid listing the revision updates and I got something like...
/usr/bin/apt-show-versions -u | sed -e 's/\([:alpha:]*\) .*from \([0-9]:\)*\([0-9.a-zA-Z~]\+\)\([0-9a-zA-Z.+-]*\)* to \([0-9]:\)*\([0-9.a-zA-Z~]\+\)\([0-9a-zA-Z.+-]*\)*/\1 \3 \6/' | awk '{ if ( $2 != $3 ) print $1, "upgradable from", $2, "to", $3 }'

looks like hell but works, so use it if you like...