Quantcast
Channel: Programming Rants
Viewing all articles
Browse latest Browse all 204

CockroachDB Benchmark on Different Disk Types

$
0
0

Today we're going to benchmark CockroachDB one of database that I use this year to create embedded application. I use CockroachDB because I don't want to use SqLite or any other embedded database that lack of tooling or cannot be accessed by multiple program at the same time. With CockroachDB I only need to distribute my application binary, cockroachdb binary, and that's it, the offline backup also quite simple, just need to rsync the directory, or do manual rows export like other PostgreSQL-like database. Scaling out also quite simple.

Here's the result:

Disk TypeIns Dur (s)Upd Dur (s)Sel Dur (s)Many Dur (s)Insert Q/sUpdate Q/sSelect1 Q/sSelMany Row/sSelMany Q/s
TMPFS (RAM)1.32.14.91.5314191927581274819487220487
NVME DA 1TB2.73.75.01.5150721069880558801943520048
NVMe Team 1TB3.83.74.91.5105691067881820820988920524
SSD GALAX 250GB8.07.15.01.54980565579877792616219815
HDD WD 8TB32.131.74.93.9124412628156130757807689

From the table we can see that TMPFS (RAM, obviously) is the fastest in all case especially insert and update benchmark, NVMe faster than SSD, and standard magnetic HDD is the slowest. but the query-part doesn't really have much effect probably because the dataset too small that all can fit in the cache.

The test done with 100 goroutines, 400 records insert/update per goroutines, the record is only integer and string. Queries done 10x for select, and 300x for select-many, sending small query is shown there reaching the limit  of 80K rps, inserts can reach 31K rps and multirow-query/updates can reach ~20K rps.

The repository is here if you want to run the benchmark on your own machine.


Viewing all articles
Browse latest Browse all 204

Latest Images

Trending Articles



Latest Images