mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-02-26 23:57:23 +00:00
Previously, PathDB used a single buffer to aggregate database writes, which needed to be flushed atomically. However, flushing large amounts of data (e.g., 256MB) caused significant overhead, often blocking the system for around 3 seconds during the flush. To mitigate this overhead and reduce performance spikes, a double-buffer mechanism is introduced. When the active buffer fills up, it is marked as frozen and a background flushing process is triggered. Meanwhile, a new buffer is allocated for incoming writes, allowing operations to continue uninterrupted. This approach reduces system blocking times and provides flexibility in adjusting buffer parameters for improved performance. |
||
|---|---|---|
| .. | ||
| context.go | ||
| conversion.go | ||
| difflayer.go | ||
| difflayer_test.go | ||
| disklayer.go | ||
| disklayer_test.go | ||
| generate.go | ||
| generate_test.go | ||
| holdable_iterator.go | ||
| holdable_iterator_test.go | ||
| iterator.go | ||
| iterator_binary.go | ||
| iterator_fast.go | ||
| iterator_test.go | ||
| journal.go | ||
| metrics.go | ||
| snapshot.go | ||
| snapshot_test.go | ||
| utils.go | ||