pingcap / go-ycsb

A Go port of Yahoo! Cloud Serving Benchmark (YCSB)
Apache License 2.0
602 stars 244 forks source link

Support for Elasticsearch 8 #239

Closed filipecosta90 closed 2 years ago

filipecosta90 commented 2 years ago

This PR enables storing the data in ElasticSearch.

Try it out

To try it out locally we can use docker in the following manner:

docker run -p 9200:9200 -p 9300:9300 -e "ELASTIC_PASSWORD=password"  docker.elastic.co/elasticsearch/elasticsearch:8.3.3

Practical example: 100K documents, 10 fields, 100B each field

Load the data

Considering we simulate 1KiB values per record (not including field name overhead/json overhead), lets populate a DB.

./bin/go-ycsb load elastic --interval 1 -p recordcount=100000 -p threadcount=16 -p es.hosts.list=https://localhost:9200 -p es.password=password -p fieldcount=100 -p fieldsize=100 -p es.insecure.ssl=true

run workload a

./bin/go-ycsb run elastic -P workloads/workloada --interval 1 -p recordcount=100000 -p threadcount=16 -p es.hosts.list=https://localhost:9200 -p es.password=password -p fieldcount=100 -p fieldsize=100 -p es.insecure.ssl=true -p es.bulk.flush_interval_secs=1