July 02, 2010
I bought a 1.5Tbyte My Book Essential external USB drive from Western Digital. The box does not say what drive is inside and the USB interface does not reveal it either. Creating the ext3 file system took surprisingly long. I remember reading about the performance hit of the new WD Caviar drives, but I didn't expect to be affected by this because I thought the USB interface would be the bottleneck anyway, which is an incorrect assumption.
Hard disk drive manufacturers are in transition from 512 bytes per sector to 4096 bytes per sector. The larger sector size is referred to as Advanced Format or Bigsector. Big words to create awareness for the transition.
I tried aligning the partition as described in this excellent article. I did some tests, with and without alignment. The results are below.
epronk@godiva:~$ time cp largefilemedia/disk/
real 10m44.546s
user 0m0.332s
sys 0m32.430s
epronk@godiva:~$ time cp largefile /media/disk/
real 8m49.902s
user 0m0.412s
sys 0m36.746s
These are raw write operations on an empty disk, but with taking the file system (ext3) into consideration. The difference with copying a large file is there is no reading of a source file part of the operation.
epronk@godiva:~$ time dd if=/dev/zero of=/media/disk/test bs=1024 count=$[1024*1024]
1048576+0 records in
1048576+0 records out
1073741824 bytes (1.1 GB) copied, 39.225 s, 27.4 MB/s
epronk@godiva:~$ time dd if=/dev/zero of=/media/disk/test bs=1024 count=$[1024*1024]
1048576+0 records in
1048576+0 records out
1073741824 bytes (1.1 GB) copied, 32.5642 s, 33.0 MB/s
This is a collection of small files (source files / object files / libraries etc.) which I think is more typical usage of the disk.
epronk@godiva:~$ time cp -a src /media/disk/
real 48m16.739s
user 0m2.996s
sys 0m48.459s
epronk@godiva:~$ time cp -a src /media/disk
real 7m59.009s
user 0m3.300s
sys 0m54.071s
This is what my partition table for the drive looks like. The important part is the first partition needs to start at sector 64 (this has to be a multiple of 4098/512 = 8) instead of sector 63 which is the default.
Expert command (m for help): p
Disk /dev/sdb: 255 heads, 63 sectors, 182315 cylinders
Nr AF Hd Sec Cyl Hd Sec Cyl Start Size ID
1 00 1 1 0 254 63 1023 64 2928890411 83
2 00 0 0 0 0 0 0 0 0 00
3 00 0 0 0 0 0 0 0 0 00
4 00 0 0 0 0 0 0 0 0 00
If you decide to re-partition and format the drive you need to be aware of this. The difference for raw writes or large files is significant, but for copying a large set of files the difference is huge. A factor 6 faster was a surprising result.
June 18, 2010
Over the last few days I've moved my blog from wordpress to a self-rolled blog software written in Python. The reason for moving away from WordPress is that I want to be able to edit a local copy of my content using an editor instead of doing it inside a browser. I also want to be able to use version control and tools like grep.
Before doing this I've looked at some existing systems and I started to wonder more and more how hard it would be to roll my own blog system, of course making use of existing components that do the work.
The first alternative I looked at was ikiwiki, a wiki compiler. Ikiwiki generates static content from text files using markdown. You can set it up as a blog system and has a module for leaving comments. I want to use a comment module but had a bad experience with wiki and blog spam. More over, my provider uses mod_perl which is not yet supported by ikiwiki.
Then, I came across this post about blogging with Git, Emacs, and Jekyll. Jekyll is written in Ruby and uses the Liquid template system. The Python port of Jekyll is named Hyde and uses Django templates. Anyway, this combination of tools seems powerful, but I got overwhelmed with the amount of technology I'm not familiar with. Yet, in the back of my mind I was still convinced I could make it simpler than that. So I though to myself, why not start from scratch and use a template system I am familiar with. And that's how Mako enters the picture. I started playing with Mako and with 50 lines of Python and a few simple templates I now have a blog with the most basic features.
Features:
May 09, 2009
I live in Australia and decided to reject my Vista license. My old notebook was a dual boot system with Linux and Windows XP. I rarely used Windows XP. The only Windows application I used was Skype. After Skype made my webcam work with their Linux version I never booted Windows again. For my new laptop I didn’t want to pay the Windows tax again.
My email to Lenovo:
Hello,
On 17 October 2008 I purchased a Lenovo Thinkpad T400.
I am very satisfied with the Lenovo hardware product.The first time I started the computer it asked me to agree to the
license terms for Vista.The license terms for Vista states the following:
“By using the software, you accept these terms. If you do not accept
them, do not use the software. Instead, contact the manufacturer or
installer to determine their return policy for a refund or credit.”The Lenovo part of the terms states the following:
“IF YOU AQUIRED THE PROGRAM(S) PRELOADED ON A LENOVO PRODUCT, YOU
MAY CONTINUE TO USE THE PRODUCT, BUT NOT ANY OF THE PROGRAM(S)
COVERED UNDER THIS LICENSE AGREEMENT”I did not accept these terms and took a picture of the screen for reference.
I have not accepted the terms because I do not use Windows Vista, but Linux.
I have not used it and removed Vista from the system by overwriting the
partition table and installed Linux on my system.
I have taken pictures from all steps to prove that I have in fact
removed it.I want to ask Lenovo to give me a refund or credit for the Windows Vista
License. In a recent case Lenovo has offered a customer 130 USD for a
refund. In another case HP payed 200 USD for a refund.I am willing to accept a credit which I can use to order accessories
from www.lenovo.com/essentials.details:
I have purchased my Lenovo from Phil’s Computer Supplies in Melbourne
and registered my product online.Lenovo Thinkpad T400
Product ID : 27652KM
S/N ** ***** **/**Windows Vista Business OEMAct
Lenovo Singapore
product key *****-*****-*****-*****-*****Please take a look at this article:
http://www.ynetnews.com/articles/0,7340,L-3632861,00.htmlI hope to hear from you soon.
Regards,
Eddy Pronk
The reply from Lenovo CARE
Hi Eddy,
In regards to this issue with the Microsoft Operating System Software that is pre installed in your system.
I’ve consulted my management on this and have been informed that we are unable to provide you a refund on the software mentioned above.
I would like to refer you to the policy in accordance to the corresponding issue which states that should the customer refuse to accept the Microsoft license, we will not refund the cost of the Microsoft license, and we generally do not provide refunds to items that are components/part of a package.
This is due to the license itself is an OEM version and it is not able to be installed in other machine if we were to do so.I hope the explaination would be acceptable due to our Policy.
Hi <name here>,
Regarding issue *******.
I am not happy with the outcome. I am looking at my options for legal
action. Please provide me with the contact details of your management and
the contact details of the department handling legal matters in Australia.Please refer to this court case which resulted in a settlement.
http://www.ynetnews.com/articles/0,7340,L-3632861,00.htmlRegards,
Eddy Pronk
After forwarding my initial email to their legal counsil I received the following:
Thanks for your mail Eddy. As I am sure you are aware our policy is not to give refunds for MS licences. In my view this policy is justified and supported at law.
I will find out if we are prepared to give you a credit, as opposed to a refund, for other Lenovo products and will get back to you asap. Did you have any particular accessories in mind?
Later I received this from Lenovo CARE:
Hi Eddy
I was engaged by <name here> (legal counsel from Lenovo) to offer you a credit of AUD$200.
Hope to reach out to you again today.Stay in touch.
I could spend this credit on Lenovo products. I have read about people receiving a refund, but to be fair it does say “refund OR credit”.
Read more about the Windows-Tax Refund at TuxMobil and fsfe.
July 07, 2008
A few years ago I’ve used libdbi in a C++ application to talk to MySQL and SQLite. At the time there was not much development being done in libdbi. In my current job we use Sybase on Solaris and I wanted to do development on one of their applications on Linux. I tried libdbi with the freetds driver.
There was a problem with conversion of VARCHAR to C string. If a field contained exactly the maximum number of characters specified by VARCHAR, the conversion would fail because there was not enough allocated to store the trailing 0 character.
I’ve submitted patches to both libdbi-drivers and freetds. The patch in freetds was not accepted but did result in some changes in the code doing the conversion. A second patch in libdbi-drivers fixed the problem.
patch 1
patch 2
discussion on freetds list
July 05, 2008
Scuttle is a Free Software alternative for services like del.icio.us. It has a plug-in for Firefox which is now available for Firefox 3.
Scuttle Firefox 3 Extension
Social bookmarking with Scuttle
My Scuttle
July 05, 2008
Last weekend I went to CITCON (Continuous Integration and Testing Conference) which was held in Jasper Hotel, Melbourne.
Some thoughts about what we can do with the things I heard at this conference:
Get testers and product managers involved in writing acceptation tests for stories:
About unit tests I heard some interesting statements:
A lot of projects suffer from problems with performance testing.
Measure test coverage to find out:
Record and playback on protocol level is a common practice for performance testing and reproducing production problems. I’ve been doing this kind of stuff recently
I can recommend going there next year. This conference is free.
May 03, 2008
This week I received my ergonomic Maltron keyboard. I bought it as a preventative measure for RSI. If your hands or wrists are giving you warning signals, consider one of these. I’m currently doing the online training course and hope to switch over within a week.

April 24, 2008
This week I installed Debian on my notebook just to find out how this would be different. My first attempt to use Debian was in 2000 with the release of ‘potato’. I installed ‘Etch’ using ‘expertgui’. My HP Pavillion dv1159ea has “Intel PRO/Wireless 2200BG” which was not installed.
sudo apt-get install ipw2200-modules-2.6.18-6-686
the dmesg output said something like:
ipw2200: ipw2200-bss.fw request_firmware failed: Reason -2
This means the driver tries to send the firmware file to the device, which is not being distributed by Debian.
http://ipw2200.sourceforge.net/README.ipw2200 explains how to obtain a working firmware. After rebooting, the wireless worked.
I did a dist-upgrade to lenny (testing) which should be stable enough for my usage.
© Eddy Pronk