Tuesday, May 12, 2009

3D acceleration with i965

Optimizing the performance of an Intel 965 graphics card could be a tricky job. The problem gets bigger if you want to use Compiz and have to use the 3D acceleration. There are three available acceleration methods for Intel cards: the old 'XAA', the stable 'EXA' and the not-ready-yet 'UXA'. I found that the default settings give rather poor performance in Unbuntu Jaunty and the result from glxgears was ~480 FPS. With the following settings in xorg.conf I was able to get 750 FPS.


Section "Device"
Identifier "Configured Video Device"
Option "AccelMethod" "EXA"
Option "MigrationHeuristic" "greedy"
Option "ExaNoComposite" "false"
EndSection


Also setting this variable in /etc/environment seems to help as well:

INTEL_BATCH="1"

Thursday, May 7, 2009

Disable frequent hard disk spindown in Ubuntu

By default the hdparm settings in Ubuntu are not hardware friendly so some tuning might be needed to adjust your hard disc parameters. Example for this is the Load_Cycle_Count counter which usually gets increased once in a minute without heavy disc usage. Most of the manufacturers construct their disks with MTBF of 300,000 load cycles, so you might reach it within one year. You don't want to buy a new HDD once a year, don't you? Here is a fix.

Edit /etc/hdparm.conf and add the following section (replace /dev/sda with your actual device):

/dev/sda {
apm=254
spindown_time = 242
read_ahead_sect = 2
keep_settings_over_reset = on
}