亚欧色一区w666天堂,色情一区二区三区免费看,少妇特黄A片一区二区三区,亚洲人成网站999久久久综合,国产av熟女一区二区三区

  • 發布文章
  • 消息中心
點贊
收藏
評論
分享
原創

SPDK blobstore簡介和實踐

2024-04-30 02:34:46
100
0
## 簡介
 
Blobstore是構建在spdk bdev層的一個邏輯對象管理層,每個blob對應一個對象,一個blob被邏輯上拆分成很多不連續的cluster,每個cluster又分為page。blobstore將blob元數據記錄在磁盤頭相關的page頁,整個IO流都在用戶態,具有非常好的讀寫性能,并具備掉電恢復等故障處理能力。
 
 
## 實踐

*** 格式化一個NVMe設備為blobstore引擎 ***

```shell
[root@test examples]# cat blobcli.json
{
"subsystems": [
{
"subsystem":"bdev",
"config": [
{
"method":"bdev_nvme_attach_controller",
"params":{
"trtype":"PCIe",
"name":"Nvme1",
"traddr":"0000:68:00.0"
}
}
]
}
]
}

# -b 一定是 name+n1 這樣子格式
[root@test examples]# ./blobcli -b Nvme1n1 -i blobcli.json
Your entire blobstore will be destroyed. Are you sure? (y/n) y
[2024-04-10 17:04:12.916671] Starting SPDK v23.01.1 git sha1 186986c / DPDK 22.11.1 initialization...
[2024-04-10 17:04:12.918661] [ DPDK EAL parameters: blobcli --no-shconf -c 0x1 --huge-unlink --log-level=lib.eal:6 --log-level=lib.cryptodev:5 --log-level=user1:6 --iova-mode=pa --base-virtaddr=0x200000000000 --match-allocations --file-prefix=spdk_pid3670165 ]
TELEMETRY: No legacy callbacks, legacy socket not created
[2024-04-10 17:04:13.073398] app.c: 712:spdk_app_start: *NOTICE*: Total cores available: 1
[2024-04-10 17:04:13.120114] reactor.c: 926:reactor_run: *NOTICE*: Reactor started on core 0
[2024-04-10 17:04:13.141979] accel_sw.c: 681:sw_accel_module_init: *NOTICE*: Accel framework software module initialized.
Init blobstore using bdev Name: Nvme1n1
blobstore init'd: (0x175f130)
```

*** 創建一個blob ***

```shell
# blobstore還是構建在bdev層之上的
[root@test examples]# ./blobcli -b Nvme1n1 -l bdevs
List bdevs:
bdevName:Nvme1n1
bdevProductName:NVMedisk
[root@test examples]# ./blobcli -b Nvme1n1 -n 1
New blob id 0x100000000
blob now has USED clusters of 1
[root@slg-poc-x86-ceph-1 examples]# ./blobcli -b Nvme1n1 -l blobs
List BLOBS:
Found blob with ID# 0x100000000
[root@test examples]# ./blobcli -b Nvme1n1 -s 0x100000000
Blob Public Info:
blob ID: 0x100000000
# of clusters: 1
# of bytes: 1048576
# of pages: 256
# of xattrs: 0
xattrs:

Blob Private Info:
state: CLEAN
open ref count: 1
[root@test examples]# ./blobcli -b Nvme1n1 -s bs
Blobstore Public Info:
UsingbdevProductName:NVMedisk
APIVersion:3
superblobID:noneassigned
pagesize:4096
iounitsize:512
clustersize:1048576
# free clusters: 7297030
blobstoretype:
00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

Blobstore Private Info:
Metadatastart (pages): 673
Metadatalength (pages): 7325650
```

*** 讀寫一個blob ***

```shell
[root@test examples]# ./blobcli -b Nvme1n1 -m 0x100000000 test
[root@test examples]# ./blobcli -b Nvme1n1 -d 0x100000000 test1
```
0條評論
0 / 1000
邢****典
4文章數
0粉絲數
邢****典
4 文章 | 0 粉絲
邢****典
4文章數
0粉絲數
邢****典
4 文章 | 0 粉絲
原創

SPDK blobstore簡介和實踐

2024-04-30 02:34:46
100
0
## 簡介
 
Blobstore是構建在spdk bdev層的一個邏輯對象管理層,每個blob對應一個對象,一個blob被邏輯上拆分成很多不連續的cluster,每個cluster又分為page。blobstore將blob元數據記錄在磁盤頭相關的page頁,整個IO流都在用戶態,具有非常好的讀寫性能,并具備掉電恢復等故障處理能力。
 
 
## 實踐

*** 格式化一個NVMe設備為blobstore引擎 ***

```shell
[root@test examples]# cat blobcli.json
{
"subsystems": [
{
"subsystem":"bdev",
"config": [
{
"method":"bdev_nvme_attach_controller",
"params":{
"trtype":"PCIe",
"name":"Nvme1",
"traddr":"0000:68:00.0"
}
}
]
}
]
}

# -b 一定是 name+n1 這樣子格式
[root@test examples]# ./blobcli -b Nvme1n1 -i blobcli.json
Your entire blobstore will be destroyed. Are you sure? (y/n) y
[2024-04-10 17:04:12.916671] Starting SPDK v23.01.1 git sha1 186986c / DPDK 22.11.1 initialization...
[2024-04-10 17:04:12.918661] [ DPDK EAL parameters: blobcli --no-shconf -c 0x1 --huge-unlink --log-level=lib.eal:6 --log-level=lib.cryptodev:5 --log-level=user1:6 --iova-mode=pa --base-virtaddr=0x200000000000 --match-allocations --file-prefix=spdk_pid3670165 ]
TELEMETRY: No legacy callbacks, legacy socket not created
[2024-04-10 17:04:13.073398] app.c: 712:spdk_app_start: *NOTICE*: Total cores available: 1
[2024-04-10 17:04:13.120114] reactor.c: 926:reactor_run: *NOTICE*: Reactor started on core 0
[2024-04-10 17:04:13.141979] accel_sw.c: 681:sw_accel_module_init: *NOTICE*: Accel framework software module initialized.
Init blobstore using bdev Name: Nvme1n1
blobstore init'd: (0x175f130)
```

*** 創建一個blob ***

```shell
# blobstore還是構建在bdev層之上的
[root@test examples]# ./blobcli -b Nvme1n1 -l bdevs
List bdevs:
bdevName:Nvme1n1
bdevProductName:NVMedisk
[root@test examples]# ./blobcli -b Nvme1n1 -n 1
New blob id 0x100000000
blob now has USED clusters of 1
[root@slg-poc-x86-ceph-1 examples]# ./blobcli -b Nvme1n1 -l blobs
List BLOBS:
Found blob with ID# 0x100000000
[root@test examples]# ./blobcli -b Nvme1n1 -s 0x100000000
Blob Public Info:
blob ID: 0x100000000
# of clusters: 1
# of bytes: 1048576
# of pages: 256
# of xattrs: 0
xattrs:

Blob Private Info:
state: CLEAN
open ref count: 1
[root@test examples]# ./blobcli -b Nvme1n1 -s bs
Blobstore Public Info:
UsingbdevProductName:NVMedisk
APIVersion:3
superblobID:noneassigned
pagesize:4096
iounitsize:512
clustersize:1048576
# free clusters: 7297030
blobstoretype:
00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

Blobstore Private Info:
Metadatastart (pages): 673
Metadatalength (pages): 7325650
```

*** 讀寫一個blob ***

```shell
[root@test examples]# ./blobcli -b Nvme1n1 -m 0x100000000 test
[root@test examples]# ./blobcli -b Nvme1n1 -d 0x100000000 test1
```
文章來自個人專欄
文章 | 訂閱
0條評論
0 / 1000
請輸入你的評論
0
0