Downloading YCSB
- Download the tool package.
cd /home git clone https://gitcode.com/gh_mirrors/yc/YCSB.git cd YCSB
- Obtain the source code of the corresponding version.
- For MongoDB
git checkout 0.15.0
- For RocksDB
git checkout 19e885f7cb780fdded0547853f7810a150554caf
The main directories of YCSB are as follows:
- bin: contains an executable YCSB file, which is the command line interface for user operations. The main logic of the YCSB is as follows: Parse the command lines, set the Java environment, load Java-libs, encapsulate the commands into executable Java commands, and execute the commands.
- workloads: contains various workload templates, which can be customized.
The default six test scenarios are as follows:
- workloada: read/write balancing, 50%/50%, reads/writes
- workloadb: read-intensive, 95%/5%, reads/writes
- workloadc: read-only, 100%, reads
- workloadd: reads the most recently written records, 95%/5%, reads/insert
- workloade: inter-cell scanning, 95%/5%, scan/insert
- workloadf: read/written records balancing, 50%/50%, reads/insert
- workload_template: parameter list template
- For MongoDB
- Install dependencies.
- Back up the original Yum repository files and write the new configuration to the repo file.
1 2 3
mv /etc/yum.repos.d/ /etc/yum.repos.d-bak mkdir /etc/yum.repos.d echo -e "[local]\nname=local\nbaseurl=file:///mnt\ngpgcheck=0\nenabled=1" > /etc/yum.repos.d/local.repo
Check whether the previous operation is successful.

- Mount the OS image file.
- Use the KVM to mount the image to the /mnt/ directory. If the system displays a message indicating that no image is available after you run the command, mount the image again and then run the command.
Mount the image to the /mnt/ directory.
1mount /dev/sr0 /mnt/
- Upload the OS image to the /home directory and mount the image to the /mnt/ directory.
1mount /home/CentOS-7-aarch64-Everything-1810.iso /mnt/
Change the .iso file name as required. The operation takes effect only once and becomes invalid after the restart of the OS.
- Install dependencies.
1yum install python java maven -y
- Back up the original Yum repository files and write the new configuration to the repo file.
Parent topic: YCSB Test Guide