ceph crush

[问题]

[解答]

 

[问题] int CrushWrapper::try_remap_rule()该方法的作用和应用场景是什么样的?

[解答]

 

[问题] crush rule op 中 firstn 和 indep 各有什么样的应用场合?www.spinics.net/lists/ceph-users/msg07167.html

[解答]

 

[问题] crush_map 中 pos Vs id, 它们之间的关系是怎么样的, 什么时候是负数,什么时候是正数?

id = -1 - pos; pos = -1 - id

[解答]

 

[问题] ceph osd crush dump 打印输出,是 json 格式的输出, 跟踪代码实现

[解答]
[harvis@centos7 build]$ ./bin/ceph osd crush dump

*** DEVELOPER MODE: setting PATH, PYTHONPATH and LD_LIBRARY_PATH ***
{
    "devices": [
        {
            "id": 0,
            "name": "osd.0"
        },
        {
            "id": 1,
            "name": "osd.1"
        },
        {
            "id": 2,
            "name": "osd.2"
        }
    ],
    "types": [
        {
            "type_id": 0,
            "name": "osd"
        },
        {
            "type_id": 1,
            "name": "host"
        },
        {
            "type_id": 2,
            "name": "chassis"
        },
        {
            "type_id": 3,
            "name": "rack"
        },
        {
            "type_id": 4,
            "name": "row"
        },
        {
            "type_id": 5,
            "name": "pdu"
        },
        {
            "type_id": 6,
            "name": "pod"
        },
        {
            "type_id": 7,
            "name": "room"
        },
        {
            "type_id": 8,
            "name": "datacenter"
        },
        {
            "type_id": 9,
            "name": "region"
        },
        {
            "type_id": 10,
            "name": "root"
        }
    ],
    "buckets": [
        {
            "id": -1,
            "name": "default",
            "type_id": 10,
            "type_name": "root",
            "weight": ,
            "alg": "straw",
            "hash": "rjenkins1",
            "items": [
                {
                    "id": -2,
                    "weight":196608 ,
                    "pos": 0
                }
            ]
        },
        {
            "id": -2,
            "name": "centos7",
            "type_id": 1,
            "type_name": "host",
            "weight": 196608,
            "alg": "straw",
            "hash": "rjenkins1",
            "items": [
                {
                    "id": 0,
                    "weight": 65536,
                    "pos": 0
                },
                {
                    "id": 1,
                    "weight": 65536,
                    "pos": 1
                },
                {
                    "id": 2,
                    "weight": 65536,
                    "pos": 2
                }
            ]
        }
    ],
    "rules": [
        {
            "rule_id": 0,
            "rule_name": "replicated_ruleset",
            "ruleset": 0,
            "type": 1, ## 1: type replicated 0:type erasure
            "min_size": 1,
            "max_size": 10,
            "steps": [
                {
                    "op": "take",
                    "item": -1,
                    "item_name": "default" ## id 为 -1 的 item 的名字
                },
                {
                    "op": "choose_firstn",
                    "num": 0,
                    "type": "osd" ##
                },
                {
                    "op": "emit"
                }
            ]
        }
    ],
    "tunables": {
        "choose_local_tries": 0,
        "choose_local_fallback_tries": 0,
        "choose_total_tries": 50,
        "chooseleaf_descend_once": 1,
        "chooseleaf_vary_r": 1,
        "chooseleaf_stable": 0,
        "straw_calc_version": 1,
        "allowed_bucket_algs": 22,
        "profile": "firefly",
        "optimal_tunables": 0,
        "legacy_tunables": 0,
        "minimum_required_version": "firefly",
        "require_feature_tunables": 1,
        "require_feature_tunables2": 1,
        "has_v2_rules": 0,
        "require_feature_tunables3": 1,
        "has_v3_rules": 0,
        "has_v4_buckets": 0,
        "require_feature_tunables5": 0,
        "has_v5_rules": 0
    }
}

 

[问题] crush 单元测试输出信息

[解答]
[harvis@centos7 build]$ ./bin/unittest_crush
[==========] Running 9 tests from 1 test case.
[----------] Global test environment set-up.
[----------] 9 tests from CRUSH
[ RUN      ] CRUSH.indep_toosmall
ID    WEIGHT    TYPE NAME
-1    3.00000    root default
-3    3.00000        rack rack-0
-2    1.00000            host host-0-0
0    1.00000                osd.0
-4    1.00000            host host-0-1
1    1.00000                osd.1
-5    1.00000            host host-0-2
2    1.00000                osd.2
0 -> [2,1,2147483647,0,2147483647]
1 -> [2,2147483647,0,2147483647,1]
2 -> [1,0,2,2147483647,2147483647]
3 -> [1,2,0,2147483647,2147483647]
4 -> [0,2,2147483647,2147483647,1]
5 -> [1,2,2147483647,0,2147483647]
6 -> [1,2147483647,2147483647,2,0]
7 -> [2,0,2147483647,1,2147483647]
8 -> [0,2,2147483647,1,2147483647]
9 -> [1,2147483647,2,2147483647,0]
10 -> [2,2147483647,1,0,2147483647]
11 -> [2,2147483647,0,2147483647,1]
12 -> [1,2147483647,0,2,2147483647]
13 -> [0,2,1,2147483647,2147483647]
14 -> [1,2,2147483647,2147483647,0]
15 -> [0,1,2,2147483647,2147483647]
16 -> [1,2,0,2147483647,2147483647]
17 -> [2,0,1,2147483647,2147483647]
18 -> [1,2147483647,2147483647,0,2]
19 -> [1,0,2147483647,2,2147483647]
20 -> [2,1,2147483647,0,2147483647]
21 -> [0,2,2147483647,1,2147483647]
22 -> [1,0,2,2147483647,2147483647]
23 -> [2,1,2147483647,2147483647,0]
24 -> [1,2,2147483647,0,2147483647]
25 -> [1,2147483647,2147483647,2,0]
26 -> [0,1,2,2147483647,2147483647]
27 -> [0,1,2147483647,2,2147483647]
28 -> [0,1,2,2147483647,2147483647]
29 -> [0,2147483647,2,2147483647,1]
30 -> [0,2147483647,2147483647,2,1]
31 -> [2,1,2147483647,0,2147483647]
32 -> [2,0,2147483647,2147483647,1]
33 -> [2,1,2147483647,0,2147483647]
34 -> [2,2147483647,0,2147483647,1]
35 -> [2,0,2147483647,2147483647,1]
36 -> [0,1,2,2147483647,2147483647]
37 -> [2,0,2147483647,1,2147483647]
38 -> [0,2,1,2147483647,2147483647]
39 -> [2,1,0,2147483647,2147483647]
40 -> [2,2147483647,0,1,2147483647]
41 -> [1,2,0,2147483647,2147483647]
42 -> [0,1,2147483647,2147483647,2]
43 -> [1,0,2,2147483647,2147483647]
44 -> [2,1,2147483647,2147483647,0]
45 -> [1,2,0,2147483647,2147483647]
46 -> [1,2,0,2147483647,2147483647]
47 -> [2,2147483647,0,1,2147483647]
48 -> [2,0,1,2147483647,2147483647]
49 -> [2,0,1,2147483647,2147483647]
50 -> [1,0,2,2147483647,2147483647]
51 -> [0,2,1,2147483647,2147483647]
52 -> [2,2147483647,0,2147483647,1]
53 -> [0,2,1,2147483647,2147483647]
54 -> [0,1,2,2147483647,2147483647]
55 -> [1,2,0,2147483647,2147483647]
56 -> [2,2147483647,1,0,2147483647]
57 -> [2,1,2147483647,0,2147483647]
58 -> [1,0,2147483647,2,2147483647]
59 -> [0,2,2147483647,1,2147483647]
60 -> [2,0,1,2147483647,2147483647]
61 -> [0,2,2147483647,2147483647,1]
62 -> [2,0,2147483647,2147483647,1]
63 -> [1,2,0,2147483647,2147483647]
64 -> [0,2,2147483647,1,2147483647]
65 -> [0,2147483647,1,2147483647,2]
66 -> [2,0,1,2147483647,2147483647]
67 -> [0,1,2147483647,2147483647,2]
68 -> [2,1,0,2147483647,2147483647]
69 -> [0,2,2147483647,2147483647,1]
70 -> [2,1,0,2147483647,2147483647]
71 -> [2,1,0,2147483647,2147483647]
72 -> [2,2147483647,0,2147483647,1]
73 -> [0,1,2147483647,2,2147483647]
74 -> [1,2147483647,2,0,2147483647]
75 -> [2,1,0,2147483647,2147483647]
76 -> [1,2,2147483647,2147483647,0]
77 -> [1,2,0,2147483647,2147483647]
78 -> [2,1,2147483647,0,2147483647]
79 -> [0,2147483647,2,2147483647,1]
80 -> [2,0,1,2147483647,2147483647]
81 -> [2,1,0,2147483647,2147483647]
82 -> [2,1,2147483647,2147483647,0]
83 -> [2,0,1,2147483647,2147483647]
84 -> [2,1,0,2147483647,2147483647]
85 -> [0,2147483647,2147483647,2,1]
86 -> [1,2147483647,2,0,2147483647]
87 -> [2,2147483647,2147483647,1,0]
88 -> [2,0,1,2147483647,2147483647]
89 -> [0,2,2147483647,2147483647,1]
90 -> [1,2,2147483647,0,2147483647]
91 -> [1,2,2147483647,0,2147483647]
92 -> [2,1,0,2147483647,2147483647]
93 -> [2,0,1,2147483647,2147483647]
94 -> [2,0,1,2147483647,2147483647]
95 -> [1,0,2147483647,2,2147483647]
96 -> [0,2,1,2147483647,2147483647]
97 -> [2,2147483647,1,0,2147483647]
98 -> [2,1,2147483647,2147483647,0]
99 -> [0,2147483647,2,1,2147483647]
[       OK ] CRUSH.indep_toosmall (42 ms)
[ RUN      ] CRUSH.indep_basic
ID    WEIGHT    TYPE NAME
-1    27.00000    root default
-3    9.00000        rack rack-0
-2    3.00000            host host-0-0
0    1.00000                osd.0
1    1.00000                osd.1
2    1.00000                osd.2
-4    3.00000            host host-0-1
3    1.00000                osd.3
4    1.00000                osd.4
5    1.00000                osd.5
-5    3.00000            host host-0-2
6    1.00000                osd.6
7    1.00000                osd.7
8    1.00000                osd.8
-7    9.00000        rack rack-1
-6    3.00000            host host-1-0
9    1.00000                osd.9
10    1.00000                osd.10
11    1.00000                osd.11
-8    3.00000            host host-1-1
12    1.00000                osd.12
13    1.00000                osd.13
14    1.00000                osd.14
-9    3.00000            host host-1-2
15    1.00000                osd.15
16    1.00000                osd.16
17    1.00000                osd.17
-11    9.00000        rack rack-2
-10    3.00000            host host-2-0
18    1.00000                osd.18
19    1.00000                osd.19
20    1.00000                osd.20
-12    3.00000            host host-2-1
21    1.00000                osd.21
22    1.00000                osd.22
23    1.00000                osd.23
-13    3.00000            host host-2-2
24    1.00000                osd.24
25    1.00000                osd.25
26    1.00000                osd.26
0 -> [11,3,23,2,7]
1 -> [9,7,1,3,13]
2 -> [17,9,22,5,14]
3 -> [4,6,0,10,15]
4 -> [14,22,19,0,9]
5 -> [3,25,10,22,1]
6 -> [10,3,17,25,1]
7 -> [19,10,25,21,12]
8 -> [10,6,0,22,14]
9 -> [22,18,8,16,0]
10 -> [25,12,5,9,20]
11 -> [13,24,18,22,5]
12 -> [24,18,22,8,2]
13 -> [15,6,14,25,2]
14 -> [13,8,24,20,0]
15 -> [14,4,25,10,15]
16 -> [22,12,0,8,17]
17 -> [24,0,11,8,5]
18 -> [3,17,25,1,18]
19 -> [5,20,2,21,15]
20 -> [14,2,3,20,24]
21 -> [14,17,1,9,3]
22 -> [20,16,11,6,4]
23 -> [9,25,5,8,17]
24 -> [12,20,6,0,4]
25 -> [12,16,20,26,11]
26 -> [18,4,17,10,13]
27 -> [23,25,14,0,20]
28 -> [2,13,23,7,4]
29 -> [2,19,6,24,22]
30 -> [11,0,20,23,17]
31 -> [8,4,21,25,18]
32 -> [19,2,7,11,13]
33 -> [14,5,21,24,9]
34 -> [13,25,21,6,4]
35 -> [6,1,13,10,25]
36 -> [1,23,16,13,4]
37 -> [25,17,22,11,20]
38 -> [1,8,3,14,9]
39 -> [16,9,22,8,24]
40 -> [23,18,15,26,13]
41 -> [19,6,0,25,5]
42 -> [18,3,14,11,21]
43 -> [10,0,21,6,16]
44 -> [11,20,2,17,22]
45 -> [3,24,16,12,9]
46 -> [16,21,26,14,11]
47 -> [25,15,10,6,2]
48 -> [17,6,19,26,21]
49 -> [20,12,4,17,7]
50 -> [14,9,21,17,6]
51 -> [1,20,13,5,23]
52 -> [14,16,8,24,3]
53 -> [23,0,19,9,16]
54 -> [18,3,16,14,10]
55 -> [3,8,22,9,25]
56 -> [18,16,3,2,14]
57 -> [16,20,7,26,21]
58 -> [16,11,23,0,14]
59 -> [0,14,24,20,9]
60 -> [22,19,1,8,4]
61 -> [24,14,2,17,4]
62 -> [14,17,9,6,19]
63 -> [18,7,5,24,9]
64 -> [19,26,11,4,6]
65 -> [2,14,3,9,8]
66 -> [12,18,4,6,26]
67 -> [0,18,21,13,6]
68 -> [8,17,24,18,10]
69 -> [20,6,26,15,5]
70 -> [9,23,14,26,16]
71 -> [25,5,2,22,6]
72 -> [6,9,16,13,2]
73 -> [21,3,24,6,16]
74 -> [11,3,13,7,19]
75 -> [14,19,17,23,6]
76 -> [12,7,10,22,26]
77 -> [20,25,0,9,13]
78 -> [17,24,9,1,12]
79 -> [16,6,14,19,3]
80 -> [13,24,5,8,0]
81 -> [12,5,1,8,23]
82 -> [23,10,6,5,26]
83 -> [15,2,6,26,13]
84 -> [10,24,6,20,17]
85 -> [25,13,17,19,3]
86 -> [4,7,24,16,12]
87 -> [15,20,21,4,13]
88 -> [10,1,16,23,25]
89 -> [22,20,14,16,6]
90 -> [3,7,24,21,15]
91 -> [11,22,8,0,17]
92 -> [17,7,24,19,22]
93 -> [23,12,1,9,15]
94 -> [15,23,13,5,11]
95 -> [13,1,26,3,11]
96 -> [2,14,18,5,9]
97 -> [21,19,11,2,12]
98 -> [18,16,6,10,1]
99 -> [0,15,25,3,9]
[       OK ] CRUSH.indep_basic (207 ms)
[ RUN      ] CRUSH.indep_out_alt
ID    WEIGHT    TYPE NAME
-1    27.00000    root default
-3    9.00000        rack rack-0
-2    3.00000            host host-0-0
0    1.00000                osd.0
1    1.00000                osd.1
2    1.00000                osd.2
-4    3.00000            host host-0-1
3    1.00000                osd.3
4    1.00000                osd.4
5    1.00000                osd.5
-5    3.00000            host host-0-2
6    1.00000                osd.6
7    1.00000                osd.7
8    1.00000                osd.8
-7    9.00000        rack rack-1
-6    3.00000            host host-1-0
9    1.00000                osd.9
10    1.00000                osd.10
11    1.00000                osd.11
-8    3.00000            host host-1-1
12    1.00000                osd.12
13    1.00000                osd.13
14    1.00000                osd.14
-9    3.00000            host host-1-2
15    1.00000                osd.15
16    1.00000                osd.16
17    1.00000                osd.17
-11    9.00000        rack rack-2
-10    3.00000            host host-2-0
18    1.00000                osd.18
19    1.00000                osd.19
20    1.00000                osd.20
-12    3.00000            host host-2-1
21    1.00000                osd.21
22    1.00000                osd.22
23    1.00000                osd.23
-13    3.00000            host host-2-2
24    1.00000                osd.24
25    1.00000                osd.25
26    1.00000                osd.26
0 -> [11,3,23,1,7,19,13,17,25]
1 -> [9,7,1,19,13,25,5,15,21]
2 -> [17,9,3,25,13,1,19,21,7]
3 -> [5,7,21,11,15,1,25,19,13]
4 -> [13,23,26,1,9,15,7,5,19]
5 -> [3,25,11,23,13,7,1,19,17]
6 -> [11,3,13,25,1,7,19,17,21]
7 -> [19,11,25,21,13,1,15,7,3]
8 -> [11,25,1,23,13,19,5,7,17]
9 -> [23,19,7,15,1,9,26,13,3]
10 -> [25,13,5,1,19,17,7,23,9]
11 -> [13,25,19,21,15,7,3,1,9]
12 -> [26,19,15,7,1,9,13,21,3]
13 -> [15,7,13,25,1,23,19,5,9]
14 -> [13,7,25,19,1,23,15,11,5]
15 -> [13,5,25,9,15,21,7,1,19]
16 -> [21,25,1,7,17,11,19,13,3]
17 -> [26,1,11,7,13,17,19,5,21]
18 -> [3,17,25,1,19,9,13,23,7]
19 -> [5,19,1,13,15,7,11,26,23]
20 -> [13,11,3,19,17,7,1,21,25]
21 -> [13,17,26,9,3,23,1,19,7]
22 -> [19,15,11,26,3,1,21,7,13]
23 -> [9,25,5,7,15,19,13,23,1]
24 -> [13,19,21,1,5,11,26,7,17]
25 -> [13,17,19,3,11,1,21,7,26]
26 -> [19,3,17,11,1,26,13,21,7]
27 -> [23,25,3,1,19,15,13,11,7]
28 -> [1,13,23,7,11,26,19,17,5]
29 -> [1,11,7,25,21,13,19,5,17]
30 -> [11,1,13,23,17,7,19,26,5]
31 -> [7,5,11,21,19,13,17,1,26]
32 -> [19,1,7,11,13,21,25,17,5]
33 -> [13,5,21,26,1,15,9,19,7]
34 -> [13,25,21,17,5,1,7,19,11]
35 -> [7,1,13,11,3,26,19,17,21]
36 -> [1,23,7,13,5,19,26,17,11]
37 -> [25,17,21,11,19,13,7,1,3]
38 -> [1,7,3,13,17,11,19,25,21]
39 -> [17,13,23,7,25,11,1,19,3]
40 -> [23,19,9,26,5,1,7,15,13]
41 -> [19,7,1,25,5,23,13,17,9]
42 -> [19,3,13,11,21,17,7,26,1]
43 -> [9,13,21,7,26,19,1,3,15]
44 -> [11,19,13,17,21,7,3,1,26]
45 -> [3,26,15,13,9,7,19,1,23]
46 -> [15,21,26,13,11,1,7,3,19]
47 -> [25,19,5,23,1,7,15,9,13]
48 -> [17,7,19,26,1,5,21,9,13]
49 -> [19,13,3,17,11,26,1,23,7]
50 -> [13,9,21,17,7,25,5,1,19]
51 -> [1,19,13,5,23,17,7,9,25]
52 -> [13,15,7,25,3,19,1,9,21]
53 -> [23,1,19,9,17,13,3,7,26]
54 -> [19,3,17,13,11,21,1,26,7]
55 -> [3,7,23,9,25,15,1,19,13]
56 -> [19,17,3,1,25,7,23,11,13]
57 -> [17,19,7,26,21,5,1,13,11]
58 -> [15,11,23,1,13,19,5,26,7]
59 -> [1,13,26,19,3,11,7,15,21]
60 -> [23,19,25,7,3,1,13,17,9]
61 -> [25,13,19,17,5,7,21,1,9]
62 -> [13,17,9,7,19,21,1,26,5]
63 -> [19,1,5,25,13,21,11,17,7]
64 -> [19,26,11,5,1,21,13,17,7]
65 -> [1,13,3,19,7,21,11,26,17]
66 -> [13,19,5,7,17,21,26,1,11]
67 -> [1,19,5,9,7,17,21,26,13]
68 -> [7,17,5,1,11,19,13,26,21]
69 -> [19,7,26,1,5,11,15,21,13]
70 -> [9,23,7,26,15,19,13,1,3]
71 -> [25,5,1,23,7,15,19,13,9]
72 -> [7,9,17,13,5,19,1,21,26]
73 -> [21,3,26,7,15,1,13,11,19]
74 -> [11,3,1,7,26,13,21,17,19]
75 -> [13,19,3,17,7,9,1,26,23]
76 -> [13,7,11,23,26,19,5,1,17]
77 -> [19,25,1,9,7,13,15,23,3]
78 -> [17,26,9,1,13,23,7,19,5]
79 -> [17,7,13,19,3,1,21,26,11]
80 -> [13,26,23,7,1,9,17,3,19]
81 -> [13,5,1,19,7,17,26,21,9]
82 -> [23,11,7,13,26,17,19,1,3]
83 -> [15,1,7,26,21,9,19,13,5]
84 -> [9,25,7,19,17,5,23,1,13]
85 -> [25,13,17,19,7,23,5,9,1]
86 -> [5,9,25,15,13,21,7,1,19]
87 -> [15,19,21,3,7,26,1,9,13]
88 -> [9,1,5,23,25,13,7,15,19]
89 -> [23,19,13,15,1,7,25,5,11]
90 -> [3,7,25,21,15,1,19,11,13]
91 -> [11,23,26,1,17,19,13,7,5]
92 -> [17,7,26,9,19,21,5,13,1]
93 -> [23,13,1,9,15,7,3,26,19]
94 -> [15,23,13,5,7,11,19,1,25]
95 -> [13,1,19,3,15,26,11,21,7]
96 -> [1,13,19,5,9,15,7,25,23]
97 -> [21,19,11,1,13,26,5,7,17]
98 -> [19,17,7,9,23,25,5,1,13]
99 -> [1,15,25,3,9,23,7,19,13]
[       OK ] CRUSH.indep_out_alt (60 ms)
[ RUN      ] CRUSH.indep_out_contig
ID    WEIGHT    TYPE NAME
-1    27.00000    root default
-3    9.00000        rack rack-0
-2    3.00000            host host-0-0
0    1.00000                osd.0
1    1.00000                osd.1
2    1.00000                osd.2
-4    3.00000            host host-0-1
3    1.00000                osd.3
4    1.00000                osd.4
5    1.00000                osd.5
-5    3.00000            host host-0-2
6    1.00000                osd.6
7    1.00000                osd.7
8    1.00000                osd.8
-7    9.00000        rack rack-1
-6    3.00000            host host-1-0
9    1.00000                osd.9
10    1.00000                osd.10
11    1.00000                osd.11
-8    3.00000            host host-1-1
12    1.00000                osd.12
13    1.00000                osd.13
14    1.00000                osd.14
-9    3.00000            host host-1-2
15    1.00000                osd.15
16    1.00000                osd.16
17    1.00000                osd.17
-11    9.00000        rack rack-2
-10    3.00000            host host-2-0
18    1.00000                osd.18
19    1.00000                osd.19
20    1.00000                osd.20
-12    3.00000            host host-2-1
21    1.00000                osd.21
22    1.00000                osd.22
23    1.00000                osd.23
-13    3.00000            host host-2-2
24    1.00000                osd.24
25    1.00000                osd.25
26    1.00000                osd.26
0 -> [11,17,23,2147483647,25,20,14]
1 -> [9,19,25,2147483647,13,22,15]
2 -> [17,9,2147483647,21,14,25,18]
3 -> [2147483647,14,18,10,15,26,23]
4 -> [14,22,18,24,9,16,2147483647]
5 -> [2147483647,25,10,22,13,20,15]
6 -> [10,2147483647,12,25,15,22,20]
7 -> [19,10,25,21,12,2147483647,17]
8 -> [10,17,2147483647,22,14,20,25]
9 -> [22,18,13,16,25,9,2147483647]
10 -> [25,12,9,2147483647,20,21,17]
11 -> [13,24,18,22,2147483647,11,16]
12 -> [24,18,14,11,16,23,2147483647]
13 -> [15,9,14,25,20,2147483647,21]
14 -> [13,2147483647,24,20,10,21,15]
15 -> [14,2147483647,25,19,15,22,9]
16 -> [22,10,18,26,17,2147483647,12]
17 -> [24,14,11,15,2147483647,23,19]
18 -> [10,17,25,13,18,22,2147483647]
19 -> [22,20,24,2147483647,15,13,10]
20 -> [14,10,24,20,15,2147483647,21]
21 -> [14,17,19,9,21,2147483647,24]
22 -> [20,16,11,12,21,25,2147483647]
23 -> [9,25,15,2147483647,21,18,13]
24 -> [12,20,23,15,2147483647,11,26]
25 -> [12,16,20,21,11,2147483647,24]
26 -> [18,2147483647,17,10,21,13,24]
27 -> [23,25,15,9,20,2147483647,12]
28 -> [15,13,23,9,26,2147483647,19]
29 -> [2147483647,16,9,24,22,12,20]
30 -> [11,12,24,23,17,2147483647,20]
31 -> [2147483647,24,22,11,18,12,15]
32 -> [19,2147483647,15,11,13,26,22]
33 -> [14,18,21,24,2147483647,15,10]
34 -> [13,25,21,18,16,11,2147483647]
35 -> [22,19,13,10,2147483647,26,15]
36 -> [17,23,9,13,26,20,2147483647]
37 -> [25,17,22,11,20,12,2147483647]
38 -> [25,23,11,14,2147483647,20,17]
39 -> [16,13,22,20,24,10,2147483647]
40 -> [23,18,13,26,2147483647,17,9]
41 -> [19,14,2147483647,25,10,23,15]
42 -> [18,2147483647,14,11,21,17,26]
43 -> [10,17,21,13,19,25,2147483647]
44 -> [11,20,24,17,22,14,2147483647]
45 -> [2147483647,24,16,12,9,21,19]
46 -> [16,21,26,14,11,19,2147483647]
47 -> [25,22,2147483647,10,18,13,15]
48 -> [17,12,19,26,10,2147483647,21]
49 -> [20,12,23,17,9,26,2147483647]
50 -> [14,9,21,18,16,24,2147483647]
51 -> [2147483647,20,13,10,23,16,26]
52 -> [14,22,16,24,2147483647,20,11]
53 -> [23,26,19,9,16,12,2147483647]
54 -> [18,24,16,14,10,21,2147483647]
55 -> [16,13,22,9,25,2147483647,19]
56 -> [18,16,2147483647,11,21,13,24]
57 -> [16,20,2147483647,26,21,9,13]
58 -> [16,11,23,18,14,2147483647,25]
59 -> [17,14,24,20,23,2147483647,11]
60 -> [22,19,2147483647,24,16,9,13]
61 -> [24,14,2147483647,17,19,11,22]
62 -> [14,17,9,24,19,21,2147483647]
63 -> [18,16,9,24,2147483647,22,14]
64 -> [19,26,11,16,13,21,2147483647]
65 -> [19,14,26,17,2147483647,21,10]
66 -> [12,18,21,17,10,2147483647,24]
67 -> [17,18,23,9,2147483647,24,13]
68 -> [25,17,12,21,10,18,2147483647]
69 -> [20,23,26,12,2147483647,11,15]
70 -> [9,23,2147483647,26,16,18,12]
71 -> [25,19,15,22,9,2147483647,14]
72 -> [2147483647,9,22,13,25,19,16]
73 -> [21,12,24,18,16,2147483647,11]
74 -> [11,18,15,2147483647,26,13,21]
75 -> [14,19,2147483647,24,22,9,16]
76 -> [12,16,10,22,26,18,2147483647]
77 -> [20,25,2147483647,9,15,14,23]
78 -> [17,24,9,2147483647,20,22,13]
79 -> [16,23,14,19,11,2147483647,25]
80 -> [13,24,15,2147483647,23,10,18]
81 -> [12,20,23,11,2147483647,17,26]
82 -> [23,10,18,12,26,17,2147483647]
83 -> [15,2147483647,14,26,23,9,20]
84 -> [10,24,14,20,17,21,2147483647]
85 -> [25,13,17,19,9,23,2147483647]
86 -> [9,20,24,16,13,22,2147483647]
87 -> [15,20,21,2147483647,12,24,10]
88 -> [10,2147483647,20,23,25,13,17]
89 -> [22,20,14,16,10,25,2147483647]
90 -> [20,2147483647,24,21,15,13,10]
91 -> [11,22,24,2147483647,17,18,14]
92 -> [17,23,24,2147483647,13,9,18]
93 -> [23,12,2147483647,24,15,19,9]
94 -> [15,23,13,26,10,2147483647,19]
95 -> [13,21,11,2147483647,16,26,18]
96 -> [25,14,18,23,9,17,2147483647]
97 -> [21,19,11,24,12,16,2147483647]
98 -> [18,16,14,10,23,24,2147483647]
99 -> [19,15,25,21,9,2147483647,12]
[       OK ] CRUSH.indep_out_contig (76 ms)
[ RUN      ] CRUSH.indep_out_progressive
ID    WEIGHT    TYPE NAME
-1    27.00000    root default
-3    9.00000        rack rack-0
-2    3.00000            host host-0-0
0    1.00000                osd.0
1    1.00000                osd.1
2    1.00000                osd.2
-4    3.00000            host host-0-1
3    1.00000                osd.3
4    1.00000                osd.4
5    1.00000                osd.5
-5    3.00000            host host-0-2
6    1.00000                osd.6
7    1.00000                osd.7
8    1.00000                osd.8
-7    9.00000        rack rack-1
-6    3.00000            host host-1-0
9    1.00000                osd.9
10    1.00000                osd.10
11    1.00000                osd.11
-8    3.00000            host host-1-1
12    1.00000                osd.12
13    1.00000                osd.13
14    1.00000                osd.14
-9    3.00000            host host-1-2
15    1.00000                osd.15
16    1.00000                osd.16
17    1.00000                osd.17
-11    9.00000        rack rack-2
-10    3.00000            host host-2-0
18    1.00000                osd.18
19    1.00000                osd.19
20    1.00000                osd.20
-12    3.00000            host host-2-1
21    1.00000                osd.21
22    1.00000                osd.22
23    1.00000                osd.23
-13    3.00000            host host-2-2
24    1.00000                osd.24
25    1.00000                osd.25
26    1.00000                osd.26
(0/27 out) 1 -> [9,7,1,26,13,22,5]
(1/27 out) 1 -> [9,7,1,26,13,22,5]
(2/27 out) 1 -> [9,7,2,26,13,22,5]
 0 moved, 1 changed
(3/27 out) 1 -> [9,7,25,15,13,22,5]
 0 moved, 2 changed
(4/27 out) 1 -> [9,7,25,15,13,22,5]
(5/27 out) 1 -> [9,7,25,15,13,22,5]
(6/27 out) 1 -> [9,7,25,19,13,22,15]
 15 moved from 3 to 6
 1 moved, 2 changed
(7/27 out) 1 -> [9,7,25,19,13,22,15]
(8/27 out) 1 -> [9,8,25,19,13,22,15]
 0 moved, 1 changed
(9/27 out) 1 -> [9,19,25,2147483647,13,22,15]
 19 moved from 3 to 1
 1 moved, 2 changed
(10/27 out) 1 -> [10,19,25,2147483647,13,22,15]
 0 moved, 1 changed
(11/27 out) 1 -> [11,19,25,2147483647,13,22,15]
 0 moved, 1 changed
(12/27 out) 1 -> [25,19,2147483647,2147483647,13,22,15]
 25 moved from 2 to 0
 1 moved, 2 changed
(13/27 out) 1 -> [25,19,2147483647,2147483647,13,22,15]
(14/27 out) 1 -> [25,19,2147483647,2147483647,14,22,15]
 0 moved, 1 changed
(15/27 out) 1 -> [25,19,2147483647,2147483647,21,2147483647,15]
 0 moved, 2 changed
(16/27 out) 1 -> [25,19,2147483647,2147483647,21,2147483647,16]
 0 moved, 1 changed
(17/27 out) 1 -> [25,19,2147483647,2147483647,21,2147483647,17]
 0 moved, 1 changed
(18/27 out) 1 -> [25,19,2147483647,2147483647,21,2147483647,2147483647]
 0 moved, 1 changed
(19/27 out) 1 -> [25,19,2147483647,2147483647,21,2147483647,2147483647]
(20/27 out) 1 -> [25,20,2147483647,2147483647,21,2147483647,2147483647]
 0 moved, 1 changed
(21/27 out) 1 -> [25,2147483647,2147483647,2147483647,21,2147483647,2147483647]
 0 moved, 1 changed
(22/27 out) 1 -> [25,2147483647,2147483647,2147483647,22,2147483647,2147483647]
 0 moved, 1 changed
(23/27 out) 1 -> [25,2147483647,2147483647,2147483647,23,2147483647,2147483647]
 0 moved, 1 changed
(24/27 out) 1 -> [25,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647]
 0 moved, 1 changed
(25/27 out) 1 -> [25,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647]
(26/27 out) 1 -> [26,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647]
 0 moved, 1 changed
(0/27 out) 2 -> [17,9,4,25,14,0,18]
(1/27 out) 2 -> [17,9,4,25,14,1,18]
 0 moved, 1 changed
(2/27 out) 2 -> [17,9,4,25,14,2,18]
 0 moved, 1 changed
(3/27 out) 2 -> [17,9,4,21,14,25,18]
 25 moved from 3 to 5
 1 moved, 2 changed
(4/27 out) 2 -> [17,9,4,21,14,25,18]
(5/27 out) 2 -> [17,9,5,21,14,25,18]
 0 moved, 1 changed
(6/27 out) 2 -> [17,9,8,21,14,25,18]
 0 moved, 1 changed
(7/27 out) 2 -> [17,9,8,21,14,25,18]
(8/27 out) 2 -> [17,9,8,21,14,25,18]
(9/27 out) 2 -> [17,9,2147483647,21,14,25,18]
 0 moved, 1 changed
(10/27 out) 2 -> [17,11,2147483647,21,14,25,18]
 0 moved, 1 changed
(11/27 out) 2 -> [17,11,2147483647,21,14,25,18]
(12/27 out) 2 -> [17,2147483647,2147483647,21,14,25,18]
 0 moved, 1 changed
(13/27 out) 2 -> [17,2147483647,2147483647,21,14,25,18]
(14/27 out) 2 -> [17,2147483647,2147483647,21,14,25,18]
(15/27 out) 2 -> [17,2147483647,2147483647,21,2147483647,25,18]
 0 moved, 1 changed
(16/27 out) 2 -> [17,2147483647,2147483647,21,2147483647,25,18]
(17/27 out) 2 -> [17,2147483647,2147483647,21,2147483647,25,18]
(18/27 out) 2 -> [22,2147483647,2147483647,2147483647,2147483647,25,18]
 0 moved, 2 changed
(19/27 out) 2 -> [22,2147483647,2147483647,2147483647,2147483647,25,19]
 0 moved, 1 changed
(20/27 out) 2 -> [22,2147483647,2147483647,2147483647,2147483647,25,20]
 0 moved, 1 changed
(21/27 out) 2 -> [22,2147483647,2147483647,2147483647,2147483647,25,2147483647]
 0 moved, 1 changed
(22/27 out) 2 -> [22,2147483647,2147483647,2147483647,2147483647,25,2147483647]
(23/27 out) 2 -> [23,2147483647,2147483647,2147483647,2147483647,25,2147483647]
 0 moved, 1 changed
(24/27 out) 2 -> [2147483647,2147483647,2147483647,2147483647,2147483647,25,2147483647]
 0 moved, 1 changed
(25/27 out) 2 -> [2147483647,2147483647,2147483647,2147483647,2147483647,25,2147483647]
(26/27 out) 2 -> [2147483647,2147483647,2147483647,2147483647,2147483647,26,2147483647]
 0 moved, 1 changed
(0/27 out) 3 -> [4,6,18,10,15,0,12]
(1/27 out) 3 -> [4,6,18,10,15,2,12]
 0 moved, 1 changed
(2/27 out) 3 -> [4,6,18,10,15,2,12]
(3/27 out) 3 -> [4,6,18,10,15,26,12]
 0 moved, 1 changed
(4/27 out) 3 -> [4,6,18,10,15,26,12]
(5/27 out) 3 -> [5,6,18,10,15,26,12]
 0 moved, 1 changed
(6/27 out) 3 -> [23,6,18,10,15,26,12]
 0 moved, 1 changed
(7/27 out) 3 -> [23,7,18,10,15,26,12]
 0 moved, 1 changed
(8/27 out) 3 -> [23,8,18,10,15,26,12]
 0 moved, 1 changed
(9/27 out) 3 -> [2147483647,14,18,10,15,26,23]
 23 moved from 0 to 6
 1 moved, 3 changed
(10/27 out) 3 -> [2147483647,14,18,10,15,26,23]
(11/27 out) 3 -> [2147483647,14,18,11,15,26,23]
 0 moved, 1 changed
(12/27 out) 3 -> [2147483647,14,18,2147483647,15,26,23]
 0 moved, 1 changed
(13/27 out) 3 -> [2147483647,14,18,2147483647,15,26,23]
(14/27 out) 3 -> [2147483647,14,18,2147483647,15,26,23]
(15/27 out) 3 -> [2147483647,2147483647,18,2147483647,15,26,23]
 0 moved, 1 changed
(16/27 out) 3 -> [2147483647,2147483647,18,2147483647,16,26,23]
 0 moved, 1 changed
(17/27 out) 3 -> [2147483647,2147483647,18,2147483647,17,26,23]
 0 moved, 1 changed
(18/27 out) 3 -> [2147483647,2147483647,18,2147483647,2147483647,26,23]
 0 moved, 1 changed
(19/27 out) 3 -> [2147483647,2147483647,20,2147483647,2147483647,26,23]
 0 moved, 1 changed
(20/27 out) 3 -> [2147483647,2147483647,20,2147483647,2147483647,26,23]
(21/27 out) 3 -> [2147483647,2147483647,2147483647,2147483647,2147483647,26,23]
 0 moved, 1 changed
(22/27 out) 3 -> [2147483647,2147483647,2147483647,2147483647,2147483647,26,23]
(23/27 out) 3 -> [2147483647,2147483647,2147483647,2147483647,2147483647,26,23]
(24/27 out) 3 -> [2147483647,2147483647,2147483647,2147483647,2147483647,26,2147483647]
 0 moved, 1 changed
(25/27 out) 3 -> [2147483647,2147483647,2147483647,2147483647,2147483647,26,2147483647]
(26/27 out) 3 -> [2147483647,2147483647,2147483647,2147483647,2147483647,26,2147483647]
(0/27 out) 4 -> [14,22,18,0,9,16,7]
(1/27 out) 4 -> [14,22,18,1,9,16,7]
 0 moved, 1 changed
(2/27 out) 4 -> [14,22,18,2,9,16,7]
 0 moved, 1 changed
(3/27 out) 4 -> [14,22,18,24,9,16,7]
 0 moved, 1 changed
(4/27 out) 4 -> [14,22,18,24,9,16,7]
(5/27 out) 4 -> [14,22,18,24,9,16,7]
(6/27 out) 4 -> [14,22,18,24,9,16,7]
(7/27 out) 4 -> [14,22,18,24,9,16,7]
(8/27 out) 4 -> [14,22,18,24,9,16,8]
 0 moved, 1 changed
(9/27 out) 4 -> [14,22,18,24,9,16,2147483647]
 0 moved, 1 changed
(10/27 out) 4 -> [14,22,18,24,10,16,2147483647]
 0 moved, 1 changed
(11/27 out) 4 -> [14,22,18,24,11,16,2147483647]
 0 moved, 1 changed
(12/27 out) 4 -> [14,22,18,24,2147483647,16,2147483647]
 0 moved, 1 changed
(13/27 out) 4 -> [14,22,18,24,2147483647,16,2147483647]
(14/27 out) 4 -> [14,22,18,24,2147483647,16,2147483647]
(15/27 out) 4 -> [2147483647,22,18,24,2147483647,16,2147483647]
 0 moved, 1 changed
(16/27 out) 4 -> [2147483647,22,18,24,2147483647,16,2147483647]
(17/27 out) 4 -> [2147483647,22,18,24,2147483647,17,2147483647]
 0 moved, 1 changed
(18/27 out) 4 -> [2147483647,22,18,24,2147483647,2147483647,2147483647]
 0 moved, 1 changed
(19/27 out) 4 -> [2147483647,22,20,24,2147483647,2147483647,2147483647]
 0 moved, 1 changed
(20/27 out) 4 -> [2147483647,22,20,24,2147483647,2147483647,2147483647]
(21/27 out) 4 -> [2147483647,22,2147483647,24,2147483647,2147483647,2147483647]
 0 moved, 1 changed
(22/27 out) 4 -> [2147483647,22,2147483647,24,2147483647,2147483647,2147483647]
(23/27 out) 4 -> [2147483647,23,2147483647,24,2147483647,2147483647,2147483647]
 0 moved, 1 changed
(24/27 out) 4 -> [2147483647,2147483647,2147483647,24,2147483647,2147483647,2147483647]
 0 moved, 1 changed
(25/27 out) 4 -> [2147483647,2147483647,2147483647,25,2147483647,2147483647,2147483647]
 0 moved, 1 changed
(26/27 out) 4 -> [2147483647,2147483647,2147483647,26,2147483647,2147483647,2147483647]
 0 moved, 1 changed
77 total changed
[       OK ] CRUSH.indep_out_progressive (128 ms)
[ RUN      ] CRUSH.straw_zero
[       OK ] CRUSH.straw_zero (8 ms)
[ RUN      ] CRUSH.straw_same
0    1.000000    2823    1.000000    2822    1.000000
1    2.001526    5738    2.032589    5742    2.034727
2    2.000000    5718    2.025505    5717    2.025868
3    3.001526    8462    2.997520    8466    3.000000
4    3.000000    8594    3.044279    8592    3.044649
5    4.001526    11565    4.096706    11566    4.098512
6    4.000000    11449    4.055615    11443    4.054926
7    5.001526    14326    5.074743    14327    5.076896
8    5.000000    14223    5.038257    14222    5.039688
9    6.001526    17102    6.058094    17103    6.060595
12 of 100000 = 0.000120 different
[       OK ] CRUSH.straw_same (150 ms)
[ RUN      ] CRUSH.straw2_stddev
maxskew    stddev
expect            66666.666667
osd    weight    count    adjusted
0    1.0000    66000    66000
1    1.0000    66918    66918
2    1.0000    66931    66931
3    1.0000    66597    66597
4    1.0000    67020    67020
5    1.0000    66484    66484
6    1.0000    66109    66109
7    1.0000    67139    67139
8    1.0000    66488    66488
9    1.0000    66582    66582
10    1.0000    66611    66611
11    1.0000    66771    66771
12    1.0000    66676    66676
13    1.0000    67137    67137
14    1.0000    66537    66537
std dev 323.092281
     vs 249.443826    (expected)
1.000000    323.092281
expect            66666.666667
osd    weight    count    adjusted
0    1.0000    9016    65928
1    1.2500    11485    67186
2    1.5625    14160    66268
3    1.9531    17698    66260
4    2.4414    22245    66627
5    3.0518    27653    66260
6    3.8147    34505    66143
7    4.7684    43641    66924
8    5.9605    54025    66279
9    7.4506    68046    66784
10    9.3132    84726    66524
11    11.6415    105942    66545
12    14.5519    132942    66804
13    18.1898    166630    66986
14    22.7373    207286    66664
std dev 361.978260
     vs 249.217965    (expected)
22.737305    361.978260
expect            66666.666667
osd    weight    count    adjusted
0    1.0000    1147    66815
1    1.5000    1691    65670
2    2.2500    2530    65501
3    3.3750    3935    67918
4    5.0625    5868    67521
5    7.5938    8594    65925
6    11.3906    12926    66104
7    17.0859    19661    67031
8    25.6289    29292    66578
9    38.4434    43943    66586
10    57.6650    66064    66737
11    86.4976    98714    66479
12    129.7463    148586    66711
13    194.6195    223328    66845
14    291.9293    333721    66591
std dev 619.742046
     vs 249.321332    (expected)
291.929260    619.742046
expect            66666.666667
osd    weight    count    adjusted
0    1.0000    179    70335
1    1.7500    291    65339
2    3.0625    507    65050
3    5.3594    937    68698
4    9.3789    1581    66236
5    16.4131    2771    66338
6    28.7229    4847    66307
7    50.2651    8690    67931
8    87.9639    14924    66665
9    153.9368    26069    66542
10    269.3894    45706    66667
11    471.4314    79754    66474
12    825.0049    139847    66606
13    1443.7585    245707    66871
14    2526.5775    428190    66592
std dev 1267.124917
     vs 249.775244    (expected)
2526.577454    1267.124917
[       OK ] CRUSH.straw2_stddev (5663 ms)
[ RUN      ] CRUSH.straw2_reweight
expect            66666.666667
osd    weight    count    adjusted
0    1.0000    13817    66137
1    0.3000    4195    66939
2    2.0000    27887    66742
3    2.0000    27859    66675
4    3.0000    42069    67123
5    5.0000    69499    66533
6    0.5000    6894    65998
7    2.0000    28074    67190
8    1.0000    13978    66908
9    1.0000    13980    66917
10    2.0000    27771    66465
11    1.0000    13986    66946
12    1.0000    13814    66122
13    2.0000    28179    67441
14    48.0000    667998    66614
std dev 403.864209
     vs 249.443826
[       OK ] CRUSH.straw2_reweight (2851 ms)
[----------] 9 tests from CRUSH (9192 ms total)

[----------] Global test environment tear-down
[==========] 9 tests from 1 test case ran. (9193 ms total)
[  PASSED  ] 9 tests.
[harvis@centos7 build]$


posted @ 2017-04-09 18:18  Harvis  阅读(279)  评论(0编辑  收藏  举报