<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Arie's Blog &#187; GNU/Linux</title>
	<atom:link href="http://ariekanarie.nl/category/gnulinux/feed" rel="self" type="application/rss+xml" />
	<link>http://ariekanarie.nl</link>
	<description></description>
	<lastBuildDate>Mon, 14 Jun 2010 09:48:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Remote kernel upgrade with Debian/Ubuntu and Grub2</title>
		<link>http://ariekanarie.nl/archives/211/remote-kernel-upgrade-with-debianubuntu-and-grub2</link>
		<comments>http://ariekanarie.nl/archives/211/remote-kernel-upgrade-with-debianubuntu-and-grub2#comments</comments>
		<pubDate>Tue, 02 Mar 2010 08:56:05 +0000</pubDate>
		<dc:creator>Arie</dc:creator>
				<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[grub]]></category>
		<category><![CDATA[grub2]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[remote]]></category>
		<category><![CDATA[upgrade]]></category>

		<guid isPermaLink="false">http://ariekanarie.nl/?p=211</guid>
		<description><![CDATA[Remotely upgrading a kernel without some sort of remote KVM solution is not for the faint hearted. Realizing you forgot to include some module, or build the initrd image after remotely rebooting a kernel is even worse Luckily there are some nice tricks you can use to make a remote kernel upgrade as safe as [...]]]></description>
			<content:encoded><![CDATA[<p>Remotely upgrading a kernel without some sort of remote KVM solution is not for the faint hearted. Realizing you forgot to include some module, or build the initrd image <strong>after</strong> remotely rebooting a kernel is even worse <img src='http://ariekanarie.nl/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Luckily there are some nice tricks you can use to make a remote kernel upgrade as safe as possible.</p>
<p>First, make sure you have a valid kernel. Copy the .config of an old kernel and &#8216;make oldconfig&#8217; to make it work on your new-to-be-compiled kernel.</p>
<p>Second, make the kernel using the &#8216;make-kpkg&#8217; package, don&#8217;t forget the &#8211;initrd parameter if you need it.</p>
<p>Third, after installing the kernel package, don&#8217;t forget to check if the initrd image got generated. For some strange reason Debian won&#8217;t generate this even after building with make-kpkg &#8211;image, you can read more about that <a href="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=528373" target="_blank">here</a>. You basically need to copy a file from &#8216;/usr/share/kernel-package/examples/etc/kernel/postinst.d/initramfs&#8217; to &#8216;/etc/kernel/postinst.d/initramfs&#8217;</p>
<p>Fourth, you need to configure Grub2 so it uses a kernel boot option which makes the kernel restart if it can&#8217;t boot for some reason. To do this with Grub2, open /etc/default/grub and add &#8220;panic=5&#8243; to GRUB_CMDLINE_LINUX_DEFAULT, like this:</p>
<blockquote>
<div id="_mcePaste">GRUB_CMDLINE_LINUX_DEFAULT=&#8221;quiet panic=5&#8243;</div>
</blockquote>
<p>Fifth, Grub2 needs to be told to only boot the new kernel once, so in case the new kernel panics, it automatically restarts using a kernel you know works (your current one perhaps). Else the &#8216;panic=5&#8242; we set earlier will only lead to a reboot loop.</p>
<p>To do this open /etc/default/grub and change GRUB_DEFAULT to saved, like this:</p>
<blockquote><p>GRUB_DEFAULT=saved</p></blockquote>
<p>To configure &#8216;reboot-once-into-new-kernel&#8217;, we need to do two more things, first we need to tell Grub2 what your working, safe kernel is. Check /boot/grub/grub.cfg for the name of this kernel, but don&#8217;t change anything in this file.</p>
<p>My safe kernel is called: &#8221;Debian GNU/Linux, with Linux 2.6.32-2-686&#8243;, which I can set as the default, safe, kernel with this command:</p>
<blockquote><p>grub-set-default &#8221;Debian GNU/Linux, with Linux 2.6.32-2-686&#8243;</p></blockquote>
<p>Now we have to tell Grub to reboot once into the new kernel, again we need the name of the new kernel, mine is &#8221;Debian GNU/Linux, with Linux 2.6.32-example&#8221;, use this command.</p>
<blockquote><p>grub-reboot &#8221;Debian GNU/Linux, with Linux 2.6.32-example&#8221;</p></blockquote>
<p>Don&#8217;t worry, this won&#8217;t reboot your machine.</p>
<p>The final step is to generate a new /boot/grub/grub.cfg, else all the things we just did won&#8217;t have an effect</p>
<blockquote><p>update-grub</p></blockquote>
<p>Now you&#8217;re ready to reboot, good luck and fingers crossed. After a succesful boot, you can set your new kernel as the default using the grub-set-default command</p>
<blockquote><p>grub-set-default &#8221;Debian GNU/Linux, with Linux 2.6.32-example&#8221;</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://ariekanarie.nl/archives/211/remote-kernel-upgrade-with-debianubuntu-and-grub2/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Smooth 1080p h264 playback on Linux</title>
		<link>http://ariekanarie.nl/archives/143/smooth-1080p-h264-playback-on-linux</link>
		<comments>http://ariekanarie.nl/archives/143/smooth-1080p-h264-playback-on-linux#comments</comments>
		<pubDate>Wed, 29 Jul 2009 20:22:35 +0000</pubDate>
		<dc:creator>Arie</dc:creator>
				<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://ariekanarie.nl/?p=143</guid>
		<description><![CDATA[I&#8217;ve been struggling for quite some time trying to get 1080p content to play smoothly on my MythTV pc. I managed to get good playback of 720p files by compiling mplayer myself and using a recent version of the closed source nvidia driver. Playing back 1080p content however, was still a problem. I was never [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been struggling for quite some time trying to get 1080p content to play smoothly on my MythTV pc. I managed to get good playback of 720p files by compiling mplayer myself and using a recent version of the closed source nvidia driver.</p>
<p>Playing back 1080p content however, was still a problem. I was never able to get smooth playback with mplayer. Only the xbmc videoplayer could play 1080p smoothly on my system. XBMC is not an option due to the <a title="WAF" href="http://en.wikipedia.org/wiki/Woman_acceptance_factor" target="_blank">WAF</a>, it has to be something that runs from MythTV.</p>
<p>Fooling around with coreavc-for-linux (I love CoreAVC on Windows) got me nowhere. Recompiling, tweaking and updating mplayer/nvidia/xorg, nothing seemed to work.</p>
<p>Until I tried a new version of mplayer from the Debian Multimedia repositories. The mplayer version in that repository has support for a new feature in the linux nvidia drivers that (finally) allows video decoding on the GPU.</p>
<p>The easy steps to get this to work:</p>
<ul>
<li>Download and install the new nvidia linux drivers (180+)</li>
<li>Add the Debian Multimedia repository to your sources.list</li>
<li>Install mplayer from the new Debian Multimedia repository</li>
<li>Start mplayer with &#8216;-vo vdpau -vc ffh264vdpau&#8217;</li>
</ul>
<p>More than a year of tweaking and tinkering made redundant by these easy steps, excellent!</p>
]]></content:encoded>
			<wfw:commentRss>http://ariekanarie.nl/archives/143/smooth-1080p-h264-playback-on-linux/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Switching from Ubuntu/Windows to Mac OS X</title>
		<link>http://ariekanarie.nl/archives/107/switching-from-ubuntuwindows-to-mac-os-x</link>
		<comments>http://ariekanarie.nl/archives/107/switching-from-ubuntuwindows-to-mac-os-x#comments</comments>
		<pubDate>Wed, 21 Jan 2009 22:11:26 +0000</pubDate>
		<dc:creator>Arie</dc:creator>
				<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://ariekanarie.nl/?p=107</guid>
		<description><![CDATA[I&#8217;ve been using my new Macbook for a whopping two days now, so I think it&#8217;s time to share some of my early impressions. First of all, I&#8217;m not a typical computer user. I&#8217;m picky, opinionated and totally unreasonable when it comes to my requirements for an Operating System. Before my Macbook my setup consisted [...]]]></description>
			<content:encoded><![CDATA[<p><img class="size-full wp-image-117   alignright" style="border: 0pt none;" title="apple-logo" src="http://ariekanarie.nl/wordpress/wp-content/uploads/2009/01/apple-logo.png" alt="apple-logo" width="152" height="186" /></p>
<p>I&#8217;ve been using my new Macbook for a whopping two days now, so I think it&#8217;s time to share some of my early impressions.</p>
<p>First of all, I&#8217;m not a typical computer user. I&#8217;m picky, opinionated and totally unreasonable when it comes to my requirements for an Operating System. Before my Macbook my setup consisted of:</p>
<ul>
<li>Desktop PC, Windows XP: Used for gaming mainly, also editting photo&#8217;s and as a &#8216;<a href="http://en.wikipedia.org/wiki/Thin_client" target="_blank">fat client</a>&#8216; for Putty</li>
<li>Laptop, Ubuntu: Used for work and midnight-coding. Purely a development tool for developing Ruby on Rails webapplications, accessing <a href="http://icanhascheezburger.com/" target="_blank">icanhazcheeseburger.com</a> and <a href="http://punditkitchen.com/" target="_blank">other</a> <a href="http://graphjam.com/" target="_blank">important</a> <a href="http://www.dilbert.com/" target="_blank">work</a> <a href="http://thedailywtf.com/">stuff</a>.</li>
</ul>
<p><span id="more-107"></span></p>
<p>The Windows XP of my desktop PC is a necessary evil. Games for Linux and Mac OS X are rare and my girlfriend still has an emergency Windows-account she can use whenever her Windows XP laptop refuses to work properly. Simply put: I&#8217;m stuck with XP for my desktop and I don&#8217;t really mind (a lot).</p>
<p><img class="alignnone size-medium wp-image-116" style="border: 0pt none;" title="607px-ubuntu_logosvg" src="http://ariekanarie.nl/wordpress/wp-content/uploads/2009/01/607px-ubuntu_logosvg-300x78.png" alt="607px-ubuntu_logosvg" width="300" height="78" /></p>
<p>The laptop running <a href="http://http://www.ubuntu.com/" target="_blank">Ubuntu</a> belongs to <a href="http://www.finalist.com/" target="_blank">my employer</a>. Ubuntu is an excellent platform to develop <a href="http://rubyonrails.org/" target="_blank">Ruby on Rails</a> applications, the <a href="http://packages.ubuntu.com/intrepid/" target="_blank">huge Ubuntu repository </a>contains recent version of all necessary tools and the <a href="http://en.wikipedia.org/wiki/Advanced_Packaging_Tool" target="_blank">apt package manager</a> is simply unmatched on any platform. To isolate myself from outside influences during coding sessions I use a closed headphone and <a href="http://amarok.kde.org/" target="_blank">Amarok</a> (a rather bloated <a href="http://kde.org/" target="_blank">KDE</a> program, so I can&#8217;t bitch about iTunes without being an ever bigger hypocrit). <a href="http://pidgin.im" target="_blank">Pidgin</a> provides me with access to nearly all IM networks, while <a href="https://addons.mozilla.org/en-US/firefox/addon/5081" target="_blank">TwitterFox</a> keeps me in touch with fellow twitterati.</p>
<p>My new Macbook is supposed to replace the Ubuntu laptop and serve as an alternative to my desktop at home. Here are some of my initial thoughts regarding this migration:</p>
<blockquote><p><em><strong>It just works</strong></em></p></blockquote>
<p>It doesn&#8217;t.</p>
<p>Ok to be fair, a lot of stuff just &#8216;works&#8217;, I am however spoilt by Ubuntu 8.10 which also &#8216;just works&#8217;, it just fails to work on different points compared to Mac OS X. OS X fails to &#8216;just work&#8217; as a Ruby on Rails development environment, sure it comes preloaded with Ruby on Rails, but it has ancient version of Rails, Ruby and Rake and this completely screwed me over while trying to convert my fresh Macbook into the ultimate web-development machine.</p>
<p>Multimedia support is not as good out of the box as Ubuntu. In Ubuntu all the codecs you need are in the repository and are a easy to install. To be fair, this is only since the 8.x branch of Ubuntu. For OS X I had to find a bunch of codecs from questionable vendors (I&#8217;ll never trust the DivX corporation after their bloated Windows installers) before I could get my movies and series to play in Quicktime.<br />
Speaking of horrible failures, I don&#8217;t see how anyone could enjoy Quicktime. It&#8217;s completely inadequate compared to Zoom Player on Windows or MPlayer on Linux. I&#8217;m planning to replace it by something decent ASAP. Preferbly something pretty like <a href="http://http://xbmc.org/" target="_blank">XBMC</a> or the OS X specific port of this brilliant project.</p>
<blockquote><p><em><strong>Package management? What&#8217;s that?</strong></em></p></blockquote>
<p>Mac OS X understands package management just like <a href="http://www.youtube.com/watch?v=_GxC4kKD9qA" target="_blank">this girl</a> understands &#8220;PC&#8217;s&#8221;. Not a clue. Everything application you install has it&#8217;s own auto-update function and the built-in Software Update is about as useful as &#8220;Microsoft Update&#8221;. Which is not bad, it&#8217;s just not as great as Ubuntu&#8217;s software updater.</p>
<blockquote><p><em><strong>MacPorts &lt; apt</strong></em></p></blockquote>
<p><a href="http://www.macports.org/" target="_blank">MacPorts</a> is similar to Debian/Ubuntu&#8217;s APT. It provides an easy way to install and update software for your Mac. Unfortunately it&#8217;s more like Gentoo&#8217;s &#8216;<a href="http://en.wikipedia.org/wiki/Portage_(software)#emerge" target="_blank">emerge</a>&#8216; and less like Debian&#8217;s &#8216;apt-get&#8217;. Everything you install has to be compiled first, and if you want to install something with fancy graphics you&#8217;ll have to wait for an hour while the X window manager gets compiled (ok, this is only the first time).<br />
Fortunately it does what it&#8217;s supposed to, it just takes quite a lot longer than APT and the repository of available software is tiny compared to Ubuntu&#8217;s insane heap of <a href="http://en.wikipedia.org/wiki/Free_and_Open_Source_Software" target="_blank">FOSS</a>. For example, something like &#8216;<a href="http://htop.sourceforge.net/">htop</a>&#8216; is not available on OS X, but luckily there&#8217;s the <a href="http://guides.macrumors.com/Activity_Monitor" target="_blank">Activity Monitor</a> GUI to offer some compensation.</p>
<blockquote><p><em><strong>OS X &lt; GNU</strong></em></p></blockquote>
<p>Mac OS X implements all the usual Unix tools. Things like find and grep. These are kinda different to the GNU-tools I used on my Ubuntu laptop and Debian servers. As far as I can tell after these few days of use, the Mac OS X versions are inferior to their GNU-siblings. I&#8217;ll have to get used to this or find alternative tools</p>
<p>So much for the bitching, here are a few things I do like:</p>
<blockquote><p><em><strong>It just works</strong></em></p></blockquote>
<p>A lot of stuff works just fine out of the box. The prepackaged software gives Ubuntu a good run for it&#8217;s money. Also, it&#8217;s obvious OS X is more popular than Linux. Quite a few software products offer a reasonable up-to-date version for Mac. Skype for example has a Mac version which is nearly identical to the Windows version, while the Linux version is lacking a lot.</p>
<blockquote><p><em><strong>Basic hardware compatibility is not an issue</strong></em></p></blockquote>
<p>If you&#8217;re the only one making hardware for your OS (or is it the other way around?) it&#8217;s easy to make that hardware supported in the OS. While the linux kernel provides support for nearly every graphics card, sound card, IDE controller and toaster made in the history of electronics, OS X only has to support the very limited set of hardware used by Apple. And to Apple&#8217;s credit, it does this very well. Unlike Linux they don&#8217;t have to work around crappy vendors breaking standards that crash your laptop after a resume-from-standby. As a result, stuff like suspend-to-ram and connecting multiple monitors works really well and quickly.</p>
<blockquote><p><em><strong>It&#8217;s a lot like Linux</strong></em></p></blockquote>
<p>Overall I feel quite at home in OS X already. I was able to set up a proper development environment during a single evening, inspite of the great efforts of MacPorts to keep compiling very large bits of software. During the coming weeks I expect to find a lot more things that are different/worse/better in OS X compared to Ubuntu but the past few days have made me optimistic about the chances of OS X being the only OS on this Macbook. I originally intended to go for a triple boot setup; Windows XP, Ubuntu and OS X, but I think I&#8217;ll settle for installing Windows XP in a VirtualBox. Not because I like XP that much, but for testing web-application in the <a href="http://en.wikipedia.org/wiki/Internet_Explorer_6" target="_blank">worst browser ever made</a> and it&#8217;s younger brothers.</p>
<p>That&#8217;s it for now, I&#8217;ll probably write a new post in a couple of weeks, because I&#8217;m sure OS X has plenty of annoyances and amazements left in store for me.<img class="alignright size-thumbnail wp-image-115" style="border: 0pt none;" title="internet_explorer_logo_old" src="http://ariekanarie.nl/wordpress/wp-content/uploads/2009/01/internet_explorer_logo_old-150x150.png" alt="internet_explorer_logo_old" width="150" height="150" /></p>
]]></content:encoded>
			<wfw:commentRss>http://ariekanarie.nl/archives/107/switching-from-ubuntuwindows-to-mac-os-x/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>mod_rails vs thin vs ebb vs mongrel</title>
		<link>http://ariekanarie.nl/archives/51/mod_rails-vs-thin-vs-ebb-vs-mongrel</link>
		<comments>http://ariekanarie.nl/archives/51/mod_rails-vs-thin-vs-ebb-vs-mongrel#comments</comments>
		<pubDate>Wed, 16 Apr 2008 09:29:22 +0000</pubDate>
		<dc:creator>Arie</dc:creator>
				<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://ariekanarie.nl/?p=51</guid>
		<description><![CDATA[With the recent release of mod_rails, I thought it was time for yet another benchmark. Mod_rails aims to make deployment of RubyOnRails applications comparable to deploying a PHP application on a shared host. The contestants mod_rails (Apache 2.2.8) Thin 0.8.0 (Cluster of 4 behind nginx 0.5.33, both TCP and Unix socket) Ebb 0.1.0 (Cluster of [...]]]></description>
			<content:encoded><![CDATA[<p>With the recent release of <a href="http://modrails.com" target="_blank">mod_rails</a>, I thought it was time for <a href="http://ariekanarie.nl/archives/45/yet-another-ruby-server" target="_blank">yet</a> <a href="http://ariekanarie.nl/archives/44/ruby-web-server-performance" target="_blank">another</a> benchmark. Mod_rails aims to make deployment of RubyOnRails applications comparable to deploying a PHP application on a shared host.</p>
<p><strong>The contestants</strong></p>
<p>mod_rails (Apache 2.2.8)</p>
<p>Thin 0.8.0 (Cluster of 4 behind nginx 0.5.33, both TCP and Unix socket)</p>
<p>Ebb 0.1.0 (Cluster of 4 behind nginx 0.5.33)</p>
<p>Mongrel 1.1.4 (Cluster of 4 behind nginx 0.5.33)</p>
<p>The benchmark is the index page of <a href="http://leefjedoel.nl" target="_blank">Leef je doel</a>, the hardware used is a Dell D830 laptop with a T7300 (speedstep disabled), 2GB of RAM and a 7200RPM harddisk. The page runs a few queries and also serves a lot of fragments from memcached.</p>
<p><strong>The results</strong></p>
<p><a href="http://ariekanarie.nl/wordpress/wp-content/uploads/2008/04/image001.png" rel="lightbox"><img class="alignnone size-full wp-image-52" title="mod_rails vs thin vs ebb vs mongrel" src="http://ariekanarie.nl/wordpress/wp-content/uploads/2008/04/image001.png" alt="" width="482" height="289" /></a></p>
<table border="0">
<tbody>
<tr>
<td></td>
<td><strong>-n 10000 -c 10<br />
</strong></td>
<td><strong> -n 10000 -c 50</strong></td>
</tr>
<tr>
<td>mod_rails</td>
<td>79.2</td>
<td>77.4</td>
</tr>
<tr>
<td>thin(tcp)</td>
<td>84.22</td>
<td>84.06</td>
</tr>
<tr>
<td>thin(socket)</td>
<td>86.4</td>
<td>87.65</td>
</tr>
<tr>
<td>ebb</td>
<td>93.2</td>
<td>91.2</td>
</tr>
<tr>
<td>mongrel</td>
<td>79.22</td>
<td>75.92</td>
</tr>
</tbody>
</table>
<p><strong>Performance</strong></p>
<p>Like my previous test, Ebb comes out on top, closely followed by Thin.</p>
<p>Using the default Apache2 config supplied by Ubuntu, mod_rails shows performance equal to mongrel_cluster behind nginx. I&#8217;m sure that by tweaking the Apache config files, some performance can be gained.</p>
<p>Compared to setting up nginx and thin/ebb/mongrel, setting up mod_rails is a lot simpler. Have a look at <a href="http://www.railsplugins.net/passenger.mov" target="_blank">their screencast</a> to see how easy it is, if you have a working Apache2, you&#8217;ll have mod_rails up and running within minutes. There are some small issues with mod_rails at the moment, for a list, check <a href="http://code.google.com/p/phusion-passenger/issues/list" target="_blank">mod_rails&#8217; Google Code page</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://ariekanarie.nl/archives/51/mod_rails-vs-thin-vs-ebb-vs-mongrel/feed</wfw:commentRss>
		<slash:comments>12</slash:comments>
<enclosure url="http://www.railsplugins.net/passenger.mov" length="18988364" type="video/quicktime" />
		</item>
		<item>
		<title>Using MemCached to speed up fragment caching</title>
		<link>http://ariekanarie.nl/archives/46/using-memcached-to-speed-up-fragment-caching</link>
		<comments>http://ariekanarie.nl/archives/46/using-memcached-to-speed-up-fragment-caching#comments</comments>
		<pubDate>Wed, 02 Apr 2008 17:56:04 +0000</pubDate>
		<dc:creator>Arie</dc:creator>
				<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[memcache]]></category>
		<category><![CDATA[memcached]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://ariekanarie.nl/?p=148</guid>
		<description><![CDATA[Like any web 2.0 site, leefjedoel.nl is currently in beta. During this phase we&#8217;re trying to find bottlenecks, fix the last few bugs and optimize heavy parts of the site. During development we already prepared caching for all pages, mostly fragment caching. To expire cache that&#8217;s no longer current, we use sweepers that get called [...]]]></description>
			<content:encoded><![CDATA[<p>Like any web 2.0 site, <a title="leefjedoel.nl" href="http://leefjedoel.nl" target="_blank">leefjedoel.nl</a> is currently in beta. During this phase we&#8217;re trying to find bottlenecks, fix the last few bugs and optimize heavy parts of the site.</p>
<p>During development we already prepared caching for all pages, mostly fragment caching. To expire cache that&#8217;s no longer current, we use sweepers that get called when something relevant is updated. These sweepers only sweep the caches that get outdated.</p>
<p>Because we were unfamiliar with caching and needed to see the result of our fragment caching, we used the file_store to store the generated caches. These files are stored on disk and this way you can easily see how many cache gets generated and what they contain.</p>
<p><strong>Regex and file_store == FAIL</strong></p>
<p>To sweep caches we used regular expressions, this way we could easily sweep all relevant caches at once. This was a bad idea, as you can read <a title="Caching makes your brain explode" href="http://blog.craigambrose.com/past/2007/11/13/caching_makes_your_brain_explode/" target="_blank">here</a> and <a title="Rails expire_fragment(regex) Considered Harmful" href="http://gurge.com/blog/2007/02/04/rails-expire_fragmentregex-considered-harmful/" target="_blank">here</a></p>
<p>During the beta phase the size of the site steadily increased, more users, more goals, more groups. There was a noticeable delay whenever you updated/created something. A short investigation pointed to the cache sweepers as the culprit.</p>
<p>The file_store for cache isn&#8217;t exactly the fastest solution to store your cache, but when you combine it with regex sweepers, things really slow down. Whenever you do a regex sweep, all files in the cache directory get returned (not that surprising if you think of it), and the regex is run against it. So even if you do a sweep on /goals, it will also return files in /users and /groups. As a result, updating your profile could take 15 seconds.</p>
<p><strong>MemCached</strong></p>
<p>We&#8217;d been planning on moving the cache to memcached all along, so this seemed a good opportunity to do it. In the next few paragraphs I&#8217;ll describe how to install memcached, get the correct Rails plugin to make memcached play nice with fragment caching and how to configure your Rails application so it uses your memcache server.</p>
<p><strong>Installation of MemCached on GNU/Linux</strong></p>
<p>First of all, you&#8217;ll need to memcache daemon, assuming you have a nice linux distro you can:</p>
<blockquote><p>sudo apt-get install memcached</p></blockquote>
<p>This will work on Debian, Ubuntu and other Debian-based distro&#8217;s, on Gentoo you can</p>
<blockquote><p>emerge memcached</p></blockquote>
<p>The great thing about memcached is its simplicity, it requires no configuration after installation, just run it.</p>
<p><strong>All about the gems baby</strong></p>
<p>Now we&#8217;ll get the gem to allow Ruby to talk to memcache. There are two gems that do this, Ruby-MemCache and memcache-client. memcache-client is supposed to be faster, so I used that.</p>
<blockquote><p>sudo gem install memcache-client</p></blockquote>
<p><strong>Plugin to play nice with rails</strong></p>
<p>Rails&#8217; fragment caching doesn&#8217;t work with memcached out of the box, you&#8217;ll need a plugin. This plugin also adds a nice bonus to the cache method in views.</p>
<blockquote><p>script/plugin install svn://rubyforge.org/var/svn/zventstools/projects/extended_fragment_cache</p></blockquote>
<div><strong>Environment setup</strong></div>
<p>Now we need to configure your Rails app to use the memcached server. You&#8217;ll need to edit your config/environments/production.rb</p>
<pre name="code" class="ruby">memcache_options = {
:c_threshold = 10_00,
:compression = true,
:debug = false,
:namespace = 'yourappname_or_anything_you_like',
:readonly = false,
:urlencode = false
}
CACHE = MemCache.new(memcache_options)
CACHE.servers = '127.0.0.1:11211'
config.action_controller.fragment_cache_store = CACHE, {}
</pre>
<p><strong>That&#8217;s all folks!</strong></p>
<p>That&#8217;s it, you&#8217;re all done, the &#8216;cache&#8217; method in your views will now use the memcache server.</p>
<p><strong>Oh wait, there&#8217;s an encore</strong></p>
<p>But there&#8217;s more, using memcached you can set expiry times for caches. I edited the plugin for a default expiry time of 1 day. In vendor/plugins/extended_fragment_cache/lib/extended_fragment_cache.rb look for def write(key,content,options=nil)</p>
<pre name="code" class="ruby">
def write(key,content,options=nil)
  expiry = options &amp;&amp; options[:expire] || 1.day
  begin
    set(key,content,expiry)
    rescue ActiveRecord::Base.logger.error("MemCache Error: #{$!}")
    rescue MemCache::MemCacheError = err
    ActiveRecord::Base.logger.error("MemCache Error: #{$!}")
  end
end
</pre>
<p>You can change the 1.day to anything you want. To override this default behaviour, you can use the following code in your views</p>
<pre name="code" class="ruby">
cache('goals/large_cloud', {:expire = 30.minutes.to_i})  do
</pre>
<p>This will make the cache called &#8216;goals/large_cloud&#8217; to expire 30 minutes after it got created.</p>
<p>There are two important things to consider when you move to memcached</p>
<blockquote><p>1. MemCached doesn&#8217;t support regex based expiry of caches. You need to manually enter every cache you want to expire. You can do this in some nice methods of course. Here&#8217;s ours for expiring the cache when a user gets updated.</p>
<pre name="code" class="ruby">
def expire_user_fragments(user)
  fragments = %w[author_icon author_link side_block_friends ..snip...]
  fragments.each do |f|
    expire_fragment("user/#{user.id}/#{f}")
  end
end</pre>
<p>2. Your application will fail when the MemCache server becomes unavailable. If you ever restart MemCache, or if it crashes (haven&#8217;t seen that happen yet), you need to restart your mongrel-cluster/thin/ebb.</p>
<p>3. When you restart MemCache, all cache is cleared, and you need to restart your mongrel-cluster/thin/ebb.</p></blockquote>
<p>This guide only talks about fragment caching, over at <a href="http://www.bencurtis.com/archives/2007/12/painless-rails-action-caching-with-memcached/#more-111">Ben Curtis&#8217; blog</a>, you can read all about action caching.</p>
]]></content:encoded>
			<wfw:commentRss>http://ariekanarie.nl/archives/46/using-memcached-to-speed-up-fragment-caching/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>BitTorrent webinterfaces compared</title>
		<link>http://ariekanarie.nl/archives/42/bittorrent-webinterfaces-compared</link>
		<comments>http://ariekanarie.nl/archives/42/bittorrent-webinterfaces-compared#comments</comments>
		<pubDate>Sat, 19 Jan 2008 16:28:01 +0000</pubDate>
		<dc:creator>Arie</dc:creator>
				<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[ariekanarie.nl]]></category>
		<category><![CDATA[azureus]]></category>
		<category><![CDATA[bittorrent]]></category>
		<category><![CDATA[clutch]]></category>
		<category><![CDATA[comparison]]></category>
		<category><![CDATA[interface]]></category>
		<category><![CDATA[torrentflux]]></category>
		<category><![CDATA[transmission]]></category>
		<category><![CDATA[utorrent]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://ariekanarie.nl/archives/134/bittorrent-webinterfaces-compared</guid>
		<description><![CDATA[I&#8217;ve been running torrents on my server for quite a while now. I used to run Azureus on my desktop, but because it&#8217;s Java-based, it was quite heavy on memory. To run torrents on my server I used Torrentflux. It&#8217;s a PHP-webinterface to BitTornado and it has a nice community and forum where they regularly [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been running torrents on my server for quite a while now. I used to run <a href="http://azureus.sourceforge.net/" title="Azureus" target="_blank">Azureus</a> on my desktop, but because it&#8217;s Java-based, it was quite heavy on memory.</p>
<p>To run torrents on my server I used <a href="http://www.torrentflux.com/" title="Torrentflux" target="_blank">Torrentflux.</a> It&#8217;s a PHP-webinterface to <a href="http://www.bittornado.com/" title="BitTornado" target="_blank">BitTornado</a> and it has a nice community and forum where they regularly post hacks to add new features.  After a while I found out there was a different version (fork) of Torrentflux with more features and I switched.</p>
<p><strong>TF-B4rt</strong></p>
<p><a href="http://ariekanarie.nl/wordpress/wp-content/uploads/2008/01/index.png" title="TF-B4rt" rel="lightbox"><img src="http://ariekanarie.nl/wordpress/wp-content/uploads/2008/01/index.thumbnail.png" alt="TF-B4rt" align="right" /></a>This fork of Torrentflux is called <a href="http://tf-b4rt.berlios.de/" title="TF-B4rt" target="_blank">Torrentflux-b4rt</a>. It adds a bunch of new features, including some improvements to the interface and support for multiple bittorrent clients. TF-b4rt supports BitTornado, Mainline, Transmission and Azureus.<br />
Azureus support is provided through a piece of middleman software called Fluazu, which talks in XML to Azureus. This  (and being written in Python) causes Fluazu to use quite a bit of CPU cycles. About 10-30% on my 2.13Ghz Core2Duo server. It&#8217;s also a rather delicate system, if you manually delete a torrent through the Azureus-GUI/console, or disk, the webinterface starts to bug. It will show torrents running that aren&#8217;t, and you can&#8217;t delete them because it&#8217;s convinced they&#8217;re still active. But even if I didn&#8217;t do something like that, Fluazu got confused with my torrents.</p>
<p>The main reason I wanted to use Azureus (and thus, Fluazu), is the support for global download/upload rate-limits. However, the extra CPU usage for Fluazu was bothering me and I looked for alternatives.</p>
<p><strong>Azureus Web Interface</strong></p>
<p><a href="http://ariekanarie.nl/wordpress/wp-content/uploads/2008/01/remote9e_original.jpg" title="Azureus Swing WebUI" rel="lightbox"><img src="http://ariekanarie.nl/wordpress/wp-content/uploads/2008/01/remote9e_original.thumbnail.jpg" alt="Azureus Swing WebUI" align="right" /></a>Azureus has it&#8217;s own web interface. Two actually. The HTML Web-UI, and the Swing Web-UI. I tried the Swing Web-UI and it works rather well. You upload torrents, Azureus downloads them. Because it talks directly to Azureus it&#8217;s more reliable than Torrentflux-Fluazu.</p>
<p>Installing the Swing Web-UI breaks support for TF-B4rt/Fluazu.</p>
<p><strong>Clutch</strong></p>
<p><a href="http://ariekanarie.nl/wordpress/wp-content/uploads/2008/01/webgenerallarge.png" title="Clutch" rel="lightbox"><img src="http://ariekanarie.nl/wordpress/wp-content/uploads/2008/01/webgenerallarge.thumbnail.png" alt="Clutch" align="right" /></a>Another webinterface is called <a href="http://clutchbt.com/" title="Clutch">Clutch</a>. It&#8217;s a webinterface that talks to the <a href="http://www.transmissionbt.com/" title="Transmission" target="_blank">Tranmisson</a> daemon. Transmission is a  fast light-weight torrent client. Using the daemon version, you can have multiple uploads with a global upload/download limit.</p>
<p>After loading about 20 torrents in Transmission, I was using about 1% memory, while Azureus used 9.5%. CPU usage for Azureus was 2-4%, while Transmission rarely got above 1%.</p>
<p>Torrentflux-b4rt provides the most functuonality. It has some features you can&#8217;t find in the other two. For example you can enter RSS-feeds for torrents that get downloaded automatically and you can upload multiple files at a time. Also you can stop/start/delete all torrents and data at once. It also supports multiple users, multiple torrent-clients and has more extensive statistics. Because of all these extra feature, Torrentflux is also used in hosted solutions.</p>
<p>Unfortunately it doesn&#8217;t support global upload/download limits on its own. It needs the Fluazu/Azureus combination for this. And using this combination is rather CPU intensive. So all in all, Torrentflux-b4rt is a great solution if you don&#8217;t need the global upload/download limits.</p>
<p>The Azureus Web Interface is very nice if you&#8217;re a single user. The Azureus bittorrent client has a lot of features so having a web interface to this powerful client is great. It&#8217;s quite a bit more resource intensive compared to BitTornado or Transmission, but it does feature advanced features like the distributed tracker, which allows you to download torrents of which the original tracker is down.</p>
<p>Transmission+Clutch has a very clean interface and turned out to be the best choice for me. It doesn&#8217;t have all the advanced features of Torrentflux, but it does the basics just right. It requires few resources, allows you to set global upload/download rates and it has a feature to start/stop all torrents at once.</p>
]]></content:encoded>
			<wfw:commentRss>http://ariekanarie.nl/archives/42/bittorrent-webinterfaces-compared/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nvidia GPU temperature screenlet</title>
		<link>http://ariekanarie.nl/archives/36/nvidia-gpu-temperature-screenlet</link>
		<comments>http://ariekanarie.nl/archives/36/nvidia-gpu-temperature-screenlet#comments</comments>
		<pubDate>Thu, 06 Dec 2007 16:29:15 +0000</pubDate>
		<dc:creator>Arie</dc:creator>
				<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[gpu]]></category>
		<category><![CDATA[nvidia]]></category>
		<category><![CDATA[screenlet]]></category>
		<category><![CDATA[temperature]]></category>

		<guid isPermaLink="false">http://ariekanarie.nl/archives/101/nvidia-gpu-temperature-screenlet</guid>
		<description><![CDATA[Today I rediscovered screenlets for Ubuntu. If you don&#8217;t know what screenlets are, click on the thumbnail on the right. On my old laptop I tried using them before, but the poor thing couldn&#8217;t handle it. Now with my new laptop I decided to give it another go. Using compiz-fusion you can put these screenlets [...]]]></description>
			<content:encoded><![CDATA[<p><a title="All screenlets" href="http://ariekanarie.nl/wordpress/wp-content/uploads/2007/12/screenlets.png" rel="lightbox"><img src="http://ariekanarie.nl/wordpress/wp-content/uploads/2007/12/screenlets.thumbnail.png" alt="All screenlets" align="right" /></a>Today I rediscovered screenlets for Ubuntu.  If you don&#8217;t know what screenlets are, click on the thumbnail on the right.</p>
<p>On my old laptop I tried using them before, but the poor thing couldn&#8217;t handle it.</p>
<p>Now with my new laptop I decided to give it another go.</p>
<p>Using compiz-fusion you can put these screenlets on a special &#8216;widget layer&#8217;, which you can summon by pressing a keyboard key. <img src="http://ariekanarie.nl/wordpress/wp-content/uploads/2007/12/temperature-screenlets.png" alt="Temperature screenlets" hspace="5" vspace="5" align="right" />Whenever you need some information or need to make a small note, you press that keyboard key and the widget layer is displayed. Pressing the same key again and the widgets disappear.</p>
<p>There&#8217;s a nice screenlet that displays some sensor information, CPU and HDD temperatures. However, my laptop has another sensor on the graphics card that shows the GPU temperature. I just had to have this added to the screenlet.</p>
<p><span style="text-decoration: line-through;"><a title="Modified temperatures script" href="http://ariekanarie.nl/wordpress/wp-content/uploads/2007/12/temperature2screenlet.py">I made a modified version of the Temperature2 script</a></span> to generate a screenlet for nvidia GPU temperature. You&#8217;ll need the proprietary nvidia drivers installed and access to the &#8216;nvidia-settings&#8217; utility. Download the file and place it in the ~/.screenlets/Temperature2/ directory, overwriting the old file.</p>
<p><strong>Update: My modifications are now included into version 0.4 of Temperature2. You can get it at <a href="http://screenlets.org/index.php/Temperature2" target="_blank">screenlets.org</a></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://ariekanarie.nl/archives/36/nvidia-gpu-temperature-screenlet/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Custom Ubuntu live CD</title>
		<link>http://ariekanarie.nl/archives/31/custom-ubuntu-live-cd</link>
		<comments>http://ariekanarie.nl/archives/31/custom-ubuntu-live-cd#comments</comments>
		<pubDate>Tue, 02 Oct 2007 21:47:11 +0000</pubDate>
		<dc:creator>Arie</dc:creator>
				<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[rails ubuntu live cd workshop school bootable developme]]></category>

		<guid isPermaLink="false">http://ariekanarie.nl/wordpress/archives/87</guid>
		<description><![CDATA[In a couple of days/weeks/months two friends and I will be giving a workshop at our school about Ruby On Rails. For this workshop we were looking for a bootable CD that provides a fully functioning Ruby on Rails dev environment. We looked at RailsLiveCD.org but it wasn&#8217;t exactly the way we wanted. And whenever [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://ariekanarie.nl/wordpress/wp-content/uploads/2007/10/ubuntu-logo.jpg" title="Ubuntu logo" rel="lightbox"><img src="http://ariekanarie.nl/wordpress/wp-content/uploads/2007/10/ubuntu-logo.thumbnail.jpg" alt="Ubuntu logo" align="left" /></a>In a couple of days/weeks/months two friends and I will be giving a workshop at <a href="http://www.hogeschool-rotterdam.nl/" title="HRO" target="_blank">our school</a> about <a href="http://www.rubyonrails/" title="RoR" target="_blank">Ruby On Rails</a>. For this workshop we were looking for a bootable CD that provides a fully functioning Ruby on Rails dev environment.</p>
<p>We looked at <a href="http://www.railslivecd.org/" title="Rails Live CD" target="_blank">RailsLiveCD.org</a> but it wasn&#8217;t exactly the way we wanted. And whenever something isn&#8217;t exactly as you want in the world of <a href="http://en.wikipedia.org/wiki/Open_source_software" target="_blank">OSS</a>, you can fix it.</p>
<p>It took <a href="http://www.atworkonline.it/%7Ebibe/ubuntu/custom-livecd.htm" target="_blank">a great tutorial</a>, some trial/error and a couple of failed CD&#8217;s, but finally I managed to get it just the way I wanted.</p>
<p><a href="http://ariekanarie.nl/wordpress/wp-content/uploads/2007/10/rails.png" title="Ruby on Rails logo" rel="lightbox"><img src="http://ariekanarie.nl/wordpress/wp-content/uploads/2007/10/rails.thumbnail.png" alt="Ruby on Rails logo" align="right" /></a>The failed CD&#8217;s were due to the fact that &#8216;qemu&#8217;, <em>an emulation program that you can use to test bootable .iso files</em>, ran very slowly on my laptop.</p>
<p>The live CD is based on <a href="http://www.ubuntu.com/" title="Ubuntu" target="_blank">Ubuntu Feisty</a>. It includes <a href="http://www.mysql.org/" target="_blank">MySQL</a>, vim-ruby, <a href="http://www.aptana.com/" target="_blank">Aptana</a>, ruby, rails and the sample project we&#8217;ll be using at the workshop.</p>
<p>No other live cd would have our own project on the disk <img src='http://ariekanarie.nl/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I&#8217;ll post the ISO once we&#8217;ve given the workshop.</p>
<p><strong>Update</strong></p>
<p>You can now <a href="http://ariekanarie.nl/ubuntu-rails.iso" title="Ubuntu on Rails iso" target="_blank">download</a> the <a href="http://ariekanarie.nl/ubuntu-rails.iso" title="Ubuntu on Rails iso" target="_blank">Ubuntu on Rails</a> iso.</p>
]]></content:encoded>
			<wfw:commentRss>http://ariekanarie.nl/archives/31/custom-ubuntu-live-cd/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Migrating to Cacti</title>
		<link>http://ariekanarie.nl/archives/28/migrating-to-cacti</link>
		<comments>http://ariekanarie.nl/archives/28/migrating-to-cacti#comments</comments>
		<pubDate>Tue, 28 Aug 2007 11:49:30 +0000</pubDate>
		<dc:creator>Arie</dc:creator>
				<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[ariekanarie.nl]]></category>
		<category><![CDATA[cacti]]></category>
		<category><![CDATA[migrate]]></category>
		<category><![CDATA[mrtg]]></category>
		<category><![CDATA[rrdtool]]></category>

		<guid isPermaLink="false">http://ariekanarie.nl/wordpress/archives/78</guid>
		<description><![CDATA[My previous post about getting the temperatures of disks connected to an Areca raid array already noted that MRTG can only handle two datasources in a single graph. With 5 disks in a system, this would force me to create 3 graphs, or 1 graph with the temperatures of the 4 disks connected to the [...]]]></description>
			<content:encoded><![CDATA[<p>My <a href="http://ariekanarie.nl/wordpress/archives/75" target="_blank">previous post</a> about getting the temperatures of disks connected to an Areca raid array already noted that MRTG can only handle two datasources in a single graph.</p>
<p>With 5 disks in a system, this would force me to create 3 graphs, or 1 graph with the temperatures of the 4 disks connected to the RAID array averaged into a single line.</p>
<p>I&#8217;ve always wanted to move from MRTG to RRDtool, because RRDtool can handle multiple datasources per graph, and has more options.</p>
<p>However, I found RRDtool very hard to configure compared to MRTG. So I went looking for an alternative.</p>
<p><a href="http://www.cacti.net" target="_blank">Cacti</a> is a front-end for RRDtool, which makes it easier to create nice graphs. If you just want to graph routers, it&#8217;s even easier to configure than MRTG. But if you like to have custom stats, like the Areca HDD temperatures, it takes a little more work.<br />
Cacti has some nice guides on how to create graphs and new input methods on their site, but even with those it took me quite some time to create my first graph.</p>
<p>By now I&#8217;ve migrated all my graphs from <a href="http://mrtg.ariekanarie.nl" target="_blank">my personal MRTG page</a> to <a href="http://cacti.ariekanarie.nl/graph_view.php" target="_blank">Cacti</a></p>
<p><a href="http://ariekanarie.nl/cacti/graph.php?action=view&amp;local_graph_id=10&amp;rra_id=all" target="_blank" title="HDD temperatures"><img src="http://ariekanarie.nl/wordpress/wp-content/uploads/2007/08/graph_imagephp.png" alt="HDD temperatures" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://ariekanarie.nl/archives/28/migrating-to-cacti/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>aTi powersettings in Ubuntu</title>
		<link>http://ariekanarie.nl/archives/24/ati-powersettings-on-ubuntu</link>
		<comments>http://ariekanarie.nl/archives/24/ati-powersettings-on-ubuntu#comments</comments>
		<pubDate>Tue, 26 Jun 2007 08:44:42 +0000</pubDate>
		<dc:creator>Arie</dc:creator>
				<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[ati]]></category>
		<category><![CDATA[aticonfig]]></category>
		<category><![CDATA[power]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://ariekanarie.nl/wordpress/archives/64</guid>
		<description><![CDATA[My Ubuntu laptop was running quite hot because of the built-in Mobility Radeon 9700. After a while I found out about a little utility called &#8216;aticonfig&#8217; that you can use to change the powerstate of your videocard. Using this utility I was able to clock down the videocard and enjoy a cooler laptop. Recently I [...]]]></description>
			<content:encoded><![CDATA[<p>My Ubuntu laptop was running quite hot because of the built-in Mobility Radeon 9700. After a while I found out about a little utility called &#8216;aticonfig&#8217; that you can use to change the powerstate of your videocard.<br />
Using this utility I was able to clock down the videocard and enjoy a cooler laptop.</p>
<p>Recently I re-enabled all desktop eyecandy by using the &#8216;<a href="http://www.opencompositing.org/" target="_blank">compiz-fusion</a>&#8216; project. I use <a href="http://www.opencompositing.org/" target="_blank">compiz-fusion</a> in combination with the closed source aTi fglrx driver. However, my laptop began running hot again. At first I thought this was because of all the 3D eyecandy that uses your videocard.</p>
<p>After a while I decided to check the powerstate of my videocard using the &#8216;aticonfig &#8211;lsp&#8217; command and got the following error:</p>
<blockquote><p> Error: Unable to obtain POWERplay information.</p></blockquote>
<p>After some investigation I found out that the &#8216;aticonfig&#8217; utility cannot be run from X display :1. Thanks to aTi&#8217;s craptastic linux drivers you&#8217;re forced to run 3D-eyecandy desktops on display :1 instead of display :0. So the solution was simple, kind of. I wrote the following snippet that can be run from display :1</p>
<blockquote><p>DISPLAY=:0</p>
<p>aticonfig &#8211;set-powerstate=1</p>
<p>DISPLAY=:1</p></blockquote>
<p>Put this in a small script and make it execute everytime you start your X session ( System, Prefences, Sessions). Hopefully aTi manages to catch up with Nvidia&#8217;s linux driver support and keep <a href="http://digg.com/linux_unix/Better_ATI_Linux_driver_to_come" target="_blank">their promise about better drivers</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://ariekanarie.nl/archives/24/ati-powersettings-on-ubuntu/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
