Hi,
I’m testing YugabyteDB on a single-node setup (YSQL) just to get a feel for it, but I’m noticing pretty slow insert speeds with larger batches (10k+ rows). Running on decent hardware with SSD, so I expected better.
Is this normal for local setups, or should I tweak some configs?
Thanks in advance!
Hi @NicoleSanders14
There are several reasons why this might be happening:
- We always deploy in production with sharding & synchronous replication, so it doesn’t make sense to add optimizations that don’t apply in this context (single node with no replication setups)
- You probably need higher sequences cache yb-tserver configuration reference | YugabyteDB Docs. By default this will also do ~100 increments of a single row in the
sequences
table inside that single 10K batch insert (since default is 100)
- Even though you might have good hardware that single insert won’t be parallelized across all cores
- Usually you want to test with higher concurrency. Example if you want an even worse benchmark would be to update the same row concurrently from different threads. In production this row will wait for replication before it returns.
- As with all benchmarks, there are many things that can go wrong. It’s best to test with TPC-C Benchmark on YugabyteDB | YugabyteDB Docs which mostly use.
Feel free to provide more info to optimize your schema/indexes/queries. Also take a look at our Best Practices for YSQL.