Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The method of checking PCIe version and rate by Linux

2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

There are four different specifications for PCIE. Use the figure below to learn about two of the specifications of PCIE.

View the PCI slot on the motherboard

# dmidecode | grep-- color "PCI"

The transfer rates corresponding to different PCIe versions are as follows:

The transfer rate is GT/s per second rather than bits per second Gbps, because the transfer volume includes overhead bits that do not provide additional throughput

For example, PCIe 1.x and PCIe 2.x use the 8b/10b coding scheme, which takes up 20% of the original channel bandwidth.

GT/s-Giga transation per second (gigabit transmission per second), that is, the number of transmissions per second. The key point is to describe the rate attribute of the physical layer communication protocol, which can not be associated with the link width and so on.

Gbps-Giga Bits Per Second (gigabits per second). There is no proportional conversion relationship between GT/s and Gbps.

PCIe Throughput (available bandwidth) calculation method:

Throughput = transmission rate * coding scheme

For example, the PCI-e2.0 protocol supports 5.0GT/s, that is, 5G Bit; per second is supported on each Lane, but this does not mean that each Lane of the PCIe 2.0 protocol supports the rate of 5Gbps.

Why would you say that? Because the physical layer protocol of PCIe 2.0 uses the coding scheme of 8b/10b. That is to say, for every 8 Bit transmitted, 10 Bit; need to be sent. The extra 2 Bit is not meaningful to the upper layer.

Then, each Lane of the PCIe 2.0 protocol supports a rate of 5 * 8 / 10 = 4 Gbps = 500 MB/s.

Take an PCIe 2.0 x8 channel as an example, the available bandwidth of x8 is 4 * 8 = 32 Gbps = 4 GB/s.

The PCI-e3.0 protocol supports 8.0 GT/s, that is, 8G Bit per second is supported on each Lane.

The physical layer protocol of PCIe 3.0 uses the coding scheme of 128b/130b. That is, for every 128Bit transmitted, 130th Bit needs to be sent.

Then, each Lane of the PCIe 3.0 protocol supports a rate of 8 * 128130 = 7.877 Gbps = 984.6 MB/s.

For a PCIe 3.0x16 channel, the available bandwidth for x16 is 7.877 * 16 = 126.031 Gbps = 15.754 GB/s.

How to know whether PCI-E Bus uses Gen (Generation) 1 or Gen2 or the new generation of Gen 3 under Linux?

# lspci as long as you can see all the settings of the current system. But I can't seem to see which generation of PCI-E PCI-E Bus uses.

Root@XXX# lspci 00Controller 00.0 Host bridge: Intel Corporation Haswell DRAM Controller (rev 06) 00Intel Corporation Haswell DRAM Controller 01.0 PCI bridge: Intel Corporation Haswell PCI Express x16 Controller (rev 06) 00Intel Corporation Haswell DRAM Controller 01.1 PCI bridge: Intel Corporation Haswell PCI Express x8 Controller (rev 06) 00Intel Corporation Haswell DRAM Controller 02.0 VGA compatible controller: Intel Corporation Haswell Integrated Graphics Controller (rev 06) 00rev 03.0 Audio device: Intel Corporation Haswell HD Audio Controller (rev 06) 00Rod 14.0 USB controller: Intel Corporation Lynx Point USB xHCI Host Controller (rev 05) 00:16 .0 Communication controller: Intel Corporation Lynx Point MEI Controller # 1 (rev 04) 00:1a.0 USB controller: Intel Corporation Lynx Point USB Enhanced Host Controller # 2 (rev 05) 00:1c.0 PCI bridge: Intel Corporation Lynx Point PCI Express Root Port # 1 (rev D5) 00:1c.4 PCI bridge: Intel Corporation Lynx Point PCI Express Root Port # 5 (rev D5) 00:1c.5 PCI bridge: Intel Corporation Lynx Point PCI Express Root Port # 6 (rev D5) 00:1d.0 USB controller: Intel Corporation Lynx Point USB Enhanced Host Controller # 1 (rev 05) 00:1f.0 ISA bridge: Intel Corporation Lynx Point LPC Controller (rev 05) 00:1f.2 IDE interface: Intel Corporation Lynx Point 4-port SATA Controller 1 [IDE mode] (rev 05) 00:1f.3 SMBus: Intel Corporation Lynx Point SMBus Controller (rev 05) 00:1f.6 Signal processing controller: Intel Corporation Lynx Point Thermal Management Controller (rev 05) 01VR 00.0 PCI bridge: PLX Technology Inc. Unknown device 8724 (rev ca) 02 Unknown device 01.0 PCI bridge: PLX Technology, Inc. Unknown device 8724 (rev ca) 02 Unknown device 02.0 PCI bridge: PLX Technology, Inc. Unknown device 8724 (rev ca) 02 purl 08.0 PCI bridge: PLX Technology, Inc. Unknown device 8724 (rev ca) 02Switzerland 09.0 PCI bridge: PLX Technology Inc. Unknown device 8724 (rev ca) 03Intel Corporation 00.0 Ethernet controller: Intel Corporation I350 Gigabit Network Connection (Ethernet controller 01) 03V 00.1 Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev 01) 03V 00.2 Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev 01) 03V 00.3 Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev 01) 04rev ca 00.0 Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev 01) 04rev ca 00.1 Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev 01) 04:00 .2 Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev 01) 04Ethernet controller 00.3 Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev 01) 06rev 00.0 Ethernet controller: Intel Corporation 82599EB 10-Gigabit SFI/SFP+ Network Connection (rev 01) 06purl 00.1 Ethernet controller: Intel Corporation 82599EB 10-Gigabit SFI/SFP+ Network Connection (rev 01) 07Gigabit Network Connection 00.0 PCI bridge: PLX Technology Inc. PEX 8732 32-lane, 8-Port PCI Express Gen 3 (8.0 GT/s) Switch (rev ca) 08 32-lane 01.0 PCI bridge: PLX Technology, Inc. PEX 8732 32-lane, 8-Port PCI Express Gen 3 (8.0 GT/s) Switch (rev ca) 08 32-lane 08.0 PCI bridge: PLX Technology, Inc. PEX 8732 32-lane, 8-Port PCI Express Gen 3 (8.0 GT/s) Switch (rev ca) 08Switzerland 09.0 PCI bridge: PLX Technology, Inc. PEX 8732 32-lane 8-Port PCI Express Gen 3 (8.0 GT/s) Switch (rev ca) 08:0a.0 PCI bridge: PLX Technology, Inc. PEX 8732 32-lane 8-Port PCI Express Gen 3 (8.0 GT/s) Switch (rev ca) 09rev ca 00.0 Ethernet controller: Intel Corporation 82599EB 10-Gigabit SFI/SFP+ Network Connection (rev 01) 09Switch 00.1 Ethernet controller: Intel Corporation 82599EB 10-Gigabit SFI/SFP+ Network Connection (rev 01) 0e:00.0 Ethernet controller: Intel Corporation I210 Gigabit Network Connection (rev 03) 0f:00.0 Ethernet controller: Intel Corporation I210 Gigabit Network Connection (rev 03) root@XXX#root@XXX# lspci-tv- [0000Vis00]- +-00.0 Intel Corporation Haswell DRAM Controller +-01.0-[0000 Intel Corporation Haswell DRAM Controller 01-06]-00.0-[0000Gigabit Network Connection 02-06]-- +-01.0-[0000Gigabit Network Connection 03]-- +-00.0 Intel Corporation I350 Gigabit Network Connection | | +-00.2 Intel Corporation I350 Gigabit Network Connection | |\-00 .3 Intel Corporation I350 Gigabit Network Connection | +-02.0-[0000Gigabit Network Connection 04]-- +-00.0 Intel Corporation I350 Gigabit Network Connection | | +-00.1 Intel Corporation I350 Gigabit Network Connection | | +-00.2 Intel Corporation I350 Gigabit Network Connection | |\-00.3 Intel Corporation I350 Gigabit Network Connection | +-08.0-[0000VO5] -- |\-09.0-[0000 Intel Corporation 82599EB 10-Gigabit SFI/SFP+ Network Connection 06]-- +-00.0 Intel Corporation 82599EB 10-Gigabit SFI/SFP+ Network Connection |\-00.1 Intel Corporation 82599EB 10-Gigabit SFI/SFP+ Network Connection +-01.1-[0000VR 07-0c]-00.0-[0000Rule 08-0c]-- +-01.0-[0000VIX]-- +-00.0 Intel Corporation 82599EB 10-Gigabit SFI/ SFP+ Network Connection | |\-00.1 Intel Corporation 82599EB 10-Gigabit SFI/SFP+ Network Connection | +-08.0-[0000 Intel Corporation Haswell HD Audio Controller 0a]-- | +-09.0-[0000 Intel Corporation Haswell HD Audio Controller 0b]-- |\-0a.0-[0000 Intel Corporation Haswell Integrated Graphics Controller 0c]-- +-02.0 Intel Corporation Haswell HD Audio Controller +-14.0 Intel Corporation Lynx Point USB xHCI Host Controller +-16.0 Intel Corporation Lynx Point MEI Controller # 1 +-1a.0 Intel Corporation Lynx Point USB Enhanced Host Controller # 2 +-1c.0-[00001a.0 Intel Corporation Lynx Point USB Enhanced Host Controller 0d]-+-1c.4-[00001a.0 Intel Corporation Lynx Point USB Enhanced Host Controller 0e]-00.0 Intel Corporation I210 Gigabit Network Connection +-1c.5-[00001a.0 Intel Corporation Lynx Point USB Enhanced Host Controller 0f]-- 00.0 Intel Corporation I210 Gigabit Network Connection +-1d.0 Intel Corporation Lynx Point USB Enhanced Host Controller # 1 +- 1f.0 Intel Corporation Lynx Point LPC Controller +-1f.2 Intel Corporation Lynx Point 4-port SATA Controller 1 [IDE mode] +-1f.3 Intel Corporation Lynx Point SMBus Controller\-1f.6 Intel Corporation Lynx Point Thermal Management Controllerroot@XXX#

If any of the settings are unknown, you need to update / usr/local/share/pci.ids.gz. Please refer to the update method http://benjr.tw/node/88.

First query the identification number (bus:device.function) of the Inetl 82599EB network card

| root@XXX# lspci | grep-- color 82599 06 Ethernet controller 00.0 Ethernet controller: Intel Corporation 82599EB 10-Gigabit SFI/SFP+ Network Connection (rev 01) 06 Ethernet controller 00.1 Ethernet controller: Intel Corporation 82599EB 10-Gigabit SFI/SFP+ Network Connection (rev 01) 09 Ethernet controller 00.0 Ethernet controller: Intel Corporation 82599EB 10-Gigabit SFI/SFP+ Network Connection (rev 01) 09 rev 00.1 Ethernet controller: Intel Corporation 82599EB 10-Gigabit SFI/SFP+ Network Connection (rev 01) root@XXX#

The device in PCI uses three numbers as identification values, some of which are 1. 5%. Bus bus (bus number), 2. "device (device number) and 3." function number ".

So the 06function 00.0 just now is bus number = 06, device number = 00 function = 0.

These three numbers will be combined into a 16-bits identification number.

Bus (bus number) 8bits 2 ^ 8 can connect up to 256bus (0 to ff)

Device (device number) 5bits 2 ^ 5 can connect up to 32 devices (0 to 1f) and

Function (function number) 3bits 2 ^ 3 up to 8 functions per device (0 to 7).

For more information on # lspci, please refer to http://benjr.tw/node/543

Then check vendor id and device id

Root@XXX# lspci-n | grep-I 06 8086:10fb 00.006 8086:10fb 00.0 0200: rev 01) root@XXX#

Linux uses Class ID + Vendor ID + Device ID to represent installation, for example, 0200: 8086:10fb represents installation name (Class ID = 0200, Vendor ID = 8086, Device ID = 10fb)

Last look at the bandwidth of the specified PCI device

Root@XXX# lspci-n-d 8086:10fb-vvv | grep-- color Width LnkCap: Port # 9, Speed 5GT/s, Width x8, ASPM L0s, Latency L0

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report