Question Very confused about how many PCIe lanes I have and how to use them


Apr 23, 2016
I am building a system around an AMD Ryzen 7 2700x, which I understand has 20 lanes of PCIe 3. I would like to put that in an X470 motherboard, which I believe has PCIe 2 lanes (although I am not sure how many) and 1 or 2 M.2 slots.

If I plug a GPU into one of the PCIe x16 slots, that takes away 16 lanes from the CPU with 4 remaining.
If I plug in a NVMe M.2 SSD, does that use the chipset lanes?
What if I include a second NVMe M.2 SSD? I assume that also uses the chipset lanes.

Sorry, I am very new to all of this and this is my first build.
Basically, what I want is a 2700X in an X470 with a GPU and an NVMe M.2, but I would like the possibility of adding a second NVMe M.2 in the future. Will that all work?

The X470 and Ryzen have lanes to spare, you can certainly get full a full 16 lanes for a GPU, and a full 4 lanes for each M.2 /NVME slot for MBs that support two NVME M.2 slots...; even a Z390 chipset can do this, although at the expense of a few SATA ports quite often.