Ycsb test Mongo notes

Source: Internet
Author: User

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


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.