ended2월 23일· 1 sources
Read Locks Are Not Your Friends
Read Lock은 당신의 친구가 아닙니다
Why it matters
RwLock이 read-heavy 워크로드에서 Mutex보다 5배 느린 이유를 분석한 글입니다. 읽기 잠금도 내부적으로 atomic counter를 증가시켜야 하므로 cache line invalidation이 발생하고, 여러 코어가 동시에 접근할 때 cache line ping-pong 현상으로 인해 심각한 성능 저하가 발생합니다. 따라서 read-heavy 워크로드에서도 RwLock이 반드시 최적의 선택이 아닐 수 있습니다.
1
Sources
+0
24h
—
Growth
210d
Active
RwLockMutexAtomic ContentionLRU CacheConcurrencyRust