yugabyte / yugabyte-db

YugabyteDB - the cloud native distributed SQL database for mission-critical applications.
https://www.yugabyte.com
Other
8.92k stars 1.06k forks source link

[YSQL] Low TPS when I use sysbench to benchmark yugabytedb. #23585

Closed Franzli9467 closed 1 month ago

Franzli9467 commented 1 month ago

Jira Link: DB-12503

Description

When I use sysbench to benchmark test yugabytedb, the tps is very low. There are 10 tables, each with 1 million records. Three-node cluster, each node configured with CPU as E5-2630 v4 and 128GB memory. For oltp_read_write, the tps is only single digits. For oltp_read_only, the tps is also only single digits. For oltp_write_only, the tps can reach 5000+. How can I improve the tps for oltp_read_write, or is this a bug in yugabytedb?

Issue Type

kind/question

Warning: Please confirm that this issue does not contain any sensitive information

Franzli9467 commented 1 month ago

I figured out the reason for the low TPS query. By default, sysbench table creation is hash partitioned. Under hash partitioning, range queries will become full table scans. When I changed the table creation statement to range partitioning, performance improved. Is this a bug in hash partitioning?

ddorian commented 1 month ago

Closing as duplicate of https://forum.yugabyte.com/t/low-tps-when-i-use-sysbench-to-benchmark-yugabytedb/2843/5