Skip to content

YCSB workload A kills cockroach #20448

@amq

Description

@amq

BUG REPORT

I can consistently replicate Cockroach getting into a deadlock situation by running YCSB workload A

Workload A: Update heavy workload
This workload has a mix of 50/50 reads and writes. An application example is a session store recording recent actions.

This is how I run it:

Install

wget https://github.com/brianfrankcooper/YCSB/releases/download/0.12.0/ycsb-0.12.0.tar.gz
tar -zxvf ycsb-0.12.0.tar.gz
cd ycsb-0.12.0
wget https://jdbc.postgresql.org/download/postgresql-42.1.4.jar
mv postgresql-42.1.4.jar lib
ant

Create schema

DROP DATABASE IF EXISTS ycsb;
CREATE DATABASE ycsb;
CREATE TABLE ycsb.usertable (
YCSB_KEY VARCHAR (255) PRIMARY KEY,
  FIELD0 TEXT,
  FIELD1 TEXT,
  FIELD2 TEXT,
  FIELD3 TEXT,
  FIELD4 TEXT,
  FIELD5 TEXT,
  FIELD6 TEXT,
  FIELD7 TEXT,
  FIELD8 TEXT,
  FIELD9 TEXT
);

Load data

./bin/ycsb load jdbc -P workloads/workloada -p db.driver=org.postgresql.Driver -p db.url=jdbc:postgresql://cockroach-01:26257/ycsb -p db.user=root -p db.batchsize=1000 -p recordcount=50000

Run

for threads in 1 2 4 8 16 32 64 96 128 160 192; do
  ./bin/ycsb run jdbc -P workloads/workloada -p db.driver=org.postgresql.Driver -p db.url=jdbc:postgresql://cockroach-01:26257/ycsb -p db.user=root -p operationcount=0 -p maxexecutiontime=60 -s -threads $threads
done

On m5.xlarge with 500 GB gp2 storage (1500 IOPS with bursts up to 3000) cockroach gets into a deadlock at around after threads=96. Please note that running a single test with threads=96 is not sufficient, because the load accumulates with each run.

If deadlocks under a heavy load of updates is not considered a bug, please close the issue.

Metadata

Metadata

Labels

A-kv-transactionsRelating to MVCC and the transactional model.C-performancePerf of queries or internals. Solution not expected to change functional behavior.O-communityOriginated from the communityS-1-stabilitySevere stability issues that can be fixed by upgrading, but usually don’t resolve by restarting

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions