Tagged articles
CPU cache
42 articles · Page 1 of 1
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

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 cachedata layout
0 likes · 20 min read

This article explains CPU cache hierarchy, cache line structure, mapping policies, write strategies, and MESI coherence protocol with C++ benchmarks showing 8x speedups from row-major traversal, struct alignment, and false sharing elimination using alignas(64) and hardware_destructive_interference_size.
C++CPU cacheCache-Friendly Code
0 likes · 20 min read

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 protocolcache line
0 likes · 22 min read

The article explains why CPU caches are needed, describes the three‑level cache hierarchy, locality principles, cache line size, mapping methods, replacement and write policies, and shows how cache hit rates and access patterns directly affect program performance.
CPU cachecache hierarchycache replacement
0 likes · 10 min read

The article explains the layered memory hierarchy of a computer—from ultra‑fast registers and multi‑level CPU caches to RAM, SSD/HDD storage, and dedicated VRAM—using everyday analogies and concrete examples, and shows why “out of memory” warnings appear.
CPU cacheRAMRegisters
0 likes · 6 min read

The paper presents a CCD‑level load‑aware thread orchestration framework that boosts vector ANNS throughput up to 3.7×, cuts P999 tail latency by 30%‑90%, reduces L3 cache miss rates by 6%‑30% and CPU stall time by 20%‑80% on AMD EPYC multi‑chiplet CPUs.
ANNSCCDCPU cache
0 likes · 19 min read

CPU caches bridge the speed gap between processors and memory, but cache misses can dramatically degrade performance, especially under high concurrency or big‑data workloads; this article explains cache architecture, common miss causes, diagnostic tools like perf and cachestat, and practical optimization techniques for Linux systems.
CPU cacheMESI protocolcache coherence
0 likes · 44 min read

This article explains how CPU caches bridge the speed gap between the processor and main memory, describes cache hierarchy, locality principles, write policies, coherence protocols, and provides concrete C code examples and practical tips such as data alignment and loop restructuring to improve cache hit rates and overall program speed.
CPU cacheMESI protocolcache coherence
0 likes · 30 min read

This article explains the fundamental role of CPU cache in bridging the speed gap between processors and memory, covering cache hierarchy, locality principles, write policies, coherence protocols, and practical code optimizations such as data alignment and loop restructuring to improve performance.
CPU cacheMESI protocolMemory Architecture
0 likes · 31 min read

This article explains Linux CPU cache architecture—from physical and logical cores, through L1/L2/L3 hierarchy and cache‑line basics, to write‑through/write‑back policies and coherence mechanisms—while demonstrating practical analysis with Valgrind and perf tools.
CPU cacheLinuxPerformance Analysis
0 likes · 22 min read

This article explains why CPU caches are needed, describes the hierarchy and internal structure of L1, L2, and L3 caches, compares direct‑mapped, set‑associative and fully‑associative designs, and shows how cache‑aware coding (row‑major vs column‑major loops) dramatically improves execution speed.
CPU cachecache architecturecache types
0 likes · 12 min read

This article explains the CPU cache locality principle, shows how to restructure Go data access patterns—including data structures, field ordering, memory allocation, and false sharing avoidance—and demonstrates measurable performance gains with a matrix‑multiplication benchmark.
CPU cacheGobenchmark
0 likes · 10 min read

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 cacheRustdata dependency
0 likes · 17 min read

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

This article explains why CPU caches are needed, describes the hierarchy and internal structure of cache lines, compares direct‑mapped, set‑associative and fully‑associative caches, and shows how cache‑aware coding can dramatically improve program execution speed.
C++CPU cacheMemory Access
0 likes · 12 min read

This article explains the purpose of CPU caches, describes the three cache levels and their internal structures—including direct‑mapped, set‑associative, and fully‑associative designs—and shows how cache‑aware programming can dramatically improve code performance.
CPU cacheFully AssociativeSet Associative
0 likes · 11 min read

This article explains the purpose of CPU caches, describes their hierarchical structure and internal organization—including direct‑mapped, set‑associative, and fully‑associative designs—and shows how cache‑aware programming can dramatically speed up matrix operations.
CPU cacheMemory Accesscache hierarchy
0 likes · 12 min read

This article explains the purpose of CPU caches, their hierarchical structure and internal designs—including direct‑mapped, set‑associative, and fully‑associative caches—and demonstrates how understanding cache behavior can dramatically improve program performance, illustrated with C++ traversal benchmarks.
CPU cachecache hierarchycache optimization
0 likes · 12 min read

This article explains the purpose of CPU cache memory, the principles of temporal and spatial locality, the multi‑level cache architecture, the MESI cache‑coherence protocol for multi‑core processors, and the optimizations such as store buffers and memory barriers that address performance and consistency challenges.
CPU cachecache coherencememory hierarchy
0 likes · 16 min read

This article thoroughly explains the low‑level implementation of Java's volatile keyword by analysing CPU multi‑level cache design, the MESI cache‑coherency protocol, the Java Memory Model, memory barriers, the happens‑before principle, and the impact on singleton patterns and synchronized blocks.
CPU cacheConcurrencyHappens-Before
0 likes · 36 min read

This article demonstrates how reorganizing Java matrix‑multiplication loops and understanding Java 2‑D array storage and CPU cache hierarchies can turn a naïve implementation into a version that runs up to a hundred times faster, backed by JMH benchmark results.
CPU cachebenchmarkmatrix multiplication
0 likes · 13 min read

The article explains how modern computers use fast SRAM caches (L1‑L3) inside the CPU with various mapping schemes and the MESI coherence protocol to keep data consistent, while DRAM serves as main memory, and virtual memory with multi‑level page tables and a TLB abstracts physical memory, provides isolation, and enables swapping.
CPU cacheMESI protocolTLB
0 likes · 16 min read

This article explains how the volatile keyword ensures visibility in Java multithreaded programs by examining CPU cache architecture, cache‑coherency mechanisms such as the MESI protocol, and the low‑level assembly effects of volatile writes on modern x86 processors.
CPU cacheConcurrencymemory visibility
0 likes · 12 min read

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 cacheMultithreadingcache line
0 likes · 10 min read

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 cacheMultithreadingcache coherence
0 likes · 21 min read

This article explains CPU cache levels, cache line concepts, coherence protocols, and how cache‑friendly or cache‑unfriendly code patterns—including false sharing and stride access—affect program performance on modern multicore processors.
CPU cacheMultithreadingcache hierarchy
0 likes · 21 min read

This article explains the hardware origins of CPU caches, bus locks, cache‑coherence protocols such as MESI, store buffers and memory barriers, then shows how the Java Memory Model abstracts these mechanisms and how the volatile keyword guarantees visibility and ordering while not providing atomicity.
CPU cacheJavamemory barriers
0 likes · 28 min read

This article explains NUMA architecture with hyper‑threading, details CPU cache hierarchies and access latencies, and provides Linux tools and practical optimization techniques to improve cache‑hit rates and minimize cross‑NUMA memory delays.
CPU cacheHyper-ThreadingLinux
0 likes · 9 min read


ITPUBJun 27, 2021 · Fundamentals
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

This article explores how introducing various cache layers—from database and distributed caches to local and CPU caches—bridges the gap between fast CPUs and slow I/O, detailing performance benefits, cache miss handling, consistency strategies, memory management, and techniques to avoid false sharing.
CPU cacheCachingJava
0 likes · 13 min read

This article explores the fundamentals and advanced techniques of cache optimization, covering multi‑level caching, read/write performance gains, cache miss handling, consistency strategies, heap versus direct memory, CPU cache effects, false sharing, and practical mitigation patterns.
CPU cacheCachingdistributed cache
0 likes · 13 min read

The article thoroughly explains how CPU caches and the MESI coherence protocol interact with Java’s Memory Model, detailing the volatile keyword’s role in ensuring visibility and preventing instruction reordering, and illustrates these concepts with examples such as visibility problems and double‑checked locking.
CPU cacheConcurrencyJMM
0 likes · 22 min read

This article explains the storage hierarchy from CPU registers and caches to RAM, SSD, and HDD, quantifies their speed differences (L1 cache vs. memory, SSD, HDD) and cost ratios, and provides Linux commands to inspect cache sizes, helping readers understand why each level exists and how they interact.
CPU cacheHDDSSD
0 likes · 14 min read

Understanding CPU cache hierarchy, its speed advantages over memory, and the mechanics of cache lines, tags, and offsets reveals why code that maximizes cache hit rates—through sequential data access, branch prediction, and core affinity—can run dramatically faster on modern processors.
CPU cacheCache Hit RateLow-Level Programming
0 likes · 18 min read

This article explains the concept of false sharing in CPU caches, demonstrates its performance impact with Java code, analyzes the results, and shows how to prevent it using the @Contended annotation and appropriate JVM flags.
CPU cacheContended annotationJava performance
0 likes · 9 min read

During a client’s upgrade test, a database’s compressed tables exhibited severe slowdown under concurrent full‑table scans, which we traced to CPU cache line false sharing in the decompression code; using Linux perf tools we identified the hotspot, aligned memory, and restored performance.
CPU cacheDatabase PerformanceLinux perf
0 likes · 13 min read

This article explains the modern computer physical memory hierarchy, introduces three key concurrency concepts—atomicity, ordering, and visibility—illustrates them with Java code examples, and then details the Java Memory Model and its eight happen‑before principles that govern multithreaded behavior.
CPU cacheConcurrencyHappen-Before
0 likes · 14 min read

This article explains cache fundamentals—from CPU and local caches to distributed systems—covers design principles, performance‑affecting factors, eviction algorithms, and common high‑concurrency issues such as penetration, stampede, and avalanche, and provides practical solutions for selecting and optimizing cache strategies.
CPU cacheCache EvictionCaching
0 likes · 16 min read

This article explains the concept of false sharing, its roots in CPU cache line contention and the MESI protocol, demonstrates its impact with Java benchmark code, and presents practical padding and alignment techniques to mitigate the performance degradation caused by false sharing.
CPU cacheJava ConcurrencyMESI protocol
0 likes · 15 min read

This article provides a concise introduction to CPU cache hierarchies, read/write policies, cache coherency protocols such as snooping and MESI, and the impact of different memory models on multi‑core systems, helping developers grasp essential hardware concepts for reliable software design.
CPU cacheCache CoherencyMESI protocol
0 likes · 19 min read

This article provides a concise introduction to CPU cache architecture, explains read/write policies, describes cache coherency protocols such as MESI and its variants, and discusses how different memory models affect multi‑core consistency and performance.
CPU cacheCache CoherencyMESI protocol
0 likes · 19 min read
