Ycsb is a very convenient test tool for Distributed File Systems: https://github.com/brianfrankcooper/YCSB
Features:
1. You can set the read/write ratio and number of threads at will. The printed results are detailed.
2. It is the testing standard of nosql official Jira such as hbase. During communication with people, ycsb's testing data best illustrates the problem.
Disadvantages:
1. data needs to be written again during each test. Otherwise, the correct key value cannot be selected during reading, resulting in a low memory hit rate.
2 key value distribution is uneven. If multiple nodes have less data, this will lead to skew.
3. A bug occurs when many threads exist.
Install
Ubuntu9.10
Limit 2.0.2
First compile the Java File
Go to the ycsb root directory
Ant
We use Mongo.
Ant dbcompile-MongoDB
Compile the Mongo Environment
If no successfully
Build compiled successfully
Run commands
Java-CP build/ycsb. jar: DB/MongoDB/lib/* COM. Yahoo. ycsb. CommandLine
-P hosts = localhost-DB com. Yahoo. ycsb. DB. mongodbclient
If the following information is displayed, the connection is successful.
Ycsb command line Client
Type "help" for Command Line Help
Start with "-help" for usage info
New Database URL = localhost: 10000/mydb
Mongo connection created with localhost: 10000/mydb
Connected.
Insert data
Java-CP build/ycsb. jar: DB/MongoDB/lib/* COM. Yahoo. ycsb. Client
-Load-DB com. Yahoo. ycsb. DB. mongodbclient-P workloads/workloada-P columnfamily = F1-P recordcount = 1000000-P Timeseries. granularity = 2000> transactions. dat
Transcations. dat to view the results
View mongodbclient Parameters
Java-CP build/ycsb. jar: DB/MongoDB/lib/* COM. Yahoo. ycsb. Client
-P-hosts = locahost-load-DB com. Yahoo. ycsb. DB. mongodbclient-help
Execution result
java
-
cp
build
/ycsb
.jar:db
/mongodb/lib/
*
com.yahoo.ycsb.Client -t
-db com.yahoo.ycsb.db.MongoDbClient -P workloads
/workloada
-p
columnfamily=family -p operationcount=1000000 -s
-threads 10 -target 100 -p
measurementtype=timeseries
-p timeseries.granularity=2000 > transactions.dat