Is latch contention inevitable?
While conducting performance tuning consultancies or visiting customer sites over the years I have noticed that the most highly optimized databases running on the most high end hardware seem to be the ones that suffer most significantly from latch contention. It would appear that as we remove all other constraints on databases performance, contention for latches becomes the ultimate limiting factor on database throughput. Imagine we have a perfectly tuned application: we have allocated sufficient memory to the SGA and have a sufficiently low latency IO sub-system that waits for IO are negligible. CPU is abundant and exceeds the demands of the application. When we reach this highly desirable state the database will be doing almost nothing but performing shared memory accesses and hence latches – which prevent simultaneous access to the same shared memory areas – will become the limiting factor. So it may be that some degree of latch contention – possibly on the cache buffers chains latc