Goodbye defrag, hello (again) HSM.

Defrag tools are on the verge of extinction.
SSD drives are making them superfluous when not plain disruptive.
But SSD sizes are not catching up anytime soon with conventional HDs. Multimedia files are filling up gigabytes of space and their placement on solid state drives is too expensive, while benefits are minimal for occasional access.
What is really needed is a hierarchical file system that can handle multiple drives at once.
A big mechanical HD would be paired with an SSD drive.
Frequently accessed sectors would be replicated on the SSD for faster access. All writes should be directed on the SSD for faster I/O completion. Files would then be written back to the HD in the background while optimizing placement and seeks of the magnetic head.
Hybrid disks like the Seagate Momentus seems to be moving that way, but a really small cache limits its benefit.
A software solution at the file system level can be more flexible by allowing mixing different sizes of SSD and HD, and a higher level of abstraction may allow better optimization than a simple cache.
After virtualization, is this another Mainframe technology going from datacenters to homes?


Replacing a mechanical HD with an SSD

My home PC is aging... It's 6 years old now, and while this confirms the goodness of the choices I've made when I built it, this also means that the XP installation has gathered so many stuff that it's now slow as hell.
A full boot takes now as much as 4'20":
30" from startup to the login screen of Windows XP
3'40" to quiesce all disk activities.
At that point, 40 more seconds are necessary from login to complete disk stop. Trying to launch any program before the disk settles out, just results in more thrashing and an even slower startup.
So I've bought a Crucial m4 SSD to see if this upgrade can make a difference.

This was the starting configuration:
I have 2 HDs in my PC, one for the OS and one for the data.
The OS is multiboot, so I have one partition for XP and one for Ubuntu.
The remaining disk space is for Windows program files partition.

On the second unit there are the swap partitions for Windows and Linux, the Documents and Settings partition, the /home filesystem and some spare space for Windows.

The purpose of this layout is to allow concurrent access to OS and swap, OS and user files, applications and user data.

The first step was copying the content of the first disk onto the new ssd.
I connected the new disk to an empty SATA connector and booted into Parted Magic.
Using GParted I initialized the new disk with Device -> Create Partition Table, then it was just a copy/paste work between the old partition on /dev/sda and the new disk seen as /dev/sdc
The Crucial M4 is just 119GiB while my old disk was 153, so I needed to shrink the sda3 partition to make it fit.
After copying the /dev/sda1 partition I needed to set the "boot" flag on it on the new disk to make it bootable.

GParted copied all partitions but left a standard Windows MBR, so grub was gone and linux didn't boot.
To restore the grub MBR I've followed this excellent guide, and linux was back in action.
Windows booted but wasn't in good shape either:

I logged in and the whole desktop froze with only the wallpaper displayed, but no start button, taskbar or icons.
It just hung there forever.
I rebooted in safe mode by pressing F8 and choosing "Safe mode with command prompt".
A popup went up, saying that windows had found new hardware and the drivers had been installed.
One more reboot and Windows was fine with the new disk.

Now a complete boot takes as low as 19 seconds, and no more disk thrashing after loggin on: the Start menu is immediately available and responsive.

The last step was setting noatime in /etc/fstab to reduce writing on the SSD.

So, here it is, by comparison with a traditional 3.5" HD, the little Crucial M4


Crucial M4 Performance

Model: M4-CT128M4SSD2
Firmware: 000F

root@pc:~# dd if=/dev/sda of=/dev/null
19573461+0 records in
19573461+0 records out
10021612032 bytes (10 GB) copied, 40.9522 s, 245 MB/s

root@pc:~# dd if=/dev/zero of=/tmpfile bs=1024 count=1024000
1024000+0 records in
1024000+0 records out
1048576000 bytes (1.0 GB) copied, 6.06945 s, 173 MB/s


dmidecode 2.11 for Windows

Every now and then, I find myself doing some machine inventory. Having a common tool for Windows and Linux is a big plus, so collected data is coherent between different systems.
dmidecode is a Linux utility that reads the BIOS and prints out the configuration of the machine (CPU, cores, RAM).
Browsing the Internet I've found one version for Windows, but it's still version 2.10 and it doesn't support newer BIOSes.
So I've picked up the patches that Hugo Weber had done for version 2.8 and integrated them into the 2.11 source tree.
I've compiled them with DevC++ and here they are:

Another weirdness of Google Maps

This a StreetView snapshot from Legoland. The face blurring algorithm has blurred out even the LEGO-built Mount Rushmore faces.

This could be either a tribute to the quality of the LEGO models engineers or an epic failure of the Google algorithm, since the real Rushmore itself is not blurred.


DailyTech - Honda, University of Tokyo Create Preventative Traffic Jam System

DailyTech - Honda, University of Tokyo Create Preventative Traffic Jam System

This study aims at reducing traffic jams by suggesting driving behavior to the driver.
It's interesting they're using Italy as a test case, but I bet it will fail: Italian drivers are notoriously "road warriors" that don't accept advices while driving.