{"slug": "six-gpus-on-one-x16-slot-r9700s-and-rtx-3090s-behind-a-pcie-switch", "title": "Six GPUs on One x16 Slot: R9700s and RTX 3090s Behind a PCIe Switch", "summary": "A builder running an ASUS TUF Gaming X570-Plus with a Ryzen 9 3900X and 128 GB of RAM put six GPUs on the board's single CPU-wired x16 slot behind a Broadcom PEX88096 PCIe switch card: four AMD Radeon AI PRO R9700s with 32 GB each and two RTX 3090s with 24 GB each, all at gen4 x8. On the four R9700s with tensor parallelism (TP4), Qwen3.8-27B prefills a 32k-token prompt at about 4,700 tokens per second and a 234k-token prompt at 3,340 tokens per second, while sixteen clients receive 601 tokens per second of output between them. The build runs ROCm 7.2.4 and CUDA side by side on Debian 13 (kernel 7.0.6-2-pve), with Resizable BAR disabled in BIOS and a custom kernel module, gpu_rebar_layout, assigning 32 GB BARs to just the four R9700s.", "body_md": "# Six GPUs on One x16 Slot: R9700s and RTX 3090s Behind a PCIe Switch\n\nI put six GPUs on the one x16 slot of an ASUS TUF X570-Plus, a consumer board with a Ryzen 9 3900X and\n128 GB of RAM. Four are AMD Radeon AI PRO R9700s with 32 GB each, and two are the RTX 3090s from [my PCIe\nsplitter post](https://doug.sh/posts/pcie-splitter-rtx-3090/), one ROG Strix and one Founders Edition. They all sit\nbehind a Broadcom PEX88096 PCIe switch card, with ROCm and CUDA side by side on one Debian 13 host.\n\nOn the four R9700s, split four ways with tensor parallelism (TP4), Qwen3.8-27B prefills a 32k-token prompt at about 4,700 tokens per second and a 234k-token one at 3,340, and sixteen clients get 601 tokens per second of output between them.\n\n| Part | What’s in the box | \n|---|---|\n| Board | ASUS TUF Gaming X570-Plus, BIOS 5044 | \n| CPU and RAM | Ryzen 9 3900X, 128 GB | \n| Switch | Broadcom PEX88096 card, gen4 x16 to the CPU | \n| GPUs | 4x Radeon AI PRO R9700 32 GB, 2x RTX 3090 24 GB, gen4 x8 each | \n| OS | Debian 13, kernel 7.0.6-2-pve | \n| R9700s | ROCm 7.2.4, radiance 1.4.0, Qwen3.8-27B MXFP4, TP4, P2P on | \n| 3090s | NVIDIA 580 open module, vLLM 0.28, Swift-1.5 W4A16, TP2, MTP k=3, KVarN, P2P off | \n| Display | GeForce GT 710 in a chipset slot, not one of the six | \n\nThankfully, I got all of this hardware before it doubled in price, again.\n\n## The PCIe switch and the topology [🔗](#the-pcie-switch-and-the-topology)\n\nThe switch card came from [eBay](https://www.ebay.com/itm/136917131125) and goes in slot 1, the slot wired to the CPU. The board’s\nother full-length slot hangs off the X570 chipset and runs at x4 at most,\nand the chipset shares its own link to the CPU with the USB, SATA and everything else on it. Six GPUs\nbehind that would be fighting the rest of the board for four lanes.\n\nIn slot 1, the CPU runs one gen4 x16 link to the switch and the GPUs enumerate behind it, so the board doesn’t need a bifurcation setting.\n\nEach GPU gets its own gen4 x8 link that ends at the switch. The R9700s are on a group of four ports on\nbus `11`, and the 3090s on a group of two on bus `0d`.\n\nI went with a switch over another riser because a riser can’t get six GPUs out of one slot. Bifurcation\nsplits an x16 slot into at most four x4 links, while the switch gives every card its own x8. It also lets\nthe R9700s talk to each other directly, peer-to-peer (P2P) ([bifurcation vs PCIe switches](https://doug.sh/posts/pcie-bifurcation-switches-retimers/)). All four copying at once moved\n54.7 GB/s, about twice the roughly 28 GB/s the x16 uplink carries one way, so that traffic never leaves the switch.\n\n## BIOS settings [🔗](#bios-settings)\n\nIn the BIOS: CSM off, Above 4G Decoding on, and Resizable BAR off. A BAR is the window the CPU uses to reach a card’s memory, and Resizable BAR lets it cover all of it, so turning it off is an odd setting for a box built around large BARs. With it on, the board stopped at the white VGA light. To turn it back off, I had to unplug a 3090 just to get into the BIOS.\n\nThe BIOS can only turn Resizable BAR on for every card or none, and with 128 GB of RAM it can’t fit six\n32 GB BARs. Linux sizes them instead, with a small kernel module, `gpu_rebar_layout`, that runs from the\ninitramfs before any GPU driver loads. It gives just the four R9700s their 32 GB BARs and works around a\nLinux 7.0 bug that sized the switch’s window too small for them. The module and the bug have\n[their own post](https://doug.sh/posts/gpu-bars-behind-a-pcie-switch/).\n\n## Kernel command line: BARs, gpu-unlock, BACO and ACS [🔗](#kernel-command-line-bars-gpu-unlock-baco-and-acs)\n\n```\niommu=pt\npci=disable_acs_redir=0000:11:00.0;0000:11:08.0;0000:11:10.0;0000:11:18.0\ngpu_rebar_layout.ids=1002:7551\ngpu_rebar_layout.drop_gpu_audio=1\ngpu_unlock.targets=all\namdgpu.runpm=0\n```\n\n`iommu=pt` keeps the IOMMU on in passthrough mode, which is how the switch and P2P were tested.\n\n`gpu_rebar_layout.ids=1002:7551` tells the module which cards to resize, and\n`gpu_rebar_layout.drop_gpu_audio=1` removes the GPUs’ HDMI audio functions. The module is on GitHub as\n[gpu-rebar-layout](https://github.com/dougcalobrisi/gpu-rebar-layout).\n\nThe real fix for the window-sizing bug is a patch series on linux-pci. I tested it on this box and sent a Tested-by to the mailing list, which was an experience in itself. Even with it merged, this board would still need the resize and a rescan before the GPU drivers load.\n\n`gpu_unlock.targets=all` tells [gpu-unlock](https://github.com/Zagitta/gpu-unlock) which cards to unlock,\nhere the two 3090s. It removes the GeForce half-rate cap on tensor math with FP32 accumulation and has to\nrun before the NVIDIA driver binds, so it’s in the initramfs and loads after my module.\n\n`amdgpu.runpm=0` keeps the R9700s out of BACO, the low-power state they drop into at idle, after one build of my module lost\nall four cards to a BACO hang.\nThe cards no longer power down at idle.\n\nACS (Access Control Services) redirect forces peer traffic between switch ports up to the CPU’s root port. `pci=disable_acs_redir=` turns\nit off on the four R9700 ports so the switch routes their traffic locally, at the cost of isolation\nbetween those cards ([what a switch\ncosts](https://doug.sh/posts/pcie-bifurcation-switches-retimers/#what-a-pcie-switch-costs-bar-space-the-uplink-acs-and-power)).\n\nIf a boot goes wrong, press `e` at the GRUB menu and delete `gpu_rebar_layout.ids=` and\n`gpu_unlock.targets=` for that boot. Without them both modules do nothing. Every boot also logs two\n`can't assign` lines, for a bridge window on `0d:18.0` and for the first 3090’s ROM. They’re harmless:\nthe 3090 doesn’t need its ROM, and every real BAR gets assigned.\n\n## The NVIDIA driver [🔗](#the-nvidia-driver)\n\nThe 3090s run NVIDIA’s stock 580 open module. The community-patched driver that turns on P2P for GeForce\ncards needs large BARs, and these 3090s kept their 256 MB ones, so it has nothing to work with here. When\nI tried it anyway, it hung a card on the first peer copy. The stock driver is also what [gpu-unlock](https://github.com/Zagitta/gpu-unlock) is\nbuilt for. On it, `nvidia-smi topo -p2p r` shows `CNS` (chipset not supported) between the 3090s, and copies go through host memory.\n\n## The R9700s: radiance at TP4 [🔗](#the-r9700s-radiance-at-tp4)\n\nThe R9700s run [radiance](https://codeberg.org/StillDeadcode/radiance) 1.4.0 on ROCm 7.2.4 with Qwen3.8-27B in MXFP4, at TP4, with a\n262,144-token context and an FP8 KV cache, at a 250 W power cap per card.\n\nIn the concurrency test each client sends a 1,024-token prompt and gets 512 tokens back. One client gets 151.1 tokens per second, and sixteen get 601.1 between them, with a median time to first token of 2.18 seconds and a worst case of 3.49. A single request decodes at 180 to 394 tokens per second after the first token, depending on what it’s writing.\n\nTurning P2P off roughly halves the 16-client total, which [the P2P post](https://doug.sh/posts/gpu-p2p-tensor-parallel/)\ndigs into.\n\n| prompt, one request | prefill tok/s | time to first token | \n|---|---|---|\n| 2k | 4,562 | 0.44 s | \n| 8k | 4,651 | 1.68 s | \n| 16k | 4,730 | 3.30 s | \n| 32k | 4,674 | 6.67 s | \n| 64k | 4,418 | 14.10 s | \n| 128k | 3,973 | 31.35 s | \n| 234k | 3,340 | 69.92 s | \n\n## The 3090s: vLLM at TP2 [🔗](#the-3090s-vllm-at-tp2)\n\nThe 3090s run the same vLLM 0.28 image as in the splitter post, at TP2 with P2P off, multi-token prediction (MTP) at k=3 and the KVarN cache, serving Swift-1.5, a W4A16 quant of Qwen3.8-27B (4-bit weights, 16-bit activations). With gpu-unlock on, a 10.8k-token prompt prefills at about 2,390 tokens per second, and decode runs at 67 tokens per second for one stream and 400 for eight.\n\ngpu-unlock makes vLLM prefill 13 to 20% faster with no clear decode gain, more in [the gpu-unlock\npost](https://doug.sh/posts/gpu-unlock-rtx-3090/).\n\n*I had help with this one. Claude wrote the module with me, ran the commands and benchmarks\non the box over SSH, and helped me draft this post. I did the physical work, read all the words, checked\nthe numbers, and rewrote anything that sounded like a chatbot, so the mistakes are mine.*\n\n## Sources [🔗](#sources)\n\n- [radiance](https://codeberg.org/StillDeadcode/radiance) , the inference engine on the R9700s\n- [gpu-unlock](https://github.com/Zagitta/gpu-unlock) , the kernel module that removes the GeForce half-rate tensor cap on the 3090s\n- Linux [kernel-parameters.txt](https://github.com/torvalds/linux/blob/master/Documentation/admin-guide/kernel-parameters.txt) , the`pci=disable_acs_redir` entry", "url": "https://wpnews.pro/news/six-gpus-on-one-x16-slot-r9700s-and-rtx-3090s-behind-a-pcie-switch", "canonical_source": "https://doug.sh/posts/six-gpus-one-x16-slot/", "published_at": "2026-11-08 15:00:00+00:00", "updated_at": "2026-11-23 03:14:51.215994+00:00", "lang": "en", "topics": ["ai-infrastructure", "ai-chips", "large-language-models"], "entities": ["ASUS TUF Gaming X570-Plus", "AMD Radeon AI PRO R9700", "Nvidia RTX 3090", "Broadcom PEX88096", "Ryzen 9 3900X", "Qwen3.8-27B", "ROCm 7.2.4", "Debian 13"], "also_reported_by": [], "takeaway": "A Broadcom PEX88096 switch gives each of six GPUs its own gen4 x8 link from one x16 slot, and four R9700s in TP4 prefilled a 32k-token prompt at about 4,700 tokens per second and served 601 tokens per second of output across sixteen clients.", "recommendation": {"advice": "Put GPUs behind a PCIe switch rather than a bifurcated riser so each card gets gen4 x8 and peer-to-peer traffic stays on the switch; four R9700s in TP4 hit about 4,700 tokens per second prefill on a 32k prompt.", "playbook": "inference-serving", "playbook_url": "https://wpnews.pro/playbooks/inference-serving"}, "alternates": {"html": "https://wpnews.pro/news/six-gpus-on-one-x16-slot-r9700s-and-rtx-3090s-behind-a-pcie-switch", "markdown": "https://wpnews.pro/news/six-gpus-on-one-x16-slot-r9700s-and-rtx-3090s-behind-a-pcie-switch.md", "text": "https://wpnews.pro/news/six-gpus-on-one-x16-slot-r9700s-and-rtx-3090s-behind-a-pcie-switch.txt", "jsonld": "https://wpnews.pro/news/six-gpus-on-one-x16-slot-r9700s-and-rtx-3090s-behind-a-pcie-switch.jsonld"}}