- Goal: Show IO related problems and possible solutions - not really user oriented - things are mostly good, "more extreme" cases are having problems - landscape changing, new types of IO - speaking for myself, not the project - just ideas, partially not fully developed, wont implement everything myself - ask questions - previous talk mentioned improvments - mostly lock-free pin/unpin - dirty buffer management - sorted checkpoints - lotsa other improvements - Explain: buffer mapping - Explain: clock sweep - Problem: lookups are slow - Problem: lookups scale badly - Problem: truncation, dropping tables, creating databases, etc. needs to flush data - Problem: locks for extension, truncation - Solution: cache locality - Solution: ordered data structure - Solution: shared open relation map - Problem: backends are doing most write IO - mention pg_stat_database et al. - Solution: replace bgwriter -> sweeper - Problem: clock sweep is expensive - Solution: sweeper? - Solution: continous sweep based on usage ratio - Solution: different data structure? - Problem: wrong buffers are being replaced - Solution #1: more intelligent usagecount management - Solution #2: different datastructure - Problem: too much random IO - Solution: batch neighbouring writes - Problem: double buffering - Solution: O_DIRECT? - Hard: latency around writes changes drastically - Hard: Portability sucks - Solution: Use buffered IO but hint aggressively? - Hard: restart performance characteristics