日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

vdbench的作用_基于SSD的iSCSI target的建立和Vdbench测试

發布時間:2023/12/31 编程问答 32 豆豆
生活随笔 收集整理的這篇文章主要介紹了 vdbench的作用_基于SSD的iSCSI target的建立和Vdbench测试 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

在SAN存儲系統中,LIO是把存儲設備直接轉化為可用存儲資源的高效工具,它實現了基于文件/塊設備/ramdisk甚至回環設備創建存儲設備的iscsi

target接口和CLI。 通過iSCSI

initiator訪問iSCSI

target 的典型應用場景和聯接如下圖所示意:

上圖非常直觀地顯示了基于ram、/dev/下的設備以及文件,創建iSCSI

target的數據流。如果更深入地再往下看,可以看到它和底層文件系統、卷管理的接口如下所示:

厘清了iSCSI的應用模式和軟件層次后,就不難理解如何創建iscsi

target 設備了,并且也會理解為何

在數據傳輸之前,需要iscsi

initiator 和iscsi

target 設備建立起連接了。

下面通過具體的命令,舉例說明在linux操作系統里面如何創建iscsi

target、建立iscsi鏈接和使用iscsi資源。首先需要在存儲資源所掛載的機器上用targetcli創建target:

[root@localhost]#

targetcli /backstores/block create my_ssd

/dev/disk/by-id/wwn-0x55cd2e404b7b8ced-part5

\Created

block storage object my_ssd using

/dev/disk/by-id/wwn-0x55cd2e404b7b8ced-part5.

[root@localhost]#

targetcli /iscsi create

Created

target iqn.2003-01.org.linux-iscsi.localhost.x8664:sn.beb1fd396120.

Created

TPG 1.

Global

pref auto_add_default_portal=true

Created

default portal listening on all IPs (0.0.0.0), port 3260.

[root@localhost]#

targetcli

/iscsi/iqn.2003-01.org.linux-iscsi.localhost.x8664:sn.beb1fd396120/tpg1/luns

create /backstores/block/my_ssd

Created

LUN 0.

You

have new mail in /var/spool/mail/root

[root@localhost]#

targetcli

/iscsi/iqn.2003-01.org.linux-iscsi.localhost.x8664:sn.beb1fd396120/tpg1

set attribute authentication=0 demo_mode_write_protect=0

generate_node_acls=1

Parameter

authentication is now '0'.

Parameter

demo_mode_write_protect is now '0'.

Parameter

generate_node_acls is now '1'.

[root@localhost]#

targetcli saveconfig myssd.config

Configuration

saved to myssd.config

上面命令還把當前配置保存到文件myssd.config當中去,機器重啟后,還可以從這個文件

恢復到當前設置,這樣就可以避免需要重新輸入上面的命令:

[root@localhost]#

targetcli clearconfig confirm=True

All

configuration cleared

如果上面沒有制定文件名,默認會保存到/etc/target/saveconfig.json文件當中去。

[root@localhost]#

targetcli restoreconfig myssd.config

接著需要在initiator端連接到target端,先探測有沒有iscsi能被找到,如果找到自動連接上去:

[root@localhost

PlxSdk]# iscsiadm -m discovery -t st -p 10.10.2.33 -l

Logging

in to [iface: default, target:

iqn.2003-01.org.linux-iscsi.localhost.x8664:sn.beb1fd396120, portal:

10.10.2.33,3260] (multiple)

Login

to [iface: default, target:

iqn.2003-01.org.linux-iscsi.localhost.x8664:sn.beb1fd396120, portal:

10.10.2.33,3260] successful.

這時能從/dev設備下看到多出一個設備:

lrwxrwxrwx.

1 root root ? ?9 Jun 20 20:19

ip-10.10.2.33:3260-iscsi-iqn.2003-01.org.linux-iscsi.localhost.x8664:sn.beb1fd396120-lun-0

-> ../../sdr

這就證明iscsi

target已經映射到了initiator

/dev/sdr這個設備上,在initiator端對/dev/sdr進行讀寫訪問,就相當于往遠端的10.10.2.33機器上的/dev/disk/by-id/wwn-0x55cd2e404b7b8ced-part5進行讀寫。

當然,使用完了之后,可以用下面的命令斷開連接:

[root@localhost

PlxSdk]# iscsiadm -m session -u

Logging

out of session [sid: 1, target:

iqn.2003-01.org.linux-iscsi.localhost.x8664:sn.b5928f6012db, portal:

10.10.2.33,3260]

Logging

out of session [sid: 2, target:

iqn.2003-01.org.linux-iscsi.localhost.x8664:sn.beb1fd396120, portal:

10.10.2.33,3260]

最后運行測試程序,下面以vdbench為例,開始測試:

[root@localhost

vdbench]# cat ssd_param && ./vdbench ?-f ssd_param -k -o

ssd_vdbench.out

sd=sd2,lun=/dev/sdr,openflags=o_direct,size=500m,threads=24

wd=wd1,xfersize=4k,rdpct=0,seekpct=100

rd=rd1,wd=wd1,sd=*,iorate=max,elapsed=5,interval=1,warmup=5,threads=24

Vdbench

distribution: vdbench504

For

documentation, see 'vdbench.pdf'.

20:25:40.991

Created output directory '/home/vdbench_qichao/ssd_vdbench.out'

20:25:41.021

input argument scanned: '-fssd_param'

20:25:41.021

input argument scanned: '-k'

20:25:41.021

input argument scanned: '-ossd_vdbench.out'

20:25:41.153

Starting slave: /home/vdbench/vdbench SlaveJvm -m localhost -n

localhost-10-160620-20.25.40.968 -l localhost-0 -p 5570

20:25:41.627

All slaves are now connected

20:25:43.001

Starting RD=rd1; I/O rate: Uncontrolled MAX; elapsed=5 warmup=5; For

loops: threads=24

20:25:54.068

Vdbench execution completed successfully. Output directory:

/home/vdbench/ssd_vdbench.out

參考文檔和鏈接:

http://linux-iscsi.org/wiki/Targetcli

http://www.linux-iscsi.org/Doc/LIO%20Admin%20Manual.pdf

總結

以上是生活随笔為你收集整理的vdbench的作用_基于SSD的iSCSI target的建立和Vdbench测试的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。