Performance impact of write-through caching
If you don't have a battery-backed write cache, and therefore can't utilize some memory-based cache to accelerate fsync writes, commit performance on your database can be quite bad. The worst-case here is where you have a single client that is issuing a commit after every statement it executes. The reality of how a hard drive works means that individual writes happen once each time the drive spins around. Here are the measurements for the common drive speeds available right now, with computed maximum commit rate:
Rotation speed |
Rotation time (ms) |
Max commits/second |
---|---|---|
5400 |
11.1 |
90 |
7200 |
8.3 |
120 |
10000 |
6.0 |
166 |
15000 |
4.0 |
250 |
It's important to realize how limiting this can be:
Note
If you have a common 7200 rpm hard drive, no single client can commit more than 120 transactions/second in any situation where all that's available is a write-back cache.
It doesn't matter how many disks...