Thursday, June 17, 2010

NineBall Versus the Audio Formats

The last couple days I have been trying to wrap my head around the matter of audio formats. I have a collection of CDs sitting in boxes in the basement currently and am planning to rip them all to store on the NAS as a central repository that all our devices can pull from instead of having individual libraries. Storage space is obviously not a concern so an uncompressed or lossless format would be ideal, although I understand that I won't be able to tell the difference aurally between those and good MP3/AAC encodes according to everyone on the interwebs but this guy. I just want reference quality because I can.

That would be fine if I was only concerned with playback on our laptops and HTPC and had no interest in embedded information tagging. Unfortunately, I am also targetting iPods, a PS3 and a D-Link DSM-320. This restricts me to lossy encoding if I only want 1 copy of each song. So, seemingly I can rip my CDs to 320Kbps VBR MP3 and be none the wiser when listening (see the first two links above) while having playback support on all my devices. But I will know all the same that it is not reference quality that I have stored. I could also just use WAV files but that is too much space even for me and supports no embedded tagging. I need to find a middle groud.

Now, the PS3 and DSM-320 can be serviced by uPnP/DLNA media servers which can transcode my media on the fly but that's a story for another day and will not work for syncing with our iPods. There are other servers though such as FireFly (not maintained but works) which is a DAAP server and shows up as a shared folder in iTunes and Subsonic which I'm not sure how but apparently works with iTunes. Both servers transcode on the fly like the uPnP servers but since they show up in iTunes allow for syncing to the iPods. This will allow for ripping to a lossless, tagged format such as FLAC while being transcoded for iPods without the required storage.

Ripping to FLAC will also require more software for ripping such as MediaMonkey. Ripping to MP3 or AAC would be easy through iTunes while ripping to WMA-Lossless would be easy through Windows Media Player but that format is not well supported by the transcoding servers.

This brings me to my current dilema. Do I just rip to MP3 for full native support on all my devices, do I rip to AAC for full support on all but the DSM-320 and trash it (have no current use for it but do own it) or do I rip to FLAC for lossless audio but require extra client/server applications for ripping/transcoding to my non-PC devices. I plan to test out how well the various servers work in the near future but I guess in the meantime I'll just keep listening to my downloaded music and wait on ripping those CDs.

Friday, June 4, 2010

So Many Windows: Performance Bottleneck Diagnosing, Part 2

Before I started diagnosing any problems I thought I would give a try to transferring the same kind of files from my HTPC to the NAS rather than my laptop. My HTPC is running Windows Vista Home Premium 32-bit SP1 (up to date on patches, don't want SP2) and is only wired while my laptop is running Windows 7 Home Premium 64-bit (also patched to date). Transferring files netted me an average throughput of ~10.5 MB/s with peaks up to 11.5 MB/s. This is what I would be expecting, nearly maxing out the theoretical cap. I will take a closer look on the weekend to make sure I was not simply still getting wireless speeds when I wired the laptop. If not, then I may need to look into whether it is a 32/64-bit thing or if it is a Windows 7/Windows Vista thing.

Thursday, June 3, 2010

I feel the need for speed? Performance Bottleneck Diagnosing, Part 1

Having setup of the RAID array over the weekend and configuring my SAMBA settings so that my Windows machines had full read/write permissions on the shared media space, I happily started copying files to the NAS. Happily, that is, until I saw the transfer speeds.

I basically have 3 scenarios that will be applicable when copying data to from the server:
  1. Tree structures with many small files (image folders, MP3 folders)
  2. Single file or a folder with a few files that are large (> 1GB) but below my RAM cap (single TV episodes in MKV container, media disk copy with VOB/M2TS/EVO files)
  3. Single file that is larger than my RAM (> 4GB) (ISO rips, compressed BluRay/HDDVD MKVs)
Back to my disappointment, I was doing both scenarios 1 and 2 last night and couldn't believe my results. My first "test" was a large tree with ~7k folders each with a single image that came out to about 275 MB. The reported average throughtput was a staggeringly low 260 KB/s. I was doing this either way so I then copied a single season of Stargate Atlantis (20 episodes in MKV containers @ ~1.5 GB) and got a more respectable but still terrible average throughput of ~2.5 MB/s. I was copying over 802.11g so I had a theorectical cap of 6.75 MB/s. Maybe I needed to try wired and see what happens.

Connecting my laptop to my router (which is only 100 Mb and will be replaced with a Gigabit switch for my network backbone), I still saw the same results with the larger files but did not confirm that my laptop had switched to wired connection (stupid me). So now I am on a quest to find my bottlenecks and elimate them. My tests will be targeting my hard disks and network adapters themselves as well as my filesystem settings and network protocols. The inital tools I plan to use are hdparm, dd, ethtool and iozone. Once I start getting repeatable results, I will begin to elimate the causes of my problem. To that point, with my current router I expect to be near the theoretical 12.5 MB/s cap; once I get the new switch I would hope to be near the theoretical 125 MB/s cap.