Author Archive

HOWTO Install Sun’s JAVA on Ubuntu Lucid Lynx (10.04)

April 23, 2010 17 comments

After Ubuntu’s decision to default to OpenJDK for 10.04 (which is a good decision, IMHO), Sun’s (but is it still Sun, or Oracle?) JAVA somewhat “disappeared” from Ubuntu (multiverse).

That being said, some people may still need features only available in Sun’s JRE/JDK, which might not yet have been Freed.

Actually, Ubuntu is still shipping it, but in its “partner” section. To add that section to your Sources and install Sun’s JDK (as an example), just:

sudo add-apt-repository "deb lucid partner"
sudo apt-get update
sudo apt-get install sun-java6-jdk

You might need to accept the license (press “tab”, “enter”, “tab” on “Yes” then “enter”).

You might also just want to install sun-java6-jre or sun-java6-plugin if you just want the (Mozilla) web browser plugin.

As a side note, remember to remove OpenJDK if you do not need it, or be prepared to encounter hard to diagnose problems sometime.

sudo apt-get remove openjdk-6-jdk openjdk-6-jre openjdk-6-jre-headless openjdk-6-jre-lib

Ubuntu 11.10: same operation. Just replace “lucid” por “oneiric”

Categories: English, GNU/Linux, ubuntu Tags: , ,

Using Intel ATOM as OpenSolaris NAS engine

April 4, 2010 1 comment

I  recently started searching for a power- and price-efficient engine for modest-sized NAS, running OpenSolaris (Nexenta) of course.

The idea to go to Intel ATOM first comes from their high power efficiency (1-13W TDP). To really benefit from it, do not only take into account the power used by the CPU, but also the whole motherboard (you know, chipset and GPU [Graphic Processing Unit]).

ATOM is supposed to dissipate so little heat that a fan might not be necessary, so most motherboards for ATOM ship with passive/fanless cooling. I still wonder if it should not rely on some cooling offered from the case itself, especially when mechanical disks are part of the equation.

To fully benefit from OpenSolaris, and ZFS, a 64-bits CPU is recommended, and multiple cores would benefit a ZFS NAS without any doubt. So we are left with two families, or rather generations, (this is a shortcut, but it makes sense given the tiny pricing difference), the ATOM 330 and the ATOM D510 (have a look at At first glance, they are quite similar, except the D510 embeds a GPU on-die, which means its 13W TDP is about all it gets, while a 330 motherboard as a whole (including an added GPU) will significantly draw more power than the 8W advertised. And honestly, we don’t care about the performances of this GPU.

Then, most motherboards are somewhat limited in size, which means many extensions are just not available here:

  • RAM slot number (many times they are even SO-DIMM ones) and speeds, and lack of ECC support
  • PCI(e) slot number
  • SATA/PATA connectors
  • NIC numbers

Note that despite the restricted on-board size, most motherboards present a lot of different external connectors (USB, DVI, D-SUB, PS/2, IEEE 1394, …).

And finally, most motherboards only ship in mini-ITX form-factor, which is not even really compatible with (micro)ATX, though some claim it (is this real, I honestly can’t tell). This clearly makes it difficult to find an inexpensive, yet solid, case to host it.

Compare all that to regular AMD or Intel CPU and motherboards pricings, and you will see what I mean in this article.

So Intel’s ATOM is (not yet) wonderland for OpenSolaris-based NAS today. But I will probably try some day anyway. ;-)

Installing Squid on ZFS

March 24, 2010 1 comment

The recommended filesystem for Squid on OpenSolaris is ZFS:

It is also recommended to disable the atime property on the filesystem holding the cache, and you may want to avoid using any type of RAID.

To achieve this on Nexenta (or OpenSolaris, whatever), first create the ZFS filesystem:

# zfs create -o atime=off -o mountpoint=/var/spool/squid3 syspool/squidcache

Then install Squid (here for version 3.x, as you might have noticed from the command). On Nexenta Core Platform 3 (NCP3):

# apt-get install squid3

To further improve the setup, use the aufs storage. To do this, just enable and update option cache_dir in /etc/squid3/squid.conf to read aufs instead of ufs (and further modify that line to best suit your real cache usage).

Reasons to (not) setup swap on GNU/Linux

February 5, 2010 Leave a comment

Disclaimer: this article does not pretend to be a complete picture of using swap on UNIX.

Most of the time, recent GNU/Linux distributions insist on creating a swap area.

Swap is generally used to temporarily store memory used by running(/sleeping) applications, but might as well be used to store a copy of RAM to disk for hibernation. As disks are still many times slower than RAM, it always comes with huge performances impact.

Historically, RAM was so expensive that UNIX users bought only a fraction of actually used memory, and relied on swap for 2/3 of it (number still found in many advices today, while it is certainly outdated).

Today, you can buy quite a huge amount of RAM (even ECC) for almost nothing, it is not uncommon to be able to buy more than 4GB for less than 100€. So today, you buy RAM based on the total memory used by all the applications that might ever run at the same time. Of course, you probably don’t need then to allocate three times that amount to swap, especially when you know applications won’t use it.

The main danger of allocating much swap is that some application goes mad, eats up all memory, then swap and starts slowing down the whole machine (because it brings I/O in the dance), then (and only then) eventually get killed by the Linux OOM Killer, which is rather basic (just kills the running application taking currently the more memory, so might even miss the real guilty). Without swap (or reasonable amount), in contrast, the kill would happen far earlier, and not generate incredible I/O usage levels.

Of course, I/O impact is even worst in virtualized environments.

HOWTO Enable temporary swap file on GNU/Linux

February 5, 2010 1 comment

GNU/Linux supports swapping to a file on any filesystem, with reasonable performance impact since kernel 2.4. This might be useful whenever needing a temporary increase in available memory, I’m writing this article with that goal in mind.

Create a zero-filled regular file (following example would create a 1024x1M=1G swap size):

dd if=/dev/zero of=/.swapfile bs=1024 count=1M

Setup a swap area in it:

mkswap /.swapfile

Activate swap to this file (would not survive a reboot):

swapon /.swapfile

To check it did it:

swapon -s

Disable swap to this file:

swapoff /.swapfile

Of course, the file is not deleted on reboot, and you might reuse it several times.

Fixes for Gallery 2 French translation in module ‘core’

August 29, 2009 Leave a comment

After years using G2, I finally fixed the fr.po for core module and submitted it to latest registered French translator of Gallery2 several weeks again. After review, he encoded the following tracker on for everybody to benefit from it, even if no G2 update is ever published again:

As G2 is using gettext, updating it it fairly easy.



May 31, 2009 Leave a comment

VirtualBox ( un logiciel libre basé sur Qemu ([1] et édité par la société Innotek (rachetée récemment par Sun), est un excellent outil pour virtualiser des stations de travail sur une station de travail[2].
Non content d’être très fluide, il tourne sous Windows, GNU/Linux et (Open)Solaris[3].

Il en existe une version libre (VirtualBox Open Source Edition aka OSE) et une autre, propriétaire, offrant plus de fonctionnalités (surtout au niveau du hardware émulé).

La version OSE est disponible dans toutes les bonnes distributions GNU/Linux, tandis que la version de Sun n’est disponible que depuis leur site. Ils fournissent même des sources APT[4] pour qu’il soit facile de l’installer sur une Debian ou dérivée.

Attention cependant, la version OSE utilise aussi des fichiers de configuration des machines virtuelles dans une version nettement plus ancienne que celle du VirtualBox propriétaire. VirtualBox proposera au démarrage d’upgrader le format s’il y a lieu.

Read more…

%d bloggers like this: