Saturday, July 18, 2015

A Spectrum of Mass Storage Performance

Every time I get a new computer or external drive, I run disk performance tests.  Whether the results elate or depress me, I forget the details within a week.  (Well, at least until I got my first SSD, which I don't think I'll ever forget.)

I just installed a new Samsung 850 Evo SSD (mSATA) in my desktop rig, and I decided to do things differently this time.  I not only ran performance tests on the new drive, but also on various machines and drives I've had for some time.  Having learned a few things along the way, I've decided to publish the results.  That will compensate for my dodgy memory and maybe help someone out who wants to know something about performance.

The tests were run using iometer 1.1.0.  I only included my three Windows machines because I use them most often.  If I run any tests on my MacBook Air or Chromebook in the future, I will publish them, too.

The performance of each drive was measured with four tests: 4k random read, 4k random write, 256k sequential read, 256k sequential write.  All tests were run with a queue depth of 32.

The three machines on which I ran tests are summarized in the following table.

Table 1: Machines Tested
Computer NameCPUChipsetOS
Dell Inspiron 660Core i5-3340B75 Express (Intel 7 Series/C216)Windows 8.1 x64
Acer Aspire 4830TGCore i5-2430MHM65 Express (Intel 6 Series/C200)Windows 7 x64
HP Stream 13Celeron N2840Integrated (Pentium N and J series)Windows 8.1 x64

Before you head elsewhere on the Internet because these machines range from pedestrian to lame, understand that drive performance is largely independent of the processor and increasingly of the chipset.

The following table states the test results.

Table 2: Test Results
MachineDrive4k random read (IOPS)4k random write (IOPS)256k sequential read (MBPS)256k sequential write (MBPS)
Dell 660Seagate Barracuda 1 TB SATA III (boot)374.45311.18127.95127.7
Dell 660MyBook 3.0 1 TB USB172.1295.4172.4572.55
Dell 660SanDisk Extreme USB 64 GB26871372134.79211.71
Dell 660WD Caviar 2500JS 250 GB SATA II in Cable Matters UAS dock84.07188.3815.3930.31
Dell 660Samsung 850 Evo mSATA 500 GB via Crucial USB adapter42097622218.16235.58
Dell 660Samsung 850 Evo mSATA 500 GB in Cable Matters UAS dock3362135783450.55438.11
Dell 660Samsung 850 Evo mSATA 500 GB (boot)9748286242504.77505.92
Dell 660Seagate Barracuda 1 TB SATA III in Cable Matters UAS dock136.2252.81130.81130.59
Dell 660Seagate Barracuda 1 TB SATA III376.550.85130.8130.33
Acer 4830TGCrucial M500 480 GB mSATA (boot)8346359315304.69411.75
Acer 4830TGSanDisk Extreme USB 64 GB2020862132.06107.44
HP Stream 13Samsung MBG4GC 32 GB eMMC (boot)6129120092.0440.63
HP Stream 13SanDisk Extreme USB 64 GB25291372132.99189.66

OK, that's a lot of data to ingest. Some graphs might help, but providing some analysis is better still.

SSD is fast.  Even using a slower physical interface (SATA instead of PCIe) and a slower software interface (AHCI instead of NVMe) than the fastest available, SSD provides almost 30 times the IOPS of my fastest mechanical drive with almost 4 times the throughput.  The throughput is nice when I move large video files around, but the IOPS substantially improve my moment-to-moment computer use as a programmer.

Especially when using SSD, the hardware used to bridge to USB matters.  There are two tests of the Samsung SSD attached to the Dell 660 via USB.  One uses an adapter I got from Crucial when I installed an SSD in the Acer, the other a Cable Matters dock I bought to read 3.5" drives I have from older machines.  The dock uses an ASM1053E chip, which supports the UAS protocol.  It gets double the throughput and 3-4 times the IOPS compared to the (older) Crucial adapter.  I don't know how much of that difference is UAS as opposed to better USB or SATA throughput within the chip, but keep in mind when you buy a dock, enclosure or adapter cable that the chip makes a difference.

USB storage is faster on Windows 8.1 than Windows 7.  The SanDisk thumb drive is the only disk I tested on all three machines.  The performance on the two Windows 8.1 machines is impressively similar, considering the difference in compute power between the two.  Meanwhile, the Windows 7 machine lags on all tests except read throughput.  Although I attribute the difference to the OS, I will have to admit that the Windows 7 machine is the oldest, running a Sandy Bridge processor and corresponding chipset.  There is the possibility that the silicon in that machine is inferior.

For mechanical disks, fragmentation matters.  There are three tests of the Seagate Barracuda in the Dell 660.  The test results for that disk as the boot disk are different from the results for that disk attached via USB and attached via SATA but not the boot drive.  Between that first test and the other two, I defragmented the drive.  That increased the throughput for both of the later tests.  Strangely, it also killed random write performance.

Despite poor throughput, eMMC drives provide a good user experience.  OK, the tests alone don't establish this, at least the user experience part.  The throughput is bad.  Not as bad as the old WD Caviar I connected via USB, but the worst thing I tested otherwise.  However, in a machine running Windows 8.1 in just 2 GB of RAM (and a Bay Trail Celeron CPU), the user experience is surprisingly good.  I attribute it to the IOPS.  In 2 GB of RAM, Windows is going to page.  A lot.  The extra IOPS reduce the perceived lag, especially compared to other budget notebooks you can find at Best Buy or Staples running slow mechanical drives.

Tuesday, February 4, 2014

Making Peace With Comcast Triple Play

I have finally given in.  After years of refusing to sign up for a Comcast Triple Play package, I have consumed the Kool Aid.  And I have to admit, I am happy, but it took a while to get here.

My objection to the Triple Play is Comcast Voice, or more specifically, the loss of control over my equipment as a Voice customer.  I first got internet from Comcast July 3, 1998 (at a then life-changing download speed of 256 kbps).  I quickly understood the economics of renting a cable modem from Comcast and bought my own.  I have upgraded several times and worked through several routers as well over the years.  Besides saving money, it is nice to control my own upgrade destiny.

A few days after signing up for my new package, I received the "wireless gateway" that Comcast wanted me to use, a Technicolor TC8305C.  Technicolor?  Really?  Not even Arris?  I confirmed through Comcast that the device supports DOCSIS 3.0, but was immediately disappointed to see that it does not support IPv6.  Powering up the unit and connecting to a laptop only worried me further.  Only a 2.4 MHz radio, no guest network and very limited firewall configuration.  It was also unclear whether the DHCP server supported address reservation.

Oh well, I figured, I'll just disable the router and use the device as a telephony modem.  No such luck.  The bridge mode cannot be enabled by the user.  Several people reported on Comcast forums or DSL Reports having problems getting Comcast support to enable bridge mode, and that the modem left bridge mode after being power cycled.

Based on posts indicating that Comcast allowed customers to own telephony devices, I ordered an Arris TM822G through Amazon.  I took the Technicolor device to my local Comcast office and told them I was going to use my own modem.  I was told that, unlike the cable modem, my Comcast franchise did not allow consumers to purchase and use their own telephony device.  After some discussion about the inadequacies of the router in the device, the service rep brought out an assortment of telephony modems that Comcast rented.  The only one that was DOCSIS 3.0 was a Ubee DVM3203B.  Ubee?  I thought Technicolor was bad.

My options having run out (other than dropping the Triple Play before even activating it), I took the modem home.  I spent a little under an hour trying to activate it at comcast.com/activate.  The DNS server Comcast configured did not even resolve comcast.com.  Yikes!  I tried IP addresses and using curl or telnet to connect, but had no success.

Calling 1-855-OK-BEGIN connected me to a young woman who was confident we'd be up and running in ten minutes.  Let me assure you, it was more like thirty minutes.  Things started out smoothly, with me reading MAC numbers off the modem and us running through power cycling the modem.  Multiple times the modem light sequence never got to the expected state.  When we finally got the lights the way they were supposed to be, my phone had no dial tone and my computer could not get initialized via DHCP.  The young woman did something to "activate" the phone line, and one last power cycle got me both a dial tone and an internet connection that allowed me to browse.

Before I forget: I had to wade through many posts with incorrect information before I found that the username/password to access the cable modem status (at the standard 192.168.100.1) is admin/cableroot.  I was reassured to see that all eight download channels and three of four upload channels were active.

With that done, I expected to swap in my router for my laptop, power cycle the router, and be up and running.  No such luck.  Only after multiple power cycles of both the modem and the router did the router finally get an IP address.  It was a 50.x.x.x instead of the 71.x.x.x that I had had for years, but who cares about the public IP address when you are finally up and running again.

Well, up and running is an overstatement.  Browsing felt like I was working on an old dial-up modem.  I had trouble even connecting to speedtest.net, and when I did I got 0.3 Mbps download, while the upload test never finished.  I checked the modem status and the signals were all good.  Download powers were between 2 and 5 dBmV, with SNR over 40 dB.

I power cycled everything again.  This time my WAN IP address was back to its old 71.x.x.x, but speedtest readings were still horrible.  I kept running about every minute while trying to figure out what could be wrong.  Finally, about twenty minutes later, speedtest results were back to about 58 Mbps download and 11 Mbps upload, just what they were before the equipment change.  I don't know whether the slowness was coincidental or the result of changing the modem, but I was happy to have my old performance back.

It's about a month later, and the modem has worked without problems, both internet and voice.  My WAN IP address switched back to 50.x.x.x soon after the first day, which caused a couple of problems with work connections where IP addresses are white listed, but those issues were quickly resolved.

Wednesday, April 11, 2012

Reviving Twonky Media on WD My Book Live

I have a 2 TB WD My Book Live NAS drive for storage of backups and media. I love that I can write to it faster (about 45 MB/s using robocopy) than a local USB 2.0 external drive (under 30 MB/s). However, I have loathed the device, too, since the music, video and pictures I stored on it were not showing up in DLNA client software (e.g. my PS3, NetGear MP-101, Macs and PCs). The server was visible to all, but it appeared to have no media files to serve.

I confirmed the basics of the configuration multiple times. Twonky Media was enabled. Each share was flagged as sharing all media file types. I restarted the service, rebuilt the database, rescanned the device. Nothing changed. After googling, I discovered I could connect to the NAS box with ssh. There were many recommendations to do this, rename two files, then restart Twonky Media. I did so with no change in behavior. However, after a little digging, I discovered a problem with the Twonky Media configuration. Once I changed that, everything started working.

The steps I followed were:

Login to the MyBook Live at http://mybooklive/UI/login
Enable SSH at http://mybooklive/UI/ssh
Connect via ssh (username = root, password = welc0me)
cd /CacheVolume/twonkymedia
vi twonkymedia-server.ini
change contentbase=/ to contentbase=/shares
save and exit
restart twonky at http://mybooklive:9000/config under Maintenance

Depending on your network, browser and ssh client, you may need to use a numeric IP address rather than "mybooklive". If you use Windows and don't have an ssh client, I recommend putty, which is what I used.

Sunday, April 3, 2011

Why Is Flash Still Hogging My CPU?

Flash has had hardware acceleration "forever", or at least as long as I can remember. I suppose it did not back when it was always called Shockwave Flash, but in those days there probably was not much hardware acceleration to take advantage of.

The purpose of hardware acceleration is to allow Flash to do its job while using less CPU, instead letting the GPU hardware do some of the work. On a computer with a slower CPU, this may be the difference between getting smooth video or something closer to a choppy sequence of poor quality still photos. For more modern computers, this should allow the machine to produce smooth, high quality video while allowing the CPU to work on other things.

Flash 10.1 upped the ante by adding hardware decoding, which means the work of decompressing highly compressed video formats like H.264 could be performed by GPUs with this capability built in. The 10.2 iteration of Flash introduced Stage Video, which "helps websites deliver best-in-class video across screens and browsers by enabling access to hardware acceleration of the entire video pipeline."

After upgrading to Flash 10.2, I was left asking "why is Flash still hogging my CPU?" Watching March Madness On Demand from my old-but-serviceable everyday desktop (Athlon 64 X2 3800+, Windows XP SP3, GeForce 8400GS graphics), for example, pinned the CPU between 90 and 100%. Other video sites like ABC and Hulu ran at about 50% CPU, effectively monopolizing one of the two CPU cores.

I wondered whether I needed to upgrade to a newer, but still entry level, video card like a 220, 240, 430 or 440, or whether the DirectX 9 limitation of Windows XP was a problem. However, when I checked out Stage Video on Adobe's site, I ran the examples and found that 720p video scaled to full screen could run at under 15% CPU. The Big Buck Bunny demo is especially cool, as it allows you to turn Stage Video on and off to compare CPU usage.

After a little thought, my suspicion is that sites like ABC and Hulu use Flash plug-ins or other code that prevents the Stage Video pipeline from working, probably to implement digital rights management (DRM). Maybe the problems are related to the way in which the videos are encoded or streamed. In any case, other sites for which this seems to be true include Crackle, The WB, PBS and CBS.

Tuesday, February 1, 2011

Flash At Last For My Archos 32

I got an Archos 32 Internet Tablet for Christmas.  It is not really a tablet; I call it my Android Touch because its form factor and primary usage profile are similar to the iPod Touch.  My objective was to have an Android device to verify the functionality of apps I develop  The specs are reasonable for the price and Archos released a firmware upgrade in December that included Froyo, also known as Android 2.2.  I have to admit, though, that I was jealous of my son for whom I bought an Archos 70, which has a truly beautiful multi-touch screen.

The downside of having a non-phone device is that it is not Google certified and out of the box does not have Google apps such as Gmail, YouTube, and most importantly, the app Market.  I finally got around to finding a way around this and was successful enough to have Flash 10.1 running within minutes.

The magic is gapps4archos.apk.  A link for downloading it is in the forums on archosfans.com.  Because the forum post specifically talks about firmware 2.0.54 and I had already upgraded to 2.1.04, I did not have high hopes that the app would work.  Regardless, I downloaded the file to my PC. After turning off application debugging via USB on my Archos 32, I connected the USB cable between it and the PC. The Archos showed up as the E: drive in Windows. I copied the downloaded file from the PC to E:, ejected the E: drive in Windows, then unplugged the device from USB. I opened the Files app on the Archos home screen, found the file gapps4archos and tapped it. (Note that my device's application settings allow apps from unknown sources.)  In the app, I clicked the button to install Google apps. When that was done, I rebooted the Archos (held the power button down, choose Power Off, then Reboot). When it came back up the home screen had Gmail, YouTube, the app Market, and others.

I first ran Gmail, entered my Google account information, and was soon synchronizing data and settings between the Archos and Google. I then started the Market app, searched for "Adobe Flash" in the market, and chose to download Flash 10.1.  When that download was done I started the Browser app and went to addictinggames.com.  Success.  To test Flash video streaming, I went to crackle.com and was watching a trailer with just a few taps.  I was able to rotate to landscape orientation and push the Flash player to full screen mode.  OK, on a 3.2" screen, it was not an amazing cinematic experience, but it was extremely gratifying nonetheless.

Wednesday, July 7, 2010

What mlb.tv Revealed to Me About My Router Configuration

I recently re-subscribed to Major League Baseball's video streaming service mlb.tv.  I used it last August and September to follow pennant races and had generally good results using my MacBook connected via wi-fi both at home and while traveling.

This year, however, my experience was immediately horrible.  I could not get past the bandwidth/quality check that happens after the media player browser window is launched.  I verified that I had the latest versions of the Flash Player and NextDef plug-in.  I rebooted.  I tried Safari, Firefox and Chrome.  I enabled all cookies and pop-up windows. The results remained the same.  When I checked network traffic in Activity Monitor, I saw throughput peak at about 35 kBps.

To determine whether the behavior was specific to the MacBook, I tried to connect from my desktop PC.  Nothing new.  I then downloaded the mlb.tv application to my PS3.  I got some sound and a very halting video stream.  That told me very little, but at least was consistent with the small amount of network traffic I had observed.

Very late last night I resumed the investigation from my PC.  I was able to get sound and some video.  Network throughput was higher, 50-150 kBps.  I used the sysinternals Process Monitor to determine the server to which Chrome was connecting, which turned out to be hosted by Akamai rather than MLB itself.  I was surprised, however, to discover that tracert showed the server connected to Level3's network in Los Angeles.  Akamai's service should connect me to a nearby server; I am in Philadelphia and served by Comcast.

Believing that Akamai uses DNS locality to pick a server, I checked the DNS addresses in my router.  Running tracert for these showed that they were both on the Level3 network in Los Angeles.  My past experience has been that DNS servers should be local ones specified by Comcast when the router does its DHCP initialization.

Looking through the configuration for my D-Link DIR-825 router, I discovered that an option labelled Enable Advanced DNS Service was checked.  I unchecked it and rebooted the router.  The router came up with DNS addresses that I recognized as Comcast (68.x.x.x).  In fact, they matched the Philadelphia addresses listed at http://dns.comcast.net/dns-ip-addresses.php.  I immediately fired up mlb.tv, got an excellent video stream, and saw my network traffic vary from 0 to 1.1 MBps.  All is well on my PS3 and MacBook, too.

I don't recall checking the Enable Advanced DNS Service option.  It may have been added or checked during a firmware upgrade.  Had I known that it would override the DNS server information provided by Comcast and instead use a DNS server across the country, I certainly never would have selected it.

Thursday, April 1, 2010

Getting Good Results With Vonage

Frequent service outages combined with long resolution times from my land line provider (Verizon) finally convinced me to try Vonage. The current Vonage deal ($15/mo for the first 6 months) didn't hurt, either. I had some problems getting started, but after a few tweaks, my service is running smoothly.

My home (Ethernet) network uses a D-Link DIR-825 router with a Motorola SB5100 to connect to the Internet via Comcast. Besides some switches used to distribute Ethernet throughout the house and within my home office, I have a VOIP device connected to the router that I use for work. My experience with that device has been great (plugged it in, flashed it, and it worked), but I was worried that I would not be able to get two VOIP devices to play nicely on my network.

I signed up for Vonage through their web site, moving my land line phone number to the Vonage connection. It was 7 days before the number was moved.

Vonage provides a device they call V-Portal for free as part of establishing service with them. The installation instructions place this between the cable modem and existing router. I reluctantly proceeded this way and quickly discovered that the V-Portal includes an embedded router and firewall.

Within 15 minutes I had come upon a deal breaker. I use PPTP VPNs to connect to various networks for work. Going through my D-Link and the V-Portal, I was able to establish VPNs, but within 2-3 minutes the VPN was dropped.  This is presumably a double-NAT issue, since data was traversing two routers.

My response was to reconfigure my setup to have my D-Link router connected to the cable modem with the V-Portal plugged into an Ethernet port off of that. My VPNs stopped dropping and the V-Portal still worked with my phone. The only negative of this configuration is that I had to connect a computer to the LAN port on the V-Portal to access the web management interface and enable management through the WAN, since the WAN interface on the V-Portal is the one that is accessible from my home network.

With the networking side appearing to work, I prepped the home phone network for Vonage. This simply meant disconnecting the network from the provider interface. In other words, I removed the cable coming from outside the house from the interior connection junction for my phones. This put all the phones in the house back in business.

One remaining problem slowly became apparent. During a call, audio on our side of the call would go dead for one to several seconds. The people to whom we were talking claimed no similar problem.

The most likely culprit seemed to be dropped outgoing packets. My initial cynical conclusion was that Comcast somehow determined these were Vonage VOIP packets and intentionally dropped them.

Looking for a solution within my reach, my attention turned to the D-Link router. It is a well regarded product with many features, any of which could be causing a problem. Browsing the options within the Advanced tab of the configuration application yielded many possible culprits and an equal number of promising options for a solution.

My first forays were changes to the WAN Shaping configuration, all with no efficacy. My attention then turned to the QOS engine. When I looked at Internet sessions, I could see that connections for both my work VOIP and Vonage devices had higher numerical priority values than other connections. Reading the on-line help indicated that lower numerical priority values were actually given higher priority. That sounded wrong (VOIP should have higher priority). I considered setting up a rule to force a lower numerical priority for Vonage, but instead simply disabled the QOS engine. Based on our experience since, that seemed to be the ticket: no more audio dropping during calls. Having QOS turned off has not adversely affected on-line Call Of Duty play in any noticeable way, either.