nvme

 

interrupt


cpu个数: 254   
```
lscpu
Architecture:                       x86_64
CPU op-mode(s):                     32-bit, 64-bit
Byte Order:                         Little Endian
Address sizes:                      43 bits physical, 48 bits virtual
CPU(s):                             256
On-line CPU(s) list:                0-254
Off-line CPU(s) list:               255
```
首先,我们来看一下nvme总共用的中断数。     

```
root@cpu6:/home/cpu6# cat /proc/interrupts |grep nvme |wc -l
516
```
该系统上一共4块盘,254个核,就有1016个中断,一个核对应一个队列,一个中断号。按道理IOqueue有254个,adminqueue也需要用中断,那么中断数应该是255*4=1020才对。

```
root@cpu6:/home/cpu6# cat /proc/interrupts |grep -i nvme[0-3]q0|awk '{print $1,$(NF-1),$NF}'
201: 118489088-edge nvme1q0
203: 119013376-edge nvme2q0
205: 119537664-edge nvme3q0
399: 117964800-edge nvme0q0
```

 

 实际上每个nvme只有128个IO队列

 总共队列 128 + 1

 LBA

LBA(Logic Block Address),字面含义是逻辑块地址。但实际是block的编号,并不正常理解的地址的概念。

SSD是以block来划分的,将整个磁盘以block(像512B,4K等)大小进行划分,编号从0开始到最后一个,假设n-1

也即LBA取值为[0, n-1]

块大小

cat  /sys/class/nvme/nvme0/nvme0n1/queue/logical_block_size
512

 

 

root@cpu7:/home/cpu7# nvme id-ns /dev/nvme2n1p1 -H
NVME Identify Namespace 1:
nsze    : 0x1bf1f72b0
ncap    : 0x1bf1f72b0
nuse    : 0x1bf1f72b0
nsfeat  : 0x8
  [4:4] : 0     NPWG, NPWA, NPDG, NPDA, and NOWS are Not Supported
  [2:2] : 0     Deallocated or Unwritten Logical Block error Not Supported
  [1:1] : 0     Namespace uses AWUN, AWUPF, and ACWU
  [0:0] : 0     Thin Provisioning Not Supported

nlbaf   : 4
flbas   : 0
  [4:4] : 0     Metadata Transferred in Separate Contiguous Buffer
  [3:0] : 0     Current LBA Format Selected

mc      : 0x3
  [1:1] : 0x1   Metadata Pointer Supported
  [0:0] : 0x1   Metadata as Part of Extended Data LBA Supported

dpc     : 0xf
  [4:4] : 0     Protection Information Transferred as Last 8 Bytes of Metadata Not Supported
  [3:3] : 0x1   Protection Information Transferred as First 8 Bytes of Metadata Supported
  [2:2] : 0x1   Protection Information Type 3 Supported
  [1:1] : 0x1   Protection Information Type 2 Supported
  [0:0] : 0x1   Protection Information Type 1 Supported

dps     : 0
  [3:3] : 0     Protection Information is Transferred as Last 8 Bytes of Metadata
  [2:0] : 0     Protection Information Disabled

nmic    : 0x1
  [0:0] : 0x1   Namespace Multipath Capable

rescap  : 0x7f
  [6:6] : 0x1   Exclusive Access - All Registrants Supported
  [5:5] : 0x1   Write Exclusive - All Registrants Supported
  [4:4] : 0x1   Exclusive Access - Registrants Only Supported
  [3:3] : 0x1   Write Exclusive - Registrants Only Supported
  [2:2] : 0x1   Exclusive Access Supported
  [1:1] : 0x1   Write Exclusive Supported
  [0:0] : 0x1   Persist Through Power Loss Supported

fpi     : 0
  [7:7] : 0     Format Progress Indicator Not Supported

dlfeat  : 0
  [4:4] : 0     Guard Field of Deallocated Logical Blocks is set to 0xFFFF
  [3:3] : 0     Deallocate Bit in the Write Zeroes Command is Not Supported
  [2:0] : 0     Bytes Read From a Deallocated Logical Block and its Metadata are Not Reported

nawun   : 0
nawupf  : 0
nacwu   : 0
nabsn   : 0
nabo    : 0
nabspf  : 0
noiob   : 0
nvmcap  : 3840755982336
nsattr  : 0
nvmsetid: 0
anagrpid: 0
endgid  : 0
nguid   : 000000000000000138b19e73c8002549
eui64   : 38b19e73c8254901
LBA Format  0 : Metadata Size: 0   bytes - Data Size: 512 bytes - Relative Performance: 0x2 Good (in use)
LBA Format  1 : Metadata Size: 0   bytes - Data Size: 4096 bytes - Relative Performance: 0 Best 
LBA Format  2 : Metadata Size: 8   bytes - Data Size: 512 bytes - Relative Performance: 0x2 Good 
LBA Format  3 : Metadata Size: 8   bytes - Data Size: 4096 bytes - Relative Performance: 0 Best 
LBA Format  4 : Metadata Size: 64  bytes - Data Size: 4096 bytes - Relative Performance: 0x2 Good

 

posted on 2023-10-08 19:51  tycoon3  阅读(20)  评论(0编辑  收藏  举报

导航