Today there was a leap second at 23:59:60 UTC. On one of my systems, this caused a high CPU load starting from around 02h00 GMT+2 (which corresponds with the time of the leap second). ksoftirqd and some java (glassfish) process where using lots of CPU time. This system was running Debian Squeeze with kernel 2.6.32-45. The problem is very easy to fix: just run
# date -s "`date`"
and everything will be fine again. I found this solution on the Linux Kernel Mailing List: http://marc.info/?l=linux-kernel&m=134113389621450&w=2. Apparently a similar problem can happen with Firefox, Thunderbird, Chrome/Chromium, Java, Mysql, Virtualbox and probably other processes.
I was a bit suprised that this problem only happened on this particular machine, because I have several other servers running similar kernel versions.
I just got a second monitor at home and wanted to configure the two monitors with my NVidia graphics card. You can set up TwinView in the Nvida Settings application, however I did not like that solution: the next time I restarted X, all the settings were lost and the second monitor powered off. Also GNOME did not seem to behave correctly when the monitors went on stand by and I unlocked the desktop. The desktop appeared to be shifted over the monitors. The latter might be a bug of gnome-settings-daemon 3.2 and not Nvidia’s however.
However since the NVidia proprietary driver version 330 beta series, it finally supports Randr 1.3 so that you can configure dual screen with the configuration tools provided with your desktop. This driver is currently available in Debian Experimental. To install it (make sure you have experimental in your apt sources.list first, of course), run this command:
# apt-get install -t experimental xserver-xorg-video-nvidia
I also pulled in gnome-settings-daemon and gnome-control-center version 3.4 which appeared in Debian Sid today:
# apt-get install -t unstable gnome-settings-daemon gnome-contol-center
Now reboot your system (to be sure the new Nvidia kernel and X drivers are loaded), and then go System Tools – Preferences – System Settings (gnome-control-center in a terminal window) – Display. Enable the wo monitors, set the optimal (highest) resolution and drag them in the right position, click Apply, and confirm everything is working fine. Now you have a nice multi-monitor setup without needing to mess with NVidia’s twin view and without having to create a script to get the right settings applied automatically when X is started.
Personally I absolutely do not like the gnome-shell in GNOME 3. I actually even hate it: it is slow, messy and cumbersome to use and I have the feeling that developers are not listening to criticism. Obvious and trivial design bugs which are well known, are totally ignored (bug 662738 is an example).
For that reason, I went looking for an alternative desktop. KDE is way too bloated for a netbook with 1 GB of RAM, while XFCE is not as polished as a traditional GNOME 2.32 desktop. The best alternative I could find out right now, was to just replace the GNOME Shell by a custom panel or dock implementation. In the end I chose cairo-dock: it is written in C, so it is probably not as memory hungry as AWN (which uses Python) and Docky (which uses Mono, which I also consider as a possible patent minefield). Cairo-dock is also actively maintained. I paired cairo-dock with the compiz window manager to get some nicely looking desktop.
Continue reading “Creating your own GNOME session based on cairo-dock and Compiz”
Today I was getting this error when installing a new kernel on a server running Debian:
/usr/sbin/grub-probe: error: Couldn't find PV pv2. Check your device.map.
The error can be reproduce by running the update-grub command.
The day before, a new RAID disk was added to this server, so I suspected this could be the cause. The file /boot/grub/device.map contained a reference to the first RAID disk as (hd0) but did not contain a reference to the new RAID disk. I ran
# ls -l /dev/disk/by-id/
to find out which SCSI ID referred to sdb (the new RAID disk), and then added the following line to device.map:
Now installing the new kernel works fine!
Two years ago I wrote an article presenting some Linux performance improvements. These performance improvements are still valid, but it is time to talk about some new improvements available. As I am using Debian now, I will focus on that distribution, but you should be able to easily implement these things on other distributions too. Some of these improvements are best suited for desktop systems, other for server systems and some are useful for both. Continue reading “Linux performance improvements”
Last week, I set up two dhcpd servers in a fail-over configuration. The goal is that when one DHCP server goes down, the other one takes over so that clients don’t lose their network connection. I read different tutorials on the web, such as this one of a fellow blogger and this documentation published by IBM.
Continue reading “DHCPd failover”
Since this afternoon, this server is now running Debian GNU/Linux Squeeze. Just like the previous system, this is a KVM virtual machine running on a HP Proliant DL185G5 host. The host server has always been running Debian. This was my last production system still running Mandriva. I might have forgotten to move over a few things or there might be some breakage somewhere, so let me know if you encounter a problem.
Quite some time ago I wrote a blog post explaining why I preferred Mandriva over other distributions. But I have now switched to Debian GNU/Linux, so it is time for an update. I will mostly compare with Mandriva because that is where I come from and what I know the best, although most points are rather universal.
So, these are some reasons why I prefer Debian GNU/Linux over other distributions:
- All officially released Debian GNU/Linux stable versions are supported for a long time. Where most other free distributions are supported for about 1,5 year, this is much longer for Debian stable. For example, security updates for Debian Etch were published up to about 3 years after its release.
- Debian is more stable than most other distributions. This is due to the large amount of testers and due to Debian’s unique development model: the “unstable” branch contains only software which is considered stable upstream (with a few generally accepted exceptions). When a package is in “unstable” for 10 days without new release critical bugs it gets moved to the “testing” distribution. The stable releases are a snapshot of the testing distribution after a freeze during which all release critical bugs are fixed. Releases of the stable distribution are not time driven: the stable distribution is only released when it is really ready.
- By using apt pinning it is possible to easily mix and match packages from different repositories so that you can run the latest version of specific applications. Apt pinning can be used to pick packages from the extensive backports repository or to install packages from the testing, unstable and even the experimental repositories without having to update your whole system to the same release (unlike Mandriva for example, and as far as I know the same is true for other distributions like Fedora). Instead, carefully defined dependencies will make sure that all packages which need to be updated together are pulled in, resulting in a working system.
- Due to Debian’s development model it is possible to run a pretty up to date system at any time without sacrificing stability by using the testing distribution. I am now running Debian Lenny testing different systems for more than a month, with software which is often more up to date than in Mandriva 2010.1, yet the system is much more stable in general than my systems which were running Mandriva 2010.1.
- Debian is fast. Debian Squeeze boots up very fast without hacks like Mandriva’s speedboot, readahead or preload. Also application start up is very fast. I am not really sure why this is the case, but my guess is that this is due to Debian’s simplicity: it does not install too much daemons and boot up scripts by default. Also Debian uses dash instead of bash for /bin/sh, which also results in faster boot times. Shutdown also feels faster than what I was used to in Mandriva.
- Debian is secure. Because stable versions are supported for about 3 years and because security updates get released very fast. Debian also plays a rather active role in fixing security problems. For example, Debian’s webkitgtk maintainer searched for all webkit security patches and ported them to the webkitgtk 1.2 branch. The fixes were included in Debian’s webkitgtk and then were also included upstream in webkitgtk 1.2.3.
- Debian is available for lots of platforms. You have an old PowerPC based laptop, a GuruPlug or OpenRD system with ARM processor or a SUN UltraSPARC server? Debian will run on all these systems.
- Debian values freedom. Debian allows me to use my GNOME system without PulseAudio without loosing my volume applet in the panel (like was the case in Mandriva). But of course, if you want PulseAudio it is available and you can install it. Debian is not exclusively tied to the Linux kernel: there exist versions with a FreeBSD or even HURD kernels. The choice is up to you. Debian uses the Exim MTA by default but if you do not like this, other MTA’s are available and are equally well maintained and integrated into the distribution. Debian does not include non-free software by default, so that you can safely use distribute and even modify the software in all possible situations without having to worry about the license. But if you want to use non-free software, it is available in the non-free repository.
- Debian is very “standard“. It does not replace standard components by its own implementations like especially Ubuntu is doing. That means that Debian does not use non-standard things like Upstart, notify-osd or indicator-applet by default or does not move the window decoration buttons to the left side. Of course if you do want to use these csutomizations, they are all available (Debian values freedom!), but by default Debian prefers to use the standard upstream software. This ensures the best compatibility with upstream now and in the future, because all these non-standard Ubuntu things might cause conflicts later on with new upstream design decisions.
- Debian is not owned by a commercial organization. The free distribution is not some kind of crippled version of a commercial product which has all features and software available. It ensures also that decisions are not taken based on commercial interests, but only in the interest of the community. If you do want commercial support, there are many companies supporting Debian all over the world.
Related to that: today is Debian’s 17th anniversary and Debian Appreciation Day. If you use Debian, let the Debian community know you appreciate their work http://thank.debian.net.
Yesterday I migrated two servers at work to a new machine. The old machines were pretty underpowered: a Pentium III 1 Ghz system (with 384 MB RAM if I remember correctly) and a Pentium 4 system. The new machine is a Dell Poweredge R410 with a Xeon E5504 processor, 12 GB RAM and a PERC H700 RAID controller (which is actually a LSI MegaSAS 9260) with 3 750 GB SATA disks in RAID 5. The hardware is pretty nice (although I am not happy at all with the way Dell treats its customers, so I will rather prefer other vendors in the future, but maybe more about that in a later post).
The old servers were running Debian Lenny, while the new server runs Debian Squeeze, which is frozen since yesterday. That was a nice coincidence. The new server actually hosts three virtual machines using the Linux KVM virtualization system. One of them hosts the website http://wise.vub.ac.be, a second VM hosts a file server, and a third VM is the gateway for a small internal network.
The migration went pretty well, except for the smaller problems which you can always expect with such things, for example a Java web application which had hard-coded host names which had changed. The update to PHP 5.3 caused some compatibility problems which I already fixed before the migration itself: Dokuwiki had to be updated to a recent version in order to not show any warnings. There was also a website based on Joomla 1.0, which is actually not supported anymore. As updating it to a recent version was not really an option, I found some posts on the web on how to fix the errors I was seeing and cooked up a simple patch.
The new server is using 140 Watts most of the time. Keeping in mind that in the future it will also replace a third old server, that will probably be a nice reduction of power consumption compared to the old situation.
What I expected to happen some time ago, is finally becoming reality: Debian is now my favourite distribution for desktop systems.
First I installed Debian on my new Samsung N210 netbook and I was very pleased with the result. Shortly after that, my father experienced a bug while trying to print in Firefox on Mandriva 2010.1. It would fail to print and there were errors related to ps2ps (if I remember correctly) in the Cups log, hinting at some bug in Ghostscript. Actually it was not the first time this bug hit us, I had seen the same problem some weeks ago.
As analysing and having this bug fixed would likely take a lot of time and I needed a rather quick solution, I though it was the right time to reinstall this system with Debian Squeeze (testing). Debian has many additional bug fixes in its GhostScript package so there was a fair chance that printing would be working better. So I did the same as with my netbook last week: I set up PXE booting to start the Debian installer (easier than digging up a CD-R, downloading an ISO and burning it), and then I installed Debian on the disk, leaving the old /home logical volume intact.
Continue reading “Debian on desktop systems”