Fang-Pen Lin, self-described “one-person-army software program engineer,” has put collectively a low-cost high-performance >10Gbps mesh community — by connecting mini-PCs collectively in a cluster with USB4 interconnections, requiring beneath $50 in cables.
“After some analysis, trial, and error, I lastly constructed and ran a comparatively low-cost cluster with a high-speed full-mesh interconnected community,” Lin explains of the mission. “Probably the most attention-grabbing half is that the networking relies on a USB4 Ethernet bridge as an alternative of a standard Ethernet swap and cables. I examined the community pace, and it could hit 11Gbps. The price of making the community is just $47.98!”
These three mini-PCs are configured as a cluster speaking over a intelligent USB4 mesh community. (📷: Fang-Pen Lin)
Initially, Lin had checked out utilizing conventional 1U servers and a couple of.5-gigabit-Ethernet networking for the mission. The servers had been discounted in favor of compact miniaturized desktop PCs, providing quieter operation and decrease operating prices, however the price of the {hardware} required for the two.5-gig-Ethernet spine — which might require a brand new high-speed Ethernet swap — was off-putting.
“Whereas I used to be debating which swap to purchase, doing my analysis concerning the model, value, and my necessities, I spotted, wait a minute, there are two USB4 ports on the machine,” Lin explains. “In idea, it might present as much as 40Gbps pace. Who cares about 2.5G[bps]? That is 40Gbps we’re speaking about right here! Contemplating the cash spent on a 2.5G Ethernet router plus some Cat6 Ethernet cable, why not simply make a full-mesh community with USB4 cables?”
Utilizing $50 in cables complete, Lin set about connecting the machines collectively over their USB4 ports — profiting from the flexibility to configure an Ethernet bridge over a USB port, making it seem to the system as a direct Ethernet connection to a second laptop. The outcomes fell in need of the theoretical 40Gbps most out there over USB4, however had been greater than 4 occasions sooner than 2.5-gig-Ethernet — benchmarking at 11.8Gbps sustained throughput.
Lin has offered a pattern NixOS configuration for establishing your individual near-12Gbps USB4 community. (📷: Fang-Pen Lin)
Lin notes that the mesh community solely works as a result of there are two USB4 ports per system and three programs complete. “What if there are greater than three nodes,” he asks. “I recall studying some networking books that talked about attention-grabbing historical community constructions a very long time in the past, corresponding to ring topology networks or daisy-chain networks.
“There are lots of drawbacks to these community constructions, and community gear is fairly low-cost, so these are uncommon these days. With a restricted variety of USB4/Thunderbolt ports and comparatively costly cable, possibly it is smart to assemble a community like the traditional ones.”
Lin’s full write-up is obtainable on his weblog.