Thursday, November 21, 2013

A new Media Server (flash on Linux)

I used to use an old T400s (Core 2 Duo P9400) as my household media server. I used it as replication from my working files (ie using unison to synchronize my laptop home to it), as a backup repository (with 2 RAIDed USB drive as backup storage), as Music Server using samba to export my music for SONOS, and again as Media Server using plex to export movies to ROKU (thanks David for this suggestion!).

A reasonably simple setup, although it fell short of my needs. That media server is connected to my 1080p projector so I can watch MotoGP. The MotoGP web site has a very convenient subscription to watch the races whenever I want to. Usually I steer clear of any news for a few days after the race, till I have time to watch the race, and voila', MotoGP on demand with no spoilers. 

I just wanted to watch the race
The issue is that the venerable T400s didn't have enough horsepower to stream the races.

Flash (and Linux?)

The stream coming from MotoGP uses flash, with quality up to HD (currently 720p). Till now I needed my wife's laptop with a quad core i7-3630QM with NVIDIA GT750M (nope she is not a gamer, just an architect) to be able to enjoy the races. Luckily my wife loves the races too, so no contention on her laptop during MotoGP season.

The late T400s started to be a bit noisy (the fan developed an annoying whine): the time had come to look for a substitute that would be able to stream the races. In case you wonder, yes, the Media Server had to run Linux. I started to sample all the Linux machine I had access to, to check what was the minimum configuration I would need.

There seem to have been some hardware acceleration (GPU assisted) available to Linux for flash some time ago, but to the best of my knowledge, the latest versions do not have it any longer. That is, CPU brute force is the answer. And looking at CPU usage during streaming, single core raw power is the key player.

As a side note, I do use firefox (well iceweasel): Chrome seems to have better performance with pepper for some, but during my testing I didn't notice any significant difference.

The Search for the CPU

I was hoping to use some small and quiet machine like the NUC, the very same ones used for the Eucalyptus Backpack Availability Zones. At about the same time I was looking at this, my working laptop (core i5-2520M, not enough to watch the races), started to have issues, and the replacement laptop I got (Dell XPS-13) had exactly the same CPU as the most powerful of the NUC (core i7 3537U). Very convenient for my testings.

Eucalyptus Backpak AZ-2

Once the XPS-13 arrived, I did a quick test with Windows (!!), and then with Linux. Surprisingly, both OSes showed about the same performance watching the races: almost enough, but not quite. The video showed at times annoying micro-delays. Now I had a CPU I can reference as almost capable. Although the NUC and similar bricks were off the table, I could start cross reference various benchmark, and select CPUs with a healthy single core lead over the low power core i7.

The new Media Server 

After some search across various tiny and small form cases, CPU benchmarks, and with the constrain of a reasonable price, I ended up with a DS61 case (USB 3.0 was a nice to have for faster backups), and a core i3-3245. The core i3 has enough of a lead over the low power core i7, to give me comfort: only the HD 4000 (same GPU on both) was slightly lower clocked. 

I recycled a 4G memory DIMM, and a small mSATA SSD drive (fast and silent) I already had, and there you have it: a brand new media server. Few more adjustments were done to make it more capable to stream MotoGP races, in particular:
  • default to SNA for Intel GPU acceleration (without it, I observed some tearing)
  • switched to usb wireless card (SONOS didn't provide enough bandwidth to stream the races)
  • adjusted fancontrol to keep the fan from revving too high
  • Bluetooth keyboard to couch control the machine 
Still fairly small, and fully capable


  • small (fits on top of the bookshelf)
  • fits the requirements (I can watch the races now)
  • reasonably quiet under load (after fancontrol)


  • desktop CPU (more watts than strictly needed I think)
  • no battery (the T400s had an incorporated UPS which was nice)