Investigation: I/O performance of Kupo #107
Replies: 3 comments 1 reply
-
It could be interesting to increase the page_size to 16KB or even 64KB and see. The default is at 4KB, and a higher page size should reduce the number of I/O; Since most write queries are rather big (especially with permissive patterns like Do any of you have any concrete numbers regarding this? |
Beta Was this translation helpful? Give feedback.
-
@cexplorer would you be keen to provide some more insights? And perhaps test a experimental branch for me and see whether it improves the I/O operations? In particular, I am interested whether this is specific to the initial synchronization or rather to the database queries. Note also that SQLite being an on-disk file-based database, there will always be a quite number of I/O -- SQLite being here an intelligent wrapper on top of the OS file primitives. |
Beta Was this translation helpful? Give feedback.
-
Hi, thanks in advance for the great work. I'll say upfront, I don't have any performance issues (as we are using enterprise nvmes), but on the other hand I imagine we're unnecessarily i/o troubling the storage during the initial sync, especially if someone is using slower storage. It occurred to me not to do inserts / commits immediately during the initial sync every block/tx, but to batch the inserts into the db in much larger chunks for example. But I'm not an expert on this db at all, so more just an idea. |
Beta Was this translation helpful? Give feedback.
-
I was talking with josef from @cexplorer, explaining how to spin up the required resources for auditing the Sundae governance votes.
He raised a very interesting point: short write cycles on a lower-end SSD or older NVME can be really damaging to the lifespan of the disk. Modern NVME suffers less from this, but that can be expensive.
So we got curious about how Kupo's IO patterns look, and whether there would be benefit in a small batching write cache.
sqlite3 likely has pretty sophisticated write batching internally, but since it also needs to meet high durability criteria, it likely doesn't wait very long before flushing this buffer.
I'm not an expert on this kind of thing, so I figured I'd open the discussion and see if there's anyone who would be willing to help measure and quantify this! :)
Beta Was this translation helpful? Give feedback.
All reactions