Skip to content
Tagged articles

false sharing

29 articles · Page 1 of 1
IT Services Circle
IT Services Circle
Nov 8, 2026 · Fundamentals

CPU Cache Misses: How Data Layout Causes 6.8x Slowdowns and How to Fix Them

The article explains CPU cache hierarchy, false sharing, cache-friendly data layouts (hot/cold separation, row-major traversal, SoA vs AoS), profiling with perf and Cachegrind, and real-world cases where cache-aware changes yielded 6.8x throughput improvement and reduced CPU usage from 87% to 51%.

AoS vs SoACPU cachecache line
0 likes · 28 min read
CPU Cache Misses: How Data Layout Causes 6.8x Slowdowns and How to Fix Them
Deepin Linux
Deepin Linux
Oct 31, 2026 · Backend Development

C++ Low-Latency Optimization: Mastering CPU Cache for Real Performance Gains

This article explains CPU cache fundamentals, demonstrates common cache killers like row vs column traversal, vector vs list, and false sharing with benchmarks, and provides practical C++ optimization techniques including struct layout, AoS vs SoA, prefetching, pointer chasing avoidance, and object pools, emphasizing measurement with perf.

C#CPU cachePerformance Optimization
0 likes · 20 min read
C++ Low-Latency Optimization: Mastering CPU Cache for Real Performance Gains
Deepin Linux
Deepin Linux
Oct 22, 2026 · Backend Development

Memory Optimization Deep Dive: Allocate Less, Allocate Faster, Use Efficiently

This article presents a systematic approach to memory optimization across three dimensions—reducing allocation frequency, accelerating allocation speed, and improving memory usage efficiency—with practical C++ techniques including stack allocation, object pools, size-class allocators, huge pages, data structure packing, and false sharing prevention.

C#Memory Optimizationdata structure alignment
0 likes · 23 min read
Memory Optimization Deep Dive: Allocate Less, Allocate Faster, Use Efficiently
Deepin Linux
Deepin Linux
Oct 14, 2026 · Fundamentals

Why False Sharing Slows Multi-Threaded Code Despite No Shared Data

This article explains how false sharing occurs when independent threads modify variables on the same CPU cache line, triggering MESI protocol overhead that degrades performance, and covers detection methods using perf and VTune plus mitigation techniques like cache-line padding and thread-local storage.

CPU cacheMESI protocolPerformance Optimization
0 likes · 22 min read
Why False Sharing Slows Multi-Threaded Code Despite No Shared Data
Programmer1970
Programmer1970
Aug 16, 2026 · Backend Development

Why Disruptor’s Ring Buffer Beats BlockingQueue: Zero‑Copy, False‑Sharing Elimination, and Cache‑Line Padding

The article dissects how Disruptor’s ring‑buffer architecture outperforms traditional BlockingQueue by eliminating lock contention, dynamic allocation, and cache‑line interference through pre‑allocated zero‑copy buffers, CAS‑based sequencing, cache‑line padding, batch processing, and tailored wait strategies, achieving millions of TPS.

BlockingQueueCache line paddingDisruptor
0 likes · 13 min read
Why Disruptor’s Ring Buffer Beats BlockingQueue: Zero‑Copy, False‑Sharing Elimination, and Cache‑Line Padding
Cognitive Technology Team
Cognitive Technology Team
Jul 20, 2025 · Fundamentals

How False Sharing Slows Java Programs and How to Eliminate It

This article explains what false sharing is in Java, how cache lines and cache‑line invalidation cause performance penalties, and provides concrete code examples and @Contended annotation techniques to detect and fix false sharing for faster multithreaded applications.

CacheConcurrencyContended
0 likes · 10 min read
How False Sharing Slows Java Programs and How to Eliminate It
JD Tech Talk
JD Tech Talk
Jul 1, 2025 · Fundamentals

How False Sharing Slows Down Multithreaded Java Apps—and How to Fix It

This article explains the hidden performance killer of cache false sharing in multicore Java applications, demonstrates its impact with benchmark code, and shows how padding, the @Contended annotation, and Caffeine's internal structures can eliminate the issue for faster execution.

CaffeineContendedJava concurrency
0 likes · 10 min read
How False Sharing Slows Down Multithreaded Java Apps—and How to Fix It
JD Cloud Developers
JD Cloud Developers
Jul 1, 2025 · Fundamentals

How False Sharing Slows Your Java Apps and How to Eliminate It

This article explains the cache architecture behind false sharing, demonstrates its dramatic performance impact with benchmark code, and shows how Java's @Contended annotation and Caffeine's memory‑padding techniques can effectively eliminate the issue for high‑concurrency applications.

cache optimizationfalse sharingperformance tuning
0 likes · 10 min read
How False Sharing Slows Your Java Apps and How to Eliminate It
dbaplus Community
dbaplus Community
Dec 22, 2024 · Fundamentals

Why Row‑Major Traversal Beats Column‑Major: Unveiling Cache, Prefetch, and False‑Sharing Secrets

This article builds a practical hardware‑mind model by benchmarking Rust code to show how cache layout, prefetching, cache associativity, false sharing, pipeline stalls, and data dependencies affect the performance of row‑major versus column‑major traversals, random accesses, and multithreaded loops, and it offers concrete fixes such as cache‑line alignment.

CPU architecturePerformancePipeline
0 likes · 19 min read
Why Row‑Major Traversal Beats Column‑Major: Unveiling Cache, Prefetch, and False‑Sharing Secrets
Go Programming World
Go Programming World
Jul 4, 2024 · Fundamentals

Understanding False Sharing and Cache Padding in Go

This article explains the concept of false sharing caused by CPU cache line interactions, demonstrates how cache padding can mitigate the performance penalty, and provides Go benchmark code and results to illustrate the impact on multi‑core concurrency.

ConcurrencyPerformancecache padding
0 likes · 8 min read
Understanding False Sharing and Cache Padding in Go
Tencent Cloud Developer
Tencent Cloud Developer
Apr 25, 2024 · Fundamentals

Cache, Prefetching, False Sharing, Pipeline and Data Dependency: Performance Optimization in Rust

The article uses Rust benchmarks to show how cache layout, prefetching, associativity, false sharing, pipeline stalls, and loop data dependencies impact performance, and demonstrates practical optimizations such as row‑major traversal, proper alignment, avoiding dependent loops, and leveraging sequential access to achieve near‑optimal speed.

CPU cachePerformance OptimizationRust
0 likes · 17 min read
Cache, Prefetching, False Sharing, Pipeline and Data Dependency: Performance Optimization in Rust
Tencent Technical Engineering
Tencent Technical Engineering
Apr 2, 2024 · Fundamentals

Cache, Prefetching, False Sharing, Pipeline, and Data Dependency: Benchmarks and Optimizations in Rust

The article shows how row‑major vs column‑major traversal, random access, cache‑set conflicts, false sharing, branch‑prediction failures, and loop‑carried data dependencies each degrade performance by tying Rust (and C++) code patterns to CPU cache behavior, prefetching, pipeline stalls, and vectorization limits, demonstrated through runnable benchmarks.

CPU cachePipelineRust
0 likes · 15 min read
Cache, Prefetching, False Sharing, Pipeline, and Data Dependency: Benchmarks and Optimizations in Rust
Liangxu Linux
Liangxu Linux
Jun 23, 2023 · Fundamentals

Understanding CPU Cache Consistency: MESI Protocol, Performance Tips & Code Examples

Cache consistency spans icache‑dcache synchronization, multi‑CPU cache coherence, and device‑CPU interactions; the article explains the MESI protocol, demonstrates performance impacts with multithreaded code, explores prefetching, false sharing, mapping strategies, and practical tips for writing cache‑aware software.

CPUCacheCoherence
0 likes · 24 min read
Understanding CPU Cache Consistency: MESI Protocol, Performance Tips & Code Examples
Selected Java Interview Questions
Selected Java Interview Questions
Dec 7, 2022 · Backend Development

Understanding Java Disruptor: Queues, Core Components, and High‑Performance Lock‑Free Design

This article introduces various Java queue implementations, explains the Disruptor framework’s architecture, demonstrates its usage with complete code examples, and analyzes core components such as RingBuffer, Sequencer, and WaitStrategy while addressing performance issues like false sharing and multi‑producer coordination.

DisruptorJavaconcurrent queue
0 likes · 12 min read
Understanding Java Disruptor: Queues, Core Components, and High‑Performance Lock‑Free Design
Su San Talks Tech
Su San Talks Tech
Jul 4, 2022 · Fundamentals

Understanding CPU Cache False Sharing and How to Eliminate It

This article explains the concept of CPU cache false sharing, how it degrades performance on multi‑core systems, and provides practical techniques—including cache‑line alignment macros and padding strategies—to prevent it and improve multithreaded application efficiency.

CPU cacheMultithreadingPerformance Optimization
0 likes · 10 min read
Understanding CPU Cache False Sharing and How to Eliminate It
Top Architect
Top Architect
Feb 1, 2022 · Fundamentals

Understanding CPU Cache Hierarchy, Cache Coherence, and Performance Optimization

This article explains the structure of modern CPU caches, the principles of cache lines, associativity, and coherence protocols, and demonstrates how these hardware details affect program performance through multiple code examples covering loop stride, matrix traversal, multithreading, and false sharing.

CPU cacheMultithreadingPerformance Optimization
0 likes · 21 min read
Understanding CPU Cache Hierarchy, Cache Coherence, and Performance Optimization
ITPUB
ITPUB
Jun 27, 2021 · Fundamentals

How Multi‑Level Caching Boosts Performance and Avoids Common Pitfalls

This article explores the role of multi‑level caching—from distributed and local caches to direct memory and CPU cache—detailing performance gains, cache‑miss handling, consistency challenges, false sharing issues, and practical mitigation techniques such as approximate LRU, random TTL, delayed double‑delete, padding, and lock‑free designs.

CPU cacheCache ConsistencyCaching
0 likes · 13 min read
How Multi‑Level Caching Boosts Performance and Avoids Common Pitfalls
JavaEdge
JavaEdge
Oct 8, 2020 · Backend Development

How Disruptor Achieves Lock-Free Speed: Single-Threaded Writes, Memory Barriers, and False Sharing

This article explains how the Disruptor library attains true lock‑free performance through single‑threaded writes, the use of memory barriers (volatile and happens‑before semantics), cache‑line alignment to eliminate false sharing, and a sequence‑barrier algorithm, providing code examples and practical optimization tips.

DisruptorJava concurrencyfalse sharing
0 likes · 5 min read
How Disruptor Achieves Lock-Free Speed: Single-Threaded Writes, Memory Barriers, and False Sharing
Xiao Lou's Tech Notes
Xiao Lou's Tech Notes
May 19, 2020 · Backend Development

Can You Build a Faster Counter Than Java’s LongAdder? A Deep Dive

An in‑depth Java performance study explores LongAdder, compares it with AtomicLong and lock‑based counters using JMH, and walks through successive custom implementations (V0‑V5) that apply striping, modulo optimization, false‑sharing elimination, and advanced hash probing to approach or surpass LongAdder’s throughput.

JMHJava concurrencyLongAdder
0 likes · 16 min read
Can You Build a Faster Counter Than Java’s LongAdder? A Deep Dive
JavaEdge
JavaEdge
Jan 9, 2020 · Fundamentals

Why False Sharing Slows Your Java Programs and How to Eliminate It

False sharing occurs when multiple threads modify variables that reside on the same CPU cache line, causing unnecessary cache coherency traffic; this article explains cache line basics, CPU cache hierarchy, MESI protocol, and presents Java solutions—including padding, @sun.misc.Contended annotation, and JVM flags—to prevent performance degradation.

Java concurrencyPerformance Optimizationcache line
0 likes · 9 min read
Why False Sharing Slows Your Java Programs and How to Eliminate It