Re:15k inserts/s with Rust and SQLite (2021)
by ZephyrBlu on Sunday April 02, 2023 @06:20PM
(#35415890)
I think a lot of people have forgotten or don't know how powerful CPUs are. Simple operations should be insanely fast, like easily sub-millisecond if not sub-nanosecond fast.
[ Parent
| on HN ]
Re:15k inserts/s with Rust and SQLite (2021)
by Aeolun on Sunday April 02, 2023 @08:36PM
(#35417054)
You can double the performance of this whole thing by inserting 2 values at a time.
Re:15k inserts/s with Rust and SQLite (2021)
by eyegor on Sunday April 02, 2023 @09:56PM
(#35417620)
I don't see why you wouldn't just bundle them all into a transaction at that point. The idea of 1 insert at a time is to roughly estimate the overhead/perf in a real environment, where you're only adding 1 entry at a time.
Re:15k inserts/s with Rust and SQLite (2021)
by ijidak on Sunday April 02, 2023 @09:11PM
(#35417321)
But, for insert, the CPU is not the bottleneck. It's I/O constrained.
Disk I/O has always been the bottleneck for writes.
Re:15k inserts/s with Rust and SQLite (2021)
by jandrewrogers on Sunday April 02, 2023 @09:37PM
(#35417515)
Counterintuitively, write performance in modern databases is primarily constrained by disk read performance.
That said, it is increasingly rare for disk I/O to be a bottleneck for inserts. When your storage will happily sustain 10+ GB/s of write throughput, you tend to run out of things like network and memory bandwidth first.