1. 程式人生 > >BeeGFS開發環境搭建3-測試工具

BeeGFS開發環境搭建3-測試工具

安裝好之後,如果我們想對其元資料服務的效能進行評估和測試,可以安裝MDTEST工具,具體的步驟如下:

安裝和配置MPICH

MDTEST測試工具依賴MPI協議,所以需要首先安裝MPICHMPI協議的一種實現)。

  • 安裝和配置(三個節點使用相同操作):
# http://www.mpich.org/

$ yum install -y gcc gcc-c++ gcc-gfortran

$ wget http://www.mpich.org/static/downloads/3.3/mpich-3.3.tar.gz
$ tar xvf mpich-3.3.tar.gz
$ cd mpich-3.3/
$ ./configure --prefix=/usr/local/mpich
$ make -j $(nproc) && make install

$ cp -r examples/ /usr/local/mpich

$ vi ~/.bashrc
PATH=$PATH:/usr/local/mpich/bin
MANPATH=$MANPATH:/usr/local/mpich/man
export PATH MANPATH

$ . ~/.bashrc
  • 測試安裝是否正常(三個節點間SSH需要配置免密登入):
$ mpirun -np 10 /usr/local/mpich/examples/cpi
Process 2 of 10 is on sacd01
Process 3 of 10 is on sacd01
Process 8 of 10 is on sacd01
Process 1 of 10 is on sacd01
Process 0 of 10 is on sacd01
Process 5 of 10 is on sacd01
Process 9 of 10 is on sacd01
Process 4 of 10 is on sacd01
Process 7 of 10 is on sacd01
Process 6 of 10 is on sacd01
pi is approximately 3.1415926544231256, Error is 0.0000000008333325
wall clock time = 0.002448

$ vi servers
sacd01:2
sacd02:2
sacd03:2

$ mpirun -np 10 -f servers /usr/local/mpich/examples/cpi
Process 6 of 10 is on sacd01
Process 7 of 10 is on sacd01
Process 0 of 10 is on sacd01
Process 5 of 10 is on sacd03
Process 1 of 10 is on sacd01
Process 2 of 10 is on sacd02
Process 8 of 10 is on sacd02
Process 9 of 10 is on sacd02
Process 3 of 10 is on sacd02
Process 4 of 10 is on sacd03
pi is approximately 3.1415926544231256, Error is 0.0000000008333325
wall clock time = 0.001612

安裝和配置MDTEST

  • 安裝和配置MDTEST
$ wget https://sourceforge.net/projects/mdtest/files/mdtest%20latest/mdtest-1.9.3/mdtest-1.9.3.tgz

$ mkdir mdtest-1.9.3 && tar xvf mdtest-1.9.3.tgz -C mdtest-1.9.3 && cd mdtest-1.9.3
$ MPI_CC=mpicc make

$ cp mdtest /usr/bin/
  • 測試安裝是否正常:
$ cd /mnt/beegfs/
$ mdtest -I 10 -z 5 -b 2 -L
-- started at 05/08/2019 17:17:42 --

mdtest-1.9.3 was launched with 1 total task(s) on 1 node(s)
Command line used: mdtest -I 10 -z 5 -b 2 -L
Path: /mnt
FS: 122.3 GiB   Used FS: 11.0%   Inodes: 61.2 Mi   Used Inodes: 1.8%

1 tasks, 630 files/directories

SUMMARY: (of 1 iterations)
   Operation                      Max            Min           Mean        Std Dev
   ---------                      ---            ---           ----        -------
   Directory creation:       1305.970       1305.970       1305.970          0.000
   Directory stat    :       2253.825       2253.825       2253.825          0.000
   Directory removal :       1170.048       1170.048       1170.048          0.000
   File creation     :       1045.978       1045.978       1045.978          0.000
   File stat         :       2025.179       2025.179       2025.179          0.000
   File read         :       1334.224       1334.224       1334.224          0.000
   File removal      :       1623.509       1623.509       1623.509          0.000
   Tree creation     :        429.608        429.608        429.608          0.000
   Tree removal      :        799.761        799.761        799.761          0.000

-- finished at 05/08/2019 17:17:45 --

$ vi servers
sacd01:2
sacd02:2
sacd03:2

$ mpirun -np 10 -f servers mdtest -d /mnt/beegfs -I 10 -z 5 -b 2 -L
-- started at 05/08/2019 17:25:13 --

mdtest-1.9.3 was launched with 10 total task(s) on 2 node(s)
Command line used: mdtest -d /mnt/beegfs -I 10 -z 5 -b 2 -L
Path: /mnt
FS: 122.3 GiB   Used FS: 64.1%   Inodes: 61.2 Mi   Used Inodes: 2.5%

10 tasks, 6300 files/directories

SUMMARY: (of 1 iterations)
   Operation                      Max            Min           Mean        Std Dev
   ---------                      ---            ---           ----        -------
   Directory creation:       2778.114       2778.114       2778.114          0.000
   Directory stat    :       4538.071       4538.071       4538.071          0.000
   Directory removal :       3858.621       3858.621       3858.621          0.000
   File creation     :       2146.615       2146.615       2146.615          0.000
   File stat         :       4305.599       4305.599       4305.599          0.000
   File read         :       3106.186       3106.186       3106.186          0.000
   File removal      :       3695.281       3695.281       3695.281          0.000
   Tree creation     :        670.204        670.204        670.204          0.000
   Tree removal      :        748.542        748.542        748.542          0.000

-- finished at 05/08/2019 17:25:27 --

$ mpirun -np 10 -f servers mdtest -d /mnt/beegfs -i 2 -I 100 -b 10 -u -L -F
-- started at 05/08/2019 17:26:11 --

mdtest-1.9.3 was launched with 10 total task(s) on 2 node(s)
Command line used: mdtest -d /mnt/beegfs -i 2 -I 100 -b 10 -u -L -F
Path: /mnt
FS: 122.3 GiB   Used FS: 64.1%   Inodes: 61.2 Mi   Used Inodes: 2.5%

10 tasks, 1000 files

SUMMARY: (of 2 iterations)
   Operation                      Max            Min           Mean        Std Dev
   ---------                      ---            ---           ----        -------
   File creation     :       2150.731       1990.272       2070.502         80.229
   File stat         :       4334.598       4025.630       4180.114        154.484
   File read         :       2337.454       2256.293       2296.873         40.581
   File removal      :       4273.461       3998.520       4135.991        137.470
   Tree creation     :        243.232         55.898        149.567         93.666
   Tree removal      :        296.417        265.496        280.957         15.461

-- finished at 05/08/2019 17:26:13 --
  • 檢視命令幫助:
$ mdtest --help
Usage: mdtest [-b branching_factor] [-B] [-c] [-C] [-d testdir] [-D] [-e number_of_bytes_to_read]
              [-E] [-f first] [-F] [-h] [-i iterations] [-I items_per_dir] [-l last] [-L]
              [-n number_of_items] [-N stride_length] [-p seconds] [-r]
              [-R[seed]] [-s stride] [-S] [-t] [-T] [-u] [-v]
              [-V verbosity_value] [-w number_of_bytes_to_write] [-y] [-z depth]
	-b: branching factor of hierarchical directory structure
	-B: no barriers between phases
	-c: collective creates: task 0 does all creates
	-C: only create files/dirs
	-d: the directory in which the tests will run
	-D: perform test on directories only (no files)
	-e: bytes to read from each file
	-E: only read files/dir
	-f: first number of tasks on which the test will run
	-F: perform test on files only (no directories)
	-h: prints this help message
	-i: number of iterations the test will run
	-I: number of items per directory in tree
	-l: last number of tasks on which the test will run
	-L: files only at leaf level of tree
	-n: every process will creat/stat/read/remove # directories and files
	-N: stride # between neighbor tasks for file/dir operation (local=0)
	-p: pre-iteration delay (in seconds)
	-r: only remove files or directories left behind by previous runs
	-R: randomly stat files (optional argument for random seed)
	-s: stride between the number of tasks for each test
	-S: shared file access (file only, no directories)
	-t: time unique working directory overhead
	-T: only stat files/dirs
	-u: unique working directory for each task
	-v: verbosity (each instance of option increments by one)
	-V: verbosity value
	-w: bytes to write to each file after it is created
	-y: sync file after writing
	-z: depth of hierarchical director