First experiences with ext4

Executive summary: ext4 rocks, check the numbers at the end!

With 2.6.28 arriving over Xmas I took the opportunity to upgrade my home desktop and laptop to it (the laptop had been running a number of RC releases quite happily). Everything was happy so I thought I’d try migrating my /home partition to ext4, but before I started I decided to run a quick Bonnie++ comparison between XFS and the new stable ext4 from the console before the rsync. The (very) rough numbers were:

XFS ext4
Block write (MB/s) 54 51
Block rewrite (MB/s) 23 24
Block read (MB/s) 51 50
Sequential creates (/s) 4470 17801
Runtime (minutes) 23 22

I didn’t note down the rest. So not a lot of difference there (or so I thought, but more on that in a bit). Using rsync to copy all my data over didn’t take too long and a quick shuffle of UUID’s in /etc/fstab and I rebooted and was happily using my shiny new ext4 logical volume. Everything was working fine but it wasn’t until I was poking in the logs a day or two later that I noticed this:

EXT4-fs warning (device dm-13): ext4_fill_super: extents feature not enabled on this filesystem, use tune2fs.

That’s unusual because since 2.6.23 that was meant to be enabled by default. A quick play with tune2fs under both Ubuntu Hardy and Intrepid showed that they didn’t support that option so I ended up grabbing
e2fsprogs from SourceForge
and building it myself. With that done I could use its mkfs.ext4 command to build a fully functional ext4 filesystem and get the far better message:

EXT4-fs: file extents enabled

Another long rsync later and I was up and running with ext4 with all the features I wanted.

Of course this meant that my initial ext4 numbers were without extents, so I’ve just done another run (though this time with X and a full KDE 4 session going) and was blown away by the results:

Version 1.03b       ------Sequential Output------ --Sequential Input- --Random-
                    -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP
quad            16G           68123  17 30013   6           64239   8 363.1   1
                    ------Sequential Create------ --------Random Create--------
                    -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
              files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
                 16 +++++ +++ +++++ +++ +++++ +++ +++++ +++ +++++ +++ +++++ +++
quad,16G,,,68123,17,30013,6,,,64239,8,363.1,1,16,+++++,+++,+++++,+++,+++++,+++,+++++,+++,+++++,+++,+++++,+++

real    18m18.005s
user    0m1.280s
sys     1m46.434s

That’s a full 2 minutes faster (and then some) and the I/O is just enormous!

So here’s that first table again, but with an extra column for ext4 with extents:

XFS ext4 ext4 + extents
Block write (MB/s) 54 51 68
Block rewrite (MB/s) 23 24 30
Block read (MB/s) 51 50 64
Sequential creates (/s) 4470 17801 Too fast
Runtime (minutes) 23 22 18

This looks fun.. πŸ˜‰

Hv3 – minimal browsing at its fastest

Wow, this is really impressive. After reading this LWN article about Hv3, a Tk/Tcl based web browser I decided to give it a go and it’s just great. Lightweight and blindingly fast!

Now this is a browser that’s still in alpha, so expect odd behaviour and bugs, but it’s still remarkably useable. The biggest issue I’ve had with it in a few minutes of playing has been that it doesn’t support HTTP authentication but that just stops me testing it on a couple of sites at work.

Well done folks, keep up the good work!

Bonnie++ Results for XFS on Dell E4200 SSD

I’ve been playing with my new work laptop, a Dell E4200 (which I chose as I wanted something light) and thought I’d run Bonnie++ on my XFS /home partition on the SSD (a “SAMSUNG SSD Thin uSATA 128GB M” according to dmesg) to see how it compares to spinning disk. Here’s the results with Ubuntu Intrepid (8.10):

Version 1.03c       ------Sequential Output------ --Sequential Input- --Random-
                    -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP
sys26            2G           68551  27 38896  23           90404  30  1356   6
                    ------Sequential Create------ --------Random Create--------
                    -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
              files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
                 16   556   8 +++++ +++   679   7   605   8 +++++ +++   442   5
sys26,2G,,,68551,27,38896,23,,,90404,30,1355.6,6,16,556,8,+++++,+++,679,7,605,8,+++++,+++,442,5

real    3m56.775s
user    0m0.580s
sys     0m36.930s

So comparing with some old results on my home desktop system seems to show that the block I/O numbers are better, but the file manipulation stuff is much worse! Once I can get btrfs on here I’ll have to try again. πŸ˜‰

OpenMoko in Search of X11 Driver Developers for Glamo

The graphics hardware in the Neo Freerunner (Glamo) is missing support for some of its 3D support, and so the OpenMoko folks are looking for developers who can help them out with this:

Having said that, if someone wants to seriously develop for the glamo, please get in touch with me and we will find a legally correct way to extend the smedia documentation to you.
In fact we have done that in a few cases before already, but I’m not sure how much actual codes have come out of that. I think very little πŸ˜‰ So we need some really serious coders that don’t mind a tough challenge.

Looks like another person to contact might be Graeme Gregory:

Over the next few weeks I shall be working on Xglamo to bring it into the Xorg family of drivers. If people come up with interesting patches while I am working on this I can certainly give them a tryout.

Book Meme

Seeing as everyone else on PLOA is doing it.. πŸ™‚

Instructions:

  • Grab the nearest book.
  • Open it to page 56.
  • Find the fifth sentence.
  • Post the text of the sentence in your journal along with these instructions.
  • DonÒ€ℒt dig for your favorite book, the cool book, or the intellectual one: pick the CLOSEST.

So here’s mine:

This was spotted quickly, and a patch was shipped, but almost a hundred U.S. government systems in Germany were using unlicensed copies of the software and didn’t get the patch, with the result that hackers were able to get in and steal information, which they are rumoured to have sold to the KGB.

That’s from “Security Engineering: A Guide to Building Dependable Distributed Systems” (second edition) by Ross Anderson. I’m on page 76 of 891..

It’s the only book I have with me here for SC08 in Austin, Texas, so you can’t say I rigged it! πŸ™‚

Patent Trolls Attack OpenMoko Project

It appears that the patent trolls Sisvel are attacking the OpenMoko project, and as part of their strategy the project has chosen to pull all of their downloads whilst they remove any support for MP2 and MP3 files.

The short story is that we are in a protracted battle with some patent trolls. Google for Sisvel. In order to get ourselves in a stronger position, we want to make sure no copies/instances/whatever of patent-infested technologies like MP2 and MP3 exist on our servers. Our phones never shipped with end-user MP3 playback features, but we want to use this opportunity to make sure it’s not even in some remote place somewhere.

As Sisvel aren’t the only ones to sue over MPEG related patents (( note that Microsoft won on appeal very recently, reversing the decision )) it really does bring the message home that MPEG is not a safe technology for audio files and that things like Ogg-Vorbis and FLAC are far better (and safer!) choices in the long run.

Android Copies What You Type…

…not in a malicious way, but in a rather amusing and potentially destructive one.. πŸ™‚

It seems as though there is a /system/sbin/sh running in the background with
/dev/console as stdin. That could explain why typing “reboot” and then enter (in
ConnectBot or otherwise) will reboot your phone. If you type “telnetd”, telnet into
your phone, and look at the /proc/XX/fd tree for the /system/sbin/sh process, you can
see it clearly.

Until you’ve grabbed the RC30 update that fixes this it’s probably best not to do much sysadmin work from one, especially if that involves rm -rf foo.. πŸ˜‰ This was via LWN, which has the priceless comment:

I wonder how many android phones were running at half speed after someone replied “yes” to someone…

πŸ™‚

Technology predictions

I’ll add three to the ones that Stewart just posted:

  • Two years: The distinction between laptops, netbooks and mobile phones will get even more blurred with consumers demanding mobiles with more power and lighter and lighter laptops/netbooks;
  • Two years: Tivolised/Androidised Linux mobiles will grow, but there will be a few more open Linux phones around (mainly due to the convergence of mobiles, laptops and netbooks);
  • Five years: Peak oil will start to affect pricing of consumer electronics directly through raw materials.