Merge "Testcase to find storage bottlenecks using Yardstick for Multistack"
[yardstick.git] / samples / storage_bottlenecks.yaml
1 ##############################################################################
2 # Copyright (c) 2018 Huawei Technologies Co.,Ltd and others.
3 #
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
9 ---
10 # Sample benchmark task config file
11 # measure storage performance using fio
12 #
13 # For this sample just like running the command below on the test vm and
14 # getting benchmark info back to the yardstick.
15 #
16 # sudo fio -filename=/home/ubuntu/data.raw -bs=4k -ipdepth=1 -rw=rw \
17 #          -ramp_time=10 -runtime=60 -name=yardstick-fio -ioengine=libaio \
18 #          -direct=1 -group_reporting -numjobs=1 -time_based \
19 #          --output-format=json
20
21 schema: "yardstick:task:0.1"
22 run_in_parallel: true
23
24 {% set directory = directory or '/FIO_Test' %}
25 {% set stack_num = stack_num or 1 %}
26 {% set volume_num = volume_num or "1" %}
27 {% set rw = rw or "randrw" %}
28 {% set bs = bs or "4k" %}
29 {% set size = size or "30g" %}
30 {% set rwmixwrite = rwmixwrite or "50" %}
31 {% set numjobs = numjobs or "1" %}
32 {% set direct = direct or "1" %}
33 {% set volume_size = volume_size or 50 %}
34
35 scenarios:
36 {% for num in range(stack_num) %}
37 -
38   type: Fio
39   options:
40     filename: {{ directory }}/test
41     directory: {{ directory }}
42     bs: {{bs}}
43     rw: {{rw}}
44     size: {{size}}
45     rwmixwrite: {{rwmixwrite}}
46     numjobs: {{numjobs}}
47     direct: {{direct}}
48     ramp_time: 10
49
50   host: demo.storage_bottlenecks-{{num}}-{{volume_num}}
51
52   runner:
53     type: Duration
54     duration: 60
55     interval: 1
56 {% endfor %}
57
58 contexts:
59 {% for context_num in range(stack_num) %}
60 -
61   name: storage_bottlenecks-{{context_num}}-{{volume_num}}
62   image: yardstick-image
63   flavor: yardstick-flavor
64   user: ubuntu
65
66   servers:
67     demo:
68       volume:
69         size: {{volume_size}}
70       volume_mountpoint: "/dev/vdb"
71       floating_ip: true
72
73   networks:
74     test:
75       cidr: "10.0.1.0/24"
76       port_security_enabled: true
77 {% endfor %}