Skip to content

Example YCSB on a globally distributed cluster #3574

@robert-s-lee

Description

@robert-s-lee

YCSB has number of options that allows it to run well on a globally distributed database like CockroachDB. Only a standard JDBC connection is required and no custom code is required. The idea is as follows:

  • YCSB_KEY looks like with USER1000000000000000
  • set insertorder="ordered"
  • For Americas, set insertstart= 1000000000000000 and insertcount=50000
  • For Europe, set insertstart= 2000000000000000 and insertcount=50000
  • For Asia, set insertstart= 3000000000000000 and insertcount=50000
  • Adjust partitioning as follows:
CREATE TABLE usertable(YCSB_KEY VARCHAR PRIMARY KEY,
  FIELD0 VARCHAR, FIELD1 VARCHAR,
  FIELD2 VARCHAR, FIELD3 VARCHAR,
  FIELD4 VARCHAR, FIELD5 VARCHAR,
  FIELD6 VARCHAR, FIELD7 VARCHAR,
  FIELD8 VARCHAR, FIELD9 VARCHAR)
PARTITION BY RANGE (YCSB_KEY

) (
    PARTITION americas VALUES FROM ('USER1000000000000000') to ('USER2000000000000000')
    PARTITION europe VALUES FROM ('USER2000000000000000') to ('USER3000000000000000')
    PARTITION europe VALUES FROM ('USER3000000000000000') to ('USER4000000000000000')
);

ycsb.crdb.roachprod.txt

ycsb.crdb.util.txt

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions