Posted in

Go原子操作比mutex快?不一定!在cache line false sharing场景下,atomic.StoreUint64性能反降40%,实测对比与内存对齐修复方案

第一章:Go原子操作比mutex … Go原子操作比mutex快?不一定!在cache line false sharing场景下,atomic.StoreUint64性能反降40%,实测对比与内存对齐修复方案Read more

Posted in

Go结构体指针的“假共享”问题首次披露:多核CPU下False Sharing导致QPS骤降62%(perf record实锤)

第一章:Go结构体指针的“假共享 … Go结构体指针的“假共享”问题首次披露:多核CPU下False Sharing导致QPS骤降62%(perf record实锤)Read more

Posted in

Go结构体字段对齐暴雷:100秒用unsafe.Offsetof+go tool compile -S定位false sharing与cache line分裂

第一章:Go结构体字段对齐暴雷: … Go结构体字段对齐暴雷:100秒用unsafe.Offsetof+go tool compile -S定位false sharing与cache line分裂Read more

Posted in

从CPU缓存行(Cache Line)角度重读Go map:为什么bmap大小固定为8键?如何避免false sharing导致性能暴跌300%?

第一章:Go map的底层数据结 … 从CPU缓存行(Cache Line)角度重读Go map:为什么bmap大小固定为8键?如何避免false sharing导致性能暴跌300%?Read more