十年网站开发经验 + 多家企业客户 + 靠谱的建站团队
量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决
本篇文章为大家展示了BeeGFS开发环境搭建中如何安装和配置MPICH和MDTEST,内容简明扼要并且容易理解,绝对能使你眼前一亮,通过这篇文章的详细介绍希望你能有所收获。
专注于为中小企业提供成都网站建设、网站建设服务,电脑端+手机端+微信端的三站合一,更高效的管理,为中小企业建宁免费做网站提供优质的服务。我们立足成都,凝聚了一批互联网行业人才,有力地推动了上1000家企业的稳健成长,帮助中小企业通过网站建设实现规模扩充和转变。
安装好之后,如果我们想对其元数据服务的性能进行评估和测试,可以安装MDTEST
工具,具体的步骤如下:
MDTEST
测试工具依赖MPI
协议,所以需要首先安装MPICH
(MPI
协议的一种实现)。
安装和配置(三个节点使用相同操作):
# 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
:
$ 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 directory structure
上述内容就是BeeGFS开发环境搭建中如何安装和配置MPICH和MDTEST,你们学到知识或技能了吗?如果还想学到更多技能或者丰富自己的知识储备,欢迎关注创新互联行业资讯频道。