Skip to content

rtjohnso/YCSB-C

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YCSB-C

Quick Start for Debian-based systems

Install SplinterDB (https://github.com/vmware/splinterdb)

$ sudo apt-get install libtbb-dev librocksdb-dev libhiredis-dev
$ make

As the driver for Redis is linked by default, change the runtime library path to include the hiredis library by:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib

Run Workload A with a SplinterDB-based implementation of the database, for example:

$ ./ycsbc -db splinterdb -threads 4 -L workloads/load.spec -W workloads/workloada.spec

Note that we do not have load and run commands as the original YCSB. Specify how many records to load by the recordcount property. Reference properties listed in the .spec files in the workloads dir.

To inspect generated data, use the basic db and set property basicdb.verbose, e.g.

$ ./ycsbc -db basic -p basicdb.verbose 1 -L workloads/load.spec -w recordcount 3 -w fieldlength 5
# Loading records:      3
A new thread begins working.
INSERT usertable user12161962213042174405 [ field0=q____ ]
INSERT usertable user09929646806074584996 [ field0=h____ ]
INSERT usertable user16626593026977353223 [ field0=h____ ]
# Load throughput (KTPS)
basic   workloads/load.spec     1       7.16204

The field0= is not written to the database, it is only for display.

Workload properties may be set in the .spec files, or overridden on the command line with the -w flags. Common overrides:

  • zeropadding: generated keys will have length max(24, 4 + zeropadding). There's no way to generate keys shorter than 24 bytes.
  • fieldlength: the length of the generated values
  • recordcount: number of records to insert during the load step
  • operationcount: number of operations to perform during a workload

Putting that all together, to use max(24, 4 + 21) = 25 byte keys and 3 byte values, load 5 records and then run Workload A with 6 operations, run this:

$ ./ycsbc -db basic -p basicdb.verbose 1 -L workloads/load.spec -w zeropadding 21 -w fieldlength 3 -w recordcount 5 -W workloads/workloada.spec -w operationcount 6
# Loading records:      5
A new thread begins working.
INSERT usertable user012161962213042174405 [ field0=q__ ]
INSERT usertable user009929646806074584996 [ field0=h__ ]
INSERT usertable user016626593026977353223 [ field0=h__ ]
INSERT usertable user014394277620009763814 [ field0=x__ ]
INSERT usertable user003232700585171816769 [ field0=h__ ]
# Load throughput (KTPS)
basic   workloads/load.spec     1       7.89507
# Transaction count:    6
A new thread begins working.
UPDATE usertable user012161962213042174405 [ field0=iii ]
READ usertable user014394277620009763814 < all fields >
READ usertable user012161962213042174405 < all fields >
READ usertable user009929646806074584996 < all fields >
UPDATE usertable user009929646806074584996 [ field0=vvv ]
UPDATE usertable user014394277620009763814 [ field0=vvv ]
# Transaction throughput (KTPS)
basic   workloads/workloada.spec        1       29.4284

Or to replicate the "Workload A" experiment from Figure 5(b) in Conway et al, 2020 on SplinterDB with 12 threads, you might run

$ ./ycsbc -db splinterdb -threads 12 -L workloads/load.spec -w fieldlength 1024 -w recordcount 84000000 -W workloads/workloada.spec -w operationcount 10000000

About

Yahoo! Cloud Serving Benchmark in C++, a C++ version of YCSB (https://github.com/brianfrankcooper/YCSB/wiki)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 64.6%
  • C++ 30.6%
  • Makefile 2.7%
  • Ruby 1.2%
  • Other 0.9%