Wandering Thoughts archives

2017-09-18

Sorting out the world of modern USB (at least a bit)

Part of thinking about new machines for home and work is figuring out what motherboard I want, and part of that is figuring out what I want and need in motherboard features. I've looked into how many SATA ports I want and what it will take to drive a 4K monitor with onboard graphics, so now I've been trying to figure out USB ports. Part of this is trying to understand the different sorts of USB ports that there are and what you can do with them.

(This would be easier if I'd kept up with all of the twists and turns in PC hardware standards, but I haven't.)

USB is a vast and complicated world, with both a set of signalling standards (the old USB 2.0, USB 3.0, and now USB 3.1 aka USB 3.1 gen 2) and a set of port shapes and sizes (the original USB-A and now USB-C) that may be combined in various ways. Fortunately I'm only interested in modern and non-perverse motherboards, so for me I believe that it breaks down this way:

  • old fashioned USB 2.0 ports (with black USB-A connectors) are too slow for disks but are (probably) fine for things like keyboards and mice. But I only need a few of these, and there's no need to have any USB 2.0 only ports if I have enough better USB ports.

  • USB 3.0 ports (often using blue USB-A connectors) are good enough for general usage (theoretically including disks) but are not the latest hotness. USB 3.0 is old enough that any decent modern (desktop) motherboard should really include a bunch of USB 3.0 ports. Even inexpensive H270 based motherboards have a number of them.

    USB 3.0 is not infrequently called 'USB 3.1 gen 1' in advertising and product specifications. This is technically correct but practically misleading, because it's not the type of USB 3.1 that you and I want if we care about USB 3.1.

  • USB 3.1 ports are either USB-C or USB-A, and you may need to look for things specifically described as 'USB 3.1 gen 2'. It's the latest hotness with the fastest connection speed (twice that of USB 3.0 aka USB 3.1 gen 1), but the more that I look the less I'm sure that this will matter to me for the next five years or so.

Then there is USB-C, the new (and small) connector standard for things. When I started writing this entry I thought life was simple and modern USB-C ports were always USB 3.1 (gen 2), but this is not actually the case. It appears not uncommon for H270 and Z270 based motherboards to have USB-C ports that are USB 3.0, not USB 3.1 (gen 2). It seems likely that over time more and more external devices will expect you to have USB-C connectors even if they don't use USB 3.1 (gen 2), which strongly suggests that any motherboard I get should have at least one USB-C port and ideally more.

(The state of connecting USB-C devices to USB-A ports is not clear to me. According to the Wikipedia page on USB-C, you aren't allowed to make an adaptor with a USB-C receptacle and a USB-A connector that will plug into a USB-A port. On the other hand, you can find a lot of cables that are a USB-A connector on one end and USB-C connector on the other end and advertised as letting you connect devices with USB-C with old devices with USB-A, and some of them appear to support USB 3.1 gen 2 USB-A ports. There are devices that you plug USB-C cables in to, and devices that basically have a USB-C cable or connector coming out of them; the former you can convert to USB-A but the later not.)

USB-C ports may support something called alternate mode, where some of the physical wires in the port and the cable are used for another protocol instead of USB. Standardized specifications for this theoretically let your USB-C port be a DisplayPort or Thunderbolt port (among others). On a desktop motherboard, this seems far less useful than simply having, say, a DisplayPort connector; among other advantages, this means you get to drive your 4K display at the same time as you have a USB-C thing plugged in. As a result I don't think Alternate Mode support matters to me, which is handy because it seems to be very uncommon on desktop motherboards.

(Alternate Mode support is obviously attractive if you have limited space for connectors, such as on a laptop or a tablet, because it may let you condense multiple ports into one. And USB-C is designed to be a small connector.)

Intel's current H270 and Z270 chipsets don't appear to natively support USB 3.1 gen 2. This means that any support for it on latest-generation motherboards is added by the motherboard vendor using an add-on controller chipset, and I think you're unlikely to find it on inexpensive motherboards. It also means that I get to search carefully to find motherboards with genuine USB 3.1 gen 2, which is being a pain in the rear so far. An alternate approach would be to get USB 3.1 gen 2 through an add-on PCIE card (based on information from here); this might be a lot less of a pain than trying to find and select a suitable motherboard.

(As for how many of each type of port I need or want, I haven't counted them up yet. My current bias is towards at least two USB 3.1 gen 2 ports, at least one USB-C port, and a bunch of USB 3.0 ports. I probably have at least four or five USB 2.0 devices to be plugged in, although some can be daisy-chained to each other. I'm a little surprised by that count, but these things have proliferated while I wasn't paying attention. Everything is USB these days.)

SortingOutModernUSB written at 00:27:30; Add Comment

2017-09-10

I failed to notice when my network performance became terrible

I've written about how I didn't notice how comparatively slow one of my machines became over time. I have now run into another excellent and uncomfortable illustration of this phenomenon; this time around, it was part of my home network performance quietly becoming rather terrible.

My current home Internet is generally around 15000 Kbps down and 7500 Kbps up; its speed is stable and solid. I also have a little GRE over IPSec VPN tunnel between my home and work Linux machines, and somewhat over a year ago I used it to do some graphics-intensive remote X work, which quite impressed me at the time. Unfortunately, at some time since then the performance of that GRE-over-IPSec VPN tunnel fell off a cliff. Today, my office machine can send my home machine data over it at only about 120 KB/sec; another machine on campus that's several network hops away from my office machine can manage only 4.7 KB/sec. Talking directly to my home machine without the GRE-over-IPsec tunnel, both can manage around 1800 KB/sec.

In one version of this story, I would now tell you how I didn't notice the decrease in performance. Looking back, that isn't what happened; instead, I noticed signs of the decrease but I casually blamed them on other causes. For instance, when rsyncing a backup copy of Wandering Thoughts to my home machine started being visibly slow, I thought 'oh, my disks must be slow'. When merely refreshing the front page of Wandering Thoughts involved a visible lurch due to the browser redoing layout as more of the page showed up, I assumed that either my browser was slow or the web server was slow (or both). In reality all of these had a single root cause, that being that I can only get 5 KB/sec of streaming TCP bandwidth from the web server.

(It was actually the slow rsyncs that caused me to start digging recently. Not only did things reach the point where it was actively irritating, but my office workstation did its own rsync at blazing speed, and I was now using SSDs at home anyway, so they shouldn't be slow. If I had a slow IO problem at home, I had real problems either with my SSDs or with ZFS, so I decided I'd better try to figure out what was going on. Eventually this got me check network bandwidth just in case, since I was increasingly ruling out everything I could think of, like disk IO or network latency.)

What interests me most is the psychology of all of this. I'm pretty sure that when problems started, I just assumed that they were inevitable and more or less beyond my control. Since I thought there was nothing that could be done, I didn't pay any real attention to things and I certainly didn't investigate. All of this is the result of sensible human decision-making heuristics, but these heuristics misfire every so often.

(And now I'm irritated with myself for not investigating much earlier, when I might have been able to file a bug report that gives a specific 'it was good here then became bad here' set of software versions. This is as irrational as ever, but humans are not rational creatures even if we like to pretend that we are.)

Sidebar: What I know about the situation so far

My home and office machines are both running Fedora 26, but this problem was present in Fedora 25 as well and perhaps in earlier Fedora versions. I'm pretty sure that it can't have been present when I did my trick with remote X, but that's more than a year ago, with Fedora 23.

The problem is specific to the combination of GRE over IPSec. I've tested IPSec alone and GRE alone (in their actual operating configuration), and both get the full 1800 KB/sec down that I'd expect. Only when I encapsulate my GRE tunnel in IPSec do things go wrong. Conveniently (or inconveniently), this means that the problem is entirely in the Linux kernel, so diagnosing this will probably be what they call 'fun'.

(My GRE tunnel has the same relatively low MTU whether it's inside or outside IPSec, and it's had that MTU for a very long time now.)

NotNoticingBadNetworkPerf written at 02:15:38; Add Comment

2017-09-09

Letting go of having an optical drive in my machine

For various reasons I'm finally getting somewhat serious about planning out a new PC to replace my current one, and this is forcing me to confront a number of issues. One of them is the question of an optical drive.

I've had a succession of PCs over the years, and from the start they've had at least one optical drive (initially CD-ROM drives and then DVD drives). Back in those days it was somewhere between a required feature (for reading CD-ROMs and playing music) and a slam-dunk 'why not' thing. For example, look at what I said for the last machine:

I definitely want a DVD reader and the extra cost for a DVD writer is trivial, even if I haven't burned any DVDs at home over the past five years that I've had a DVD writer in my current home machine.

That emphasis is foreshadowing. It's been five years since I wrote that, and in those five years I don't think I've actually used my current home machine's DVD drive more than a handful of times (and I definitely haven't burned anything with it). In fact right now my DVD drive has been broken for more than a year and I haven't missed it.

(At work, I've burned a handful of DVDs over the years because we still do Ubuntu installs from DVDs for various reasons.)

Under normal circumstances I would put some sort of optical drive into my next machine as well, but unfortunately the circumstances are not normal (as far as I know). I now want to be able to connect at least six hard drives to my machine (although I expect to normally have only four), and modern optical drives are all SATA drives and so consume a SATA port on your motherboard. The current generation of Intel chipsets provide at most 6 SATA ports, which means that motherboards with more than 6 SATA ports are much less common and are supplying those extra SATA ports through some additional controller chipset that may or may not work really well with Linux.

(I have a jaundiced view of add-on controller chipsets of all sorts. Even server vendors have cheaped out and used chipsets that just didn't work very well, such as old nVidia Ethernet chipsets.)

In addition, not putting an optical drive in my next machine doesn't mean going without an optical drive at all, because external optical drives generally work fine, both for reading and for writing (and probably also for things like playing music and watching movies). At work we've mostly given up on getting new servers with optical drives unless they're basically free; instead we have a collection of external DVD drives that we move around as needed.

All of this is completely sensible and logical, but it's still something I've had to talk myself into and it's going to feel weird and a bit unnerving to have a machine without an optical drive. It feels like I'm going to be traitorously giving up on the old optical disc media that I have, even if I have an external drive that should be perfectly good for working with them.

(Humans are not entirely rational creatures, myself included, and so this entry is partly to talk myself into this.)

Sidebar: Blu-ray drives aren't a consideration right now

The short version for why not is that Linux can't really play Blu-ray discs. I mean, yes, it's theoretically possible, but reading about it doesn't inspire me with any confidence for its long term viability or general usability. For the immediate future I expect that if I want to view Blu-ray media, I'm going to need a standalone player with all of the annoyance that that implies.

Blu-ray discs don't have enough data capacity to deal with my backup issues, which are going to call for external hard drives for the foreseeable future.

LettingGoOpticalDrive written at 01:10:46; Add Comment


Page tools: See As Normal.
Search:
Login: Password:
Atom Syndication: Recent Pages, Recent Comments.

This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.