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.

No comments:

Post a Comment