forked from RedHatSatellite/satellite-support
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmongo-benchmark
More file actions
executable file
·26 lines (18 loc) · 861 Bytes
/
Copy pathmongo-benchmark
File metadata and controls
executable file
·26 lines (18 loc) · 861 Bytes
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
#!/bin/bash
echo ""
echo "This test creates a 1GB file in your CWD, it will be removed at the completion of the test."
echo ""
echo "Running [READ] test of MongoDB for 4 minutes."
echo "{nThreads:32,fileSizeMB:1000,r:true}" > /tmp/mongo-read-test.json
timeout 240 mongoperf < /tmp/mongo-read-test.json > mongoperf-read.out
echo "Running [WRITE] test of MongoDB for 4 minutes."
echo "{nThreads:32,fileSizeMB:1000,w:true}" > /tmp/mongo-write-test.json
timeout 240 mongoperf < /tmp/mongo-write-test.json > mongoperf-write.out
rm /tmp/mongo-read-test.json
rm /tmp/mongo-write-test.json
rm mongoperf__testfile__tmp
echo "Test Complete, results in: ./mongoperf-read.out and ./mongoperf-write.out"
echo ""
echo "For comparison and background on mongoperf, see: "
echo " * https://www.mongodb.com/blog/post/checking-disk-performance-with-the-mongoperf"
echo ""