Asus EeePC 1000HE – 3.5 Years of Service

In spring 2008 I bought my cute little netbook. I paid about 600 Swiss Francs for it. It was delivered with MS Windows XP on a 120GB harddisk and 1GB RAM. From then on I carried 1.5kg instead of the 3.5kg of my HP Laptop. I use it for all my work except visual design. Even Eclipse is running stable and fast on it. After 2.5 years of service, the harddisk began to clicker. I exchanged it with a 600GB one. But that one was too slow, and I exchanged it with an 60GB SSD. In the same occasion I upgraded my RAM to 2GB.

After all I can say that the Asus netbook was my best investment ever! It fell to the ground x times. People walked over it. Sharp things scratched its surface, but it’s still running perfectly with a battery lifetime of approximately 5 hours.

A big compliment to Asus for the Asus EeePC 1000HE!

Grub2 can’t load stage2

A week ago, my file server didn’t start anymore. After attaching screen and keyboard, the following message appread:

error: file not found.
grub rescue>

After trying to reinstall grub by booting from a live cd, the problem still existed. It wouldn’t boot.
Since everybody fixes his grub by reinstalling and reconfiguring it, I missed an obvious point in a normal analysis scheme: back to the roots.

The problem was, that somehow Debian switched the SATA mode in BIOS to AHCI after an update. For that reason grub2 could load stage1 from MBR, but not stage2 from the harddisk. Setting it back to SATA made it work like a charm.

Company of Heroes – NAT Negotiation Error

Company of Heroes is a brilliant game – very strategic, realistic and affectionately developed. But since the version 2 (Opposing Fronts) came out, there were many complains about one error message appearing if you wanted to connect to a multiplayer game.

"NAT Negotiation Error"
or in german:
"NAT Verhandlung gescheitert"

I don’t know what exactly went wrong, but I had this problem too. My colleagues didn’t (they had newer routers).
I lived with the fact that I wasn’t able to play the game for years. But shortly I found the problem: Heureka! It is the Relic Downloader, running in the background and checking for updates. I minimized the game, killed the Relic Downloader Task and could play Company of Heroes :D

There’s just one downside: My friends aren’t on CoH anymore :-(

Consequence: Relic seems to be incapable of developing runnable games, since so many complaining voices disappeared unheard. They could have fixed the bug if they wanted. I am sure about that!

Xampp Apache Doesn’t Start

On a xampp installation on windows, you can start the apache web server per control panel. If it stops after a short period indicating the status “starting…” you may have the same problem I had:

Port 80 is occupied by another service.

In my case it was Skype which per default binds to port 80. To work around that problem, you’ll have to start apache before Skype. Skype then will bind to port 443 which is enough out of the way for most appliances.

If you’re not running Skype, port 80 might be occupied by IIS or another webserver.

PHP Constructor Curiosity

With the development of my own MVC framework I stumbled over a weird PHP problem which only really matters for just-PHP-programmers. Since in PHP 5.3.0 a constructor can be declared as a method named after the class.

<?php
class Index {
  public function __construct() { echo "before 5.3.0"; }
  public function index() { echo "5.3.0 or later"; }
  // case of function name doesn't matter!
}

$blub = new Index();

Inside namespaces this “feature” was removed with PHP version 5.3.3. Outside of namespaces it still exists.

Personally I am not happy about this change, since it is not consistent with PHP destructor functions.

Cant Mount Samba Share More Than Once

On my samba server I had the problem, that just one user at the time could access the share. I had security=user activated. The log file under /var/log/samba/log.smbd said at the last line:

smbd_open_once_socket: open_socket_in: Address already in use
(Die Adresse wird bereits verwendet)

I googled it and stumbled over a very different topic describing other problems. There it was mentioned as a solution to add a user per smbpasswd. Then I realized, that I didn’t have my system user in that database.

The problem is, if the samba config requires a user to exists on the linux server, samba can log in the user only once. I think that’s because the samba runs on that user. The samba user database must have sort of a mapper interface, which maps multiple samba users to just one system user.

The console command smbpasswd -a username resolved my issue and now I can connect from multiple computers to the share.

Mounting Failure Because of 32bit Limit

Recently I set up a Debian Squeeze on a 20TB RAID5 fileserver. When I tried to set up the xfs file system with partman, the following message appeared:

Der Versuch, ein Dateisystem vom Typ xfs auf /dev/sda als /srv einzubinden, ist fehlgeschlagen.

or in english:

The attempt to mount a file system with type xfs in /dev/sda at /srv failed.

I didn’t find the solution to this on google, I didn’t even find a similar problem. I could format the filesystem, but not mount it.
Later I thought about the underlaying hardware architecture, a 32bit dualcore server board. After having a look at the output of the df-command, it was clear. The volume had a sector count of 2147483647+ and was of type ee. What now? A complex decision: Split up the RAID, buy a 64bit board or use a file system like btrfs. I tried btrfs, but it’s performance was pretty bad because of my 2GB RAM. And because I’d like to run this server now, I abandoned to buy a new board and splitted up the RAID.

Unity sucks on Asus Eee PC 1000HE

I always used Ubuntu with Gnome 2 on my Asus EeePC 1000HE netbook. Today this seems a bit antiquated. Since Unity has nicer windows and the Apple style window frames which are integrated into the task bar. I thought to give it a try with the update from Ubuntu 10.04 (Lucid Lynx) to Ubuntu 11.04 (Natty Narwhal).

I installed the Ubuntu Desktop Edition on my netbook – the Netbook Edition is now obsolete, because it is merged into the standard version. Looking at the result, I was disappointed by the long initialization time and the laggy handling of Unity. After very frustrating hours looking for a solution and even thinking about changing the linux distribution, I found an Ubuntu developers blog entry about a new package called “unity-2d”. The comments on the blog post promised epic performance and good user experience on slow systems.

I wanted to try it and therefore typed into my console:

sudo apt-get install unity-2d

It said, that the package was not found. Later I realized, that my package list was just virginal after the fresh installation. The following did it:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install unity-2d

Now I’m fueled with fresh 2D power and the system feels really fast :-)

Console on Unity 2D

Unity 2D with hover on side- and taskbar

RAID0 Performance Test

Recently I had to compose a file server for high load LAN read access. My first thought was to implement a RAID 0 over 4 harddisks. I took a dual core 2.5GHz CPU and 2GB of RAM. I attached four 500GB SATA drives to the mainboard and then I installed Debian 6 Squeeze on a small part of the first hd. The rest of it and the other drives were dedicated to the RAID 0.

After the installation and the configuration of the system, I measured the read/write performance of the RAID. I did it with the time dd combination:

time dd if=/dev/zero of=file bs=1k count=20000000
and
time dd if=file of=/dev/null

RAID 0 - Performance Test 1

As you see, write actions perform better than read actions. Why is that and how can we invert this effect? I think it’s because the RAID software hasn’t to check where to write data, but it must search for it on read access.

A complete test with Bonnie++ delivers slightly different results:

    • Sequential Write: 290Mb/s
      Sequential Read: 308Mb/s
      Random Seeks: 651/s (That’s twice the seek rate of my two RAID5 servers.)
  • Does anybody know why the test results of Bonnie++ and dd are so different?

    Java – Integer Lookup Table

    Have you already once asked yourself, what’s the difference between equals(..) and the == operator? It’s simple to explain it, but side-effects of this purpose can be enormous.

    The Explanation:
    x.equals(y) checks, if the values of instance x are equal to the values of instance y. You can override equals() and define by yourself, which properties should be compared.
    The == operator checks if two instances are the same. That means, they are stored at the same address in memory.

    My Side-Effect Experience:
    I tried to compare two int variables with ==. That worked well for small numbers, but wasn’t correct for large ones. I tried to debug it and found out, that the magical barrier lied at 127 for which the == comparison worked. I asked my prof and he said that Java had an internal lookup table for integers to speed up operations. That means, the Java Virtual Machine instantiates every instance of the integers between 0 and 127 at startup. Later Java just uses pointers to reference to these numbers. Values greater than 127 are really instantiated and therefore the == comparison doesn’t work as expected on them.