Blog Entries tagged turbostation
Feeds: RSS | Atom

Squeezecenter Performance on QNAP TS-109 II

Published: 2008-12-14 19:11 UTC. Tags: turbostation squeezebox

As promised in Yesterdays post, here are some data on the performance of Squeezecenter on an QNAP TS-109 II running Debian Lenny.

Picture of QNAP TS-109 II

My idea when buying the QNAP was to use it as a low-power alternative to keeping my workstation switched on all the time for access to my music collection from the Squeezebox.

Low power processors have a drawback, though - you don't get that much processing power out of them. Running Squeezecenter on it turned out to work.. but not very fast.

Memory Consumption

The QNAP TS-109 II has 256Mb of memory. That's good, because squeezecenter alone consumes about 70Mb of virtual memory, och which 60 is resident. The MySQL server started by squeezecenter will consume another 97M virtual/20Mb resident. Part of the virtual memory used by MySQL is probably mmap:ed files, and that doesn't really count.

With only squeezecenter and the standard set of daemons such as syslogd and dhcpd running, and NFS server in the kernel, it seems like there's not much swap usage, so the amount of available memory is not extremely low. Don't try the 128Mb version of the QNAP, though, that will be painstakingly slow because much more swap will be required.

Web Interface Performance

The web interface is rather slow. You have to wait several seconds before things appear, and it also seems like the CPU consumption increases significantly while using the web interface.

One strange thing is that the CPU consumption of the perl process is very high, while the CPU consumption of the MySQL process is very low. One has to wonder if the SQL database is used in an optimal way. Letting the database do most of the work is often the best way to achieve good performance. Doing a lot of processing after the data has been read from the database is a bad way. But, I have not studied the database operations in detail, this is just guesswork from my side.

Changing from the default skin to the Classic skin did help, but it's still slow.

Using the Squeezebox to search for music

Picture of idle Squeezecenter v3

Using the remote to search for music via the squeezebox has good performance. Starting playback sometimes has a slight delay, which I think in most cases is because of transcoding..

Transcoding Ogg Vorbis files

The firmware for the Squeezebox has support for decoding Ogg Vorbis files, but unfortunately it doesn't seem to work well at all. It can't read about half of my Ogg Vorbis files. Even newly ripped files are troublesome, and if I rip CD and code it into Ogg Vorbis, some of the files will work in the Squeezebox, some will not.

Since I do have a lot of Ogg Vorbis files, the solution is to have Squeezecenter transcode the Ogg data to another format that the Squeezebox understands, before sending it over the network. This process is called transcoding.

I first tried to transcode into FLAC, but that was too CPU-intensive for the QNAP TS-109 II to handle - probably because two compressed formats were involved.

Transcoding from Ogg to AIFF does seem to work rather well - there is still a slight delay before you can hear the music after pressing play on the remote.

An interesting experiment would be to use the integer-only Ogg decoder, Tremor. That might speed things up because as far as I understand, floating point performance is not that good on the ARM architecture.

Conclusion

Running Squeezecenter on the QNAP TS-109 II does work, but it's a bit slow. Part of the problem is that Squeezecenter is rather bloated, functionality-wise.

It's a pity the only documentation on the protocol used between squeezecenter and squeezebox is the Perl source code.

0 comments.

Running Squeezecenter on QNAP TS-109 II

Published: 2008-12-13 21:18 UTC. Tags: hardware turbostation squeezebox

I have now managed to get Squeezecenter running on my QNAP TS-109 II. Squeezecenter is the server a Squeezebox network music player connects to in order to get hold of its music.

Picture of QNAP TS-109 II

Since the QNAP TS-109 II is running on the ARMEL architecture, installation was a little bit tricky.

Squeezecenter is written in Perl. Let me state early that Perl is not my favourite programming language.

I installed the Debian package of Squeezecenter 7.3 available Slimdevices web. The package's architecture is all, which is not true - it contains Perl XS code compiled for i386 and amd64. This code won't run on ARMEL.

The Squeezecenter package also ships lot's and lot's of third party Perl modules, but they don't work on Perl 5.10 because of module version conflicts. I run Debian Lenny on the QNAP, and guess which Perl version is shipped with Lenny... Yep, Perl 5.10.

I found an excellent forum post by "bugfixer" at the squeezebox forums explaining how to get Squeezecenter running on Perl 5.10. Much of the information in this blogpost comes from that post.

The shipped perl modules are all available as Debian packages - with one exception - the libjson-xs-perl package in Debian lacks the file /usr/lib/perl5/JSON/XS/VersionOneAndTwo.pm, so I had to copy that one from the version shipped with squeezecenter.

The squeezecenter Debian package also has a large amount of dependencis not listed in the package's metadata. And to add to the misery, it requires the perl package Encode::Detect, which is not even available as Debian package.

To avoid having to keep track of this mess, I created a puppet class which installs all dependencies, installs squeezecenter, and then removes all files which cause trouble. With that work done, I can reinstall squeezecenter and be pretty sure it will work. I did an upgrade of squeezenter today by downloading the new squeezecenter debian package, installing it, then ran puppet to move away all the offending perl classes - worked as a charm!

So, if you want a list of all packages required and all files that must be moved, refer to the source for my squeezecenter puppet class. That list will be kept more up to that than if I would list the info on this blog post.

I'll be back with some info on the performance when running Squeezecenter on the QNAP. I can say already that it's not blazingly fast..

0 comments.

QNAP TS-109 II - First Impressions

Published: 2008-12-02 20:06 UTC. Tags: linux review ipv6 turbostation

I bought a second hand Squeezebox the other day. The Squeezebox must read its files from a server running Squeezecenter, and since I don't want my workstation running all day (it's consuming energy. I'm trying to be environmentally friendly when I can), I had to find a low-power alternative.

I have been thinking about getting some kind of server running at home for a while. There are other things I want it to do as well:

  • Keep a SixXS IPv6 tunnel up, and route an IPv6 subnet for home.
  • Be able to Wake-on-LAN my main workstation.
  • Get better network throughput than from my stupid 3com NAT box.
  • Etc, etc..

After some consideration, I bought a QNAP TS-109 II. It has a 500MHz ARM processor, 256Mb of RAM and consumes 14Watts of energy when active, 6,6W when not. That's quite OK. I bought a WD Caviar Green 500Gb hard drive for it. That drive is supposed to be quiet and energy efficient.

Another killer fact about the QNAP is that the upcoming Debian Lenny will have official support for all TurboStation models from QNAP. It's even listed as a press release on QNAP's webpage. The installation link from the press release doesn't seem to work anymore, though. The Debian on QNAP TS-109 pages are very helpful, though.

The QNAP + hard drive arrived today, and I unpacked and assembled the two (very easy), plugged it in, found its IP address from the list of DHCP entries in my NAT box, and tried to connect to it via a web browser on both port 80 and port 8080.

Unfortunately, I was met by a message in several languages basically telling me that "This box is not initialized, do what the manual says". And the manual says that you need a Windows computer to initialize the TS-109.

Doh!

I don't own a Windows computer!

Fortunately, my girlfriend has an XP box which I could use to run the "QNAP Finder" to install the QNAP. Still, I find this irritating. There's support for Mac as well, but I don't have any Mac neither.

I'm sure there's some way of initializing the device without Windows, but that might require lot's of knowledge on the RPC protocol used to talk to the device. Presumably, it's some kind of RPC over HTTP, as the only ports the device has open at initial startup is 80 and 8080.

Navigating around in the menus for a while, I was not surprised to see that running Debian on the machine would be the best option for me. Specifically:

  • There's no support for NFS on the TS-109 II. You need the TS-109 II Pro for that.
  • There's no network routing support in the standard firmware, and that's not surprising - this is a NAS box afterall. But with Linux and it's VLAN support and iptables, it should work well. We'll see about that... :-)
  • The configuration can't be easily handled via Puppet when running the standard firmware. That's something I do for other servers I manage.

Anyway, I think I'll be happy with this box. I might add an external eSATA enclosure later to provide backup of the stuff I keep on the QNAP. We'll see. Backing up stuff to Amazon S3 is another option.

0 comments.