Monthly Archives: January 2011

Some performance benchmarks of QNAP TS 109

I bought a QNAP TS-109 with the intention of using it as a linux server (DNS, DHCP, www, vpn, ssh, file, mysql). The QNAP comes with its own (very nice) linux based firmware, but my plan was to run Debian on it. However, performance seemed not so good (found something on Google about missing DMA Engine in the kernel), so I decided to do some benchmarks before picking Debian or qnap firmware.

The harddrive is a Samsung 2TB drive (so those one works). All tests are made with a 500 Mb mpeg-file (high entropy). The server is a Mac OS X machine.

The commands used are:

  qnap$ nc -l -p 9999 > nc-500Mb.img
  mac$ time nc 9999 < 500Mb.img

  qnap$ time scp o@ scp-500Mb.img

  qnap$ time md5sum nc-500Mb.img

  qnap$ time cp scp-500Mb.img cp-500Mb.img

Results follow:

                   nc       scp      md5sum   cp   
Debian 6.0 btrfs   87s      273s     40s      71s
           ext3    73s      284s     22s      39s
           ext2    59s      273s     22s      27s
Debian 5.0 ext3    81s      259s     23s      40s
           ext2    62s      246s     23s      26s
Qnap FW            N/A      394s     N/A      27s

The commands nc and md5sum was not available in the qnap firmware.

Bricking, and recovery
I made a mistake when making backup of the original qnap firmware. So, when intending to restore the qnap firmware over Debian, I ended up making the qnap unbootable.

Another mistake was to not follow good advice; they tell you very clearly to "install recovery mode" before trying Debian.

I got a USB to 3.3V TTL serial cable and tried to revive it. It worked using these instructions 🙂 I ended up doing some soldering inside the qnap.

My advice: when you backup /dev/mtdblocks, make a simple cmp to verify that the file you created matches the block you intended to backup. Much quicker than realising later that recovering old OS actually bricks you machine.

As I see it, there are no performance reasons to use the Qnap firmware with the Qnap. Debain seems to be equally fast. Still, both are surprisingly slow - do I have a hard drive incompability issue?

After deploying Debian, I can say that real world performance for rsync (mostly large files) is just over 5 Mb/s.

SSH reverse tunnel to OpenWRT / dropbear

I have a little WRT54GL router that runs OpenWRT. It is very convenient to be able to SSH into the router, and even more convenient to make tunnels.

In opensshd, there is an option

GatewayPorts yes

that needs to be turned on. It allows the SSH server to listen to ports and forward them back to the client. Also it allows other machines to connect to that port on the SSH server, not just the SSH server.

Well, for dropbear (the SSH implementation of OpenWRT), things are a little different. First, you need to start the dropbear deamon with the flag -a. Preferably:

        option 'GatewayPorts' 'on'

Second, when you invoke ssh, you need to specifically tell dropbear to listen to the network interface (not to localhost). Example:

$ ssh -l root -R

This assumes you are on a client, on the 10.2-network. Your OpenWRT is on the internet (IP= Connections made to, port 7777 will be tunneled through SSH back to the client. The client will in turn make a new connection to, port 80 and forward all traffic there. So, in this case, an internal webserver is exposed on the internet.

With other sshd servers, it may be enought to make the call

$ ssh -l root -R 7777:

and sshd will listen to all interfaces.

Youtube performance on PowerBook G4

My Apple PowerBook G4@866 Mhz can not handle youtube vidoes… when they are based on flash. However, go to the HTML 5 version of YouTube and performance is very reasonable.

MacMini Tiger to Snow Leopard Upgrade

A friend has a MacMini, the first one with Intel CPU: 1.5Ghz Core Solo, 512Mb RAM and 60Gb hard drive and Tiger 10.4.11. Hard drive was full and computer was very slow. We decided to upgrade with a new harddrive and more RAM. Opening and upgrading a MacMini is a challenge, but other people have written a lot about that.

Instead, I will quickly explain a simple method for making a clean install:

  1. Upgrade hardware – replace memory and harddrive
  2. Put old harddrive in USB external case
  3. Install Snow Leopard from standard install DVD
  4. In the end of the installation, you get the question if you want to migrate data. You want to do that, from Internal drive. Connect old drive to computer USB port. Select users and configuration. If you are fine reinstalling applications from scratch, dont migrate them
  5. Run software upgrade
  6. Install software

Pretty obvious? Well, as I prepared for the upgrade, it was not clear that it is possible migrate a Tiger disk in a USB case, when installing Snow Leopard. It works perfectly.

And 2Gb memory in a MacMini with a 1.5Ghz Core Solo performs very well for everyday tasks. A recommended upgrade.