-
Notifications
You must be signed in to change notification settings - Fork 0
/
MGIdxShardCms.txt
104 lines (91 loc) · 2.18 KB
/
MGIdxShardCms.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
db.CurrentPlayers.drop()
db.GlobalIncrement.drop()
db.Intervention.drop()
db.LiveWager.drop()
db.PlayersHistory.drop()
db.PlayersTransHistory.drop()
db.CurrentPlayers.createIndex(
{
"_id": 1
}
)
db.GlobalIncrement.createIndex(
{
"_id": "hashed"
}
)
db.Intervention.createIndex(
{
"_id": "hashed"
}
)
db.LiveWager.createIndex(
{
"_id": 1
}
)
db.PlayersHistory.createIndex(
{
"_id": 1
}
)
db.PlayersTransHistory.createIndex(
{
"_id": "hashed"
}
)
sh.shardCollection("safegaming.CurrentPlayers", {_id: 1}, true)
sh.shardCollection("safegaming.GlobalIncrement", {_id: "hashed"})
sh.shardCollection("safegaming.Intervention", {_id: "hashed"})
sh.shardCollection("safegaming.LiveWager", {_id: 1})
sh.shardCollection("safegaming.PlayersHistory", {_id: 1}, true)
sh.shardCollection("safegaming.PlayersTransHistory", {_id: "hashed"})
//Range
db.CurrentPlayers.createIndex(
{
"_id": 1
}
)
db.GlobalIncrement.createIndex(
{
"_id": 1
}
)
db.Intervention.createIndex(
{
"_id": 1
}
)
db.LiveWager.createIndex(
{
"_id": 1
}
)
db.PlayersHistory.createIndex(
{
"_id": 1
}
)
db.PlayersTransHistory.createIndex(
{
"_id": "hashed"
}
)
sh.shardCollection("safegaming.CurrentPlayers", {_id: 1})
sh.shardCollection("safegaming.GlobalIncrement", {_id: 1})
sh.shardCollection("safegaming.Intervention", {_id: 1})
sh.shardCollection("safegaming.LiveWager", {_id: 1})
sh.shardCollection("safegaming.PlayersHistory", {_id: 1})
sh.shardCollection("safegaming.PlayersTransHistory", {_id: "hashed"})
CurrentPlayers
GlobalIncrement
Intervention
LiveWager
PlayersHistory
PlayersTransHistory
./PlayerGenerationMG --TruncateSets false -s 800000000 -k 100000 -d 1000 --WorkerThreads 10000 -t 10000 --Histogram false
dotnet tool install dotnet-monitor --tool-path .
export jarfile=./latest-version/mongodb-performance-test.jar
java -jar $jarfile -m insert -o 100000000 -t 100 -db test -c perf -url "mongodb+srv://testing:[email protected]"
./dotnet-counters monitor -p $(pidof 'PlayerGenerationMG')
mongosh "mongodb+srv://philtest.szvon.mongodb.net/" --apiVersion 1 --username testing --password qFL7Br1PHldHGeC1