ix
Chapter 14: Concurrency and Persistent Memory ������������������������������������������������ 277
Transactions and Multithreading ����������������������������������������������������������������������������������������������� 278
Mutexes on Persistent Memory ������������������������������������������������������������������������������������������������ 282
Atomic Operations and Persistent Memory ������������������������������������������������������������������������������ 285
Lock-Free Algorithms and Persistent Memory �������������������������������������������������������������������� 285
Concurrent Data Structures for Persistent Memory ������������������������������������������������������������������ 286
Concurrent Ordered Map ����������������������������������������������������������������������������������������������������� 287
Concurrent Hash Map ���������������������������������������������������������������������������������������������������������� 291
Summary����������������������������������������������������������������������������������������������������������������������������������� 293
Chapter 15: Profiling and Performance ���������������������������������������������������������������� 295
Introduction ������������������������������������������������������������������������������������������������������������������������������� 295
Performance Analysis Concepts ����������������������������������������������������������������������������������������������� 295
Compute-Bound vs� Memory-Bound ����������������������������������������������������������������������������������� 295
Memory Latency vs� Memory Capacity�������������������������������������������������������������������������������� 296
Read vs� Write Performance ������������������������������������������������������������������������������������������������ 296
Memory Access Patterns ����������������������������������������������������������������������������������������������������� 296
I/O Storage Bound Workloads ���������������������������������������������������������������������������������������������� 297
Determining the Suitability of Workloads for Persistent Memory ��������������������������������������������� 297
Volatile Use Cases ��������������������������������������������������������������������������������������������������������������� 298
Use Cases Requiring Persistence ���������������������������������������������������������������������������������������� 301
Performance Analysis of Workloads Using Persistent Memory ������������������������������������������������ 302
Characterizing the Workload ����������������������������������������������������������������������������������������������� 303
Memory Bandwidth and Latency ����������������������������������������������������������������������������������������� 303
Persistent Memory Read-Write Ratio ���������������������������������������������������������������������������������� 305
Working Set Size and Memory Footprint ����������������������������������������������������������������������������� 305
Non-Uniform Memory Architecture (NUMA) Behavior���������������������������������������������������������� 305
Optimizing the Software for Persistent Memory ����������������������������������������������������������������� 307
Summary����������������������������������������������������������������������������������������������������������������������������������� 311
Table of ConTenTs
Chapter 14: Concurrency and Persistent Memory ������������������������������������������������ 277
Transactions and Multithreading ����������������������������������������������������������������������������������������������� 278
Mutexes on Persistent Memory ������������������������������������������������������������������������������������������������ 282
Atomic Operations and Persistent Memory ������������������������������������������������������������������������������ 285
Lock-Free Algorithms and Persistent Memory �������������������������������������������������������������������� 285
Concurrent Data Structures for Persistent Memory ������������������������������������������������������������������ 286
Concurrent Ordered Map ����������������������������������������������������������������������������������������������������� 287
Concurrent Hash Map ���������������������������������������������������������������������������������������������������������� 291
Summary����������������������������������������������������������������������������������������������������������������������������������� 293
Chapter 15: Profiling and Performance ���������������������������������������������������������������� 295
Introduction ������������������������������������������������������������������������������������������������������������������������������� 295
Performance Analysis Concepts ����������������������������������������������������������������������������������������������� 295
Compute-Bound vs� Memory-Bound ����������������������������������������������������������������������������������� 295
Memory Latency vs� Memory Capacity�������������������������������������������������������������������������������� 296
Read vs� Write Performance ������������������������������������������������������������������������������������������������ 296
Memory Access Patterns ����������������������������������������������������������������������������������������������������� 296
I/O Storage Bound Workloads ���������������������������������������������������������������������������������������������� 297
Determining the Suitability of Workloads for Persistent Memory ��������������������������������������������� 297
Volatile Use Cases ��������������������������������������������������������������������������������������������������������������� 298
Use Cases Requiring Persistence ���������������������������������������������������������������������������������������� 301
Performance Analysis of Workloads Using Persistent Memory ������������������������������������������������ 302
Characterizing the Workload ����������������������������������������������������������������������������������������������� 303
Memory Bandwidth and Latency ����������������������������������������������������������������������������������������� 303
Persistent Memory Read-Write Ratio ���������������������������������������������������������������������������������� 305
Working Set Size and Memory Footprint ����������������������������������������������������������������������������� 305
Non-Uniform Memory Architecture (NUMA) Behavior���������������������������������������������������������� 305
Optimizing the Software for Persistent Memory ����������������������������������������������������������������� 307
Summary����������������������������������������������������������������������������������������������������������������������������������� 311
Table of ConTenTs
