-
Notifications
You must be signed in to change notification settings - Fork 511
Description
I’m using blockchain system similar like Ethereum fullnode to perform block syncing. The underlying storage engine is Pebble. While investigating performance issues, I encountered the following situation:
A main thread periodically writes a key-value pair where the key is 32 bytes and the value is 8 bytes. Under normal circumstances, this write operation complete within microseconds. At the same time, there's a background thread that periodically performs a batch write of around 256MB and 826535 keys. However, I noticed that if the batch write is executing by the backgroud thread when the main thread attempts to write a single key, the latency for this single key write can increase dramatically to around 800ms.
Some relevant details about the environment: 1)Disk bandwidth: 8 GB/s OPS: 100,000+ 2)pebble versin : github.com/cockroachdb/pebble v1.1.2, Pebble memTable size: 1.8 GB and write options are configured with sync: true
does a small key write being delayed by hundreds of milliseconds during a large batch write match Pebble’s expected behavior under these configurations? How to optimize this problem