SlideShare ist ein Scribd-Unternehmen logo
1 von 42
Maciej Maciejewski
InfoQ.com: News & Community Site
• 750,000 unique visitors/month
• Published in 4 languages (English, Chinese, Japanese and Brazilian
Portuguese)
• Post content from our QCon conferences
• News 15-20 / week
• Articles 3-4 / week
• Presentations (videos) 12-15 / week
• Interviews 2-3 / week
• Books 1 / month
Watch the video with slide
synchronization on InfoQ.com!
https://www.infoq.com/presentations/
persistent-memory-dram
Purpose of QCon
- to empower software development by facilitating the spread of
knowledge and innovation
Strategy
- practitioner-driven conference designed for YOU: influencers of
change and innovation in your teams
- speakers and topics driving the evolution and innovation
- connecting and catalyzing the influencers and innovators
Highlights
- attended by more than 12,000 delegates since 2007
- held in 9 cities worldwide
Presented at QCon London
www.qconlondon.com
HARDWARE
2
Persistent memory
3
How does it differ from DRAM
4
How fast is it?
5
OPERATINGSYSTEM
6
ACPI NFIT
7
E820
8
Whatcanwedowithit?
9
10
Persistent
Memory
User
Space
Kernel
Space
Application
Load/
Store
MMU
Mapp
ings
NVDIMM Driver
temporary file
Standard
File API
PM-aware
File System
NVML
http://pmem.io
https://github.com/pmem/nvml/
NVML
11
Memory
12
Memory - libvmmalloc
13
libvmem
jemalloc
Application
PM
Kernel
Space
User
Space
malloc
vmmalloc
mmap
DRAM
vmem_pool_mallocvmem_pool_create
constructor
temporary file
Memory - libvmem
14
libvmem
jemalloc (3.6.0)
Application
Persistent Memory
Kernel
Space
User
Space
libc
(or other)
vmem_malloc
vmem
fallocate/mmap
malloc
DRAM
mmap/sbrk
vmem_create
vmem_pool_malloc
malloc
vmem_pool_create
Memory - memkind
15
Block storage
16
17
Byte persistency
18
Why persistency is an issue?
19
CPU
L1
L2
L3
iMC
NVDIMM
CPU
L1
L2
iMC
NVDIMM
CLFLUSH
CLFLUSHOPT
CLWB
SFENCE
PCOMMIT
SFENCE
20
Flushing to Persistence
open(…);
mmap(…);
strcpy(pmem, „Hello");
msync(pmem, 6, MS_SYNC);
pmem_persist(pmem, 6);
strcpy(pmem, „Hello, World!");
pmem_persist(pmem, 14);
Crossing the 8-Byte Store
Result?
1. „0000000000...”
2. „Hello, W000000...”
3. „00000000orld!0”
4. „Hello, 00000000”
5. „Hello, World!0”
crash
nvml Persistent Libraries
libpmem – Basic persistency handling
libpmemblk – Block access to pmem
libpmemlog - Log file on pmem (append-mostly)
libpmemobj - Transactional Object Store on pmem
21
libpmemobj
Object API
Transactional API
22
Applications
23
pm_invaders
24
25
Redis key/value store
26
31
0
5
10
15
20
25
30
32 64 128 256 512 1024 2048 4096 8192
seconds
object size
Startup time
RDB
AOF
PM
32
0
1000
2000
3000
4000
5000
6000
7000
8000
32 64 128 256 512 1024 2048 4096 8192
DRAMallocations[MB]
objects size
DRAM usage
AOF
RDB
PM
33
0
20000
40000
60000
80000
100000
120000
36 43 50 57 64 71 78 85 92 99 106 113 120 127 134 141
operations/sec
% of OS memory
Running out of DRAM
No Persist
34
0
20000
40000
60000
80000
100000
120000
36 43 50 57 64 71 78 85 92 99 106 113 120 127 134 141
operations/sec
% of OS memory
Running out of DRAM
No Persist
RDB
35
0
20000
40000
60000
80000
100000
120000
36 43 50 57 64 71 78 85 92 99 106 113 120 127 134 141
operations/sec
% of OS memory
Running out of DRAM
No Persist
RDB
AOF
36
0
20000
40000
60000
80000
100000
120000
36 43 50 57 64 71 78 85 92 99 106 113 120 127 134 141
operations/sec
% of OS memory
Running out of DRAM
No Persist
RDB
PM
AOF
37
0
10000
20000
30000
40000
50000
60000
70000
80000
32 64 128 256 512 1024 2048 4096 8192
operations/sec
objects size
CPU usage
PM 1X
AOF 1X
38
0
10000
20000
30000
40000
50000
60000
70000
80000
32 64 128 256 512 1024 2048 4096 8192
operations/sec
objects size
CPU usage
PM 1X
PM 4X
AOF 1X
AOF 4X
39
0
10000
20000
30000
40000
50000
60000
70000
80000
32 64 128 256 512 1024 2048 4096 8192
operations/sec
objects size
CPU usage
PM 1X
PM 4X
PM 6X
PM 10X
AOF 1X
AOF 4X
AOF 10X
Moving even more data
0
100
200
300
400
500
600
Time [s] Memory [MB]
GMRES Sparse Matrix solver
Original Matrix data in PM All in PM
40
Modifying app engine
for (int i=0; i<NUMBER_OF_ITERATIONS; i++) {
result = calculateThis(i, result);
}
41
i_pm = 0; //at first runtime of app only
...
...
for (i_pm; i_pm<NUMBER_OF_ITERATIONS; i_pm++) {
TX_BEGIN(pool) {
result_pm = calculateThis(i_pm, result_pm);
} TX_END
}
i_pm = 0;
Possibilities
Choices
Even more fun ...
42
Watch the video with slide synchronization on
InfoQ.com!
https://www.infoq.com/presentations/persistent-
memory-dram

Weitere ähnliche Inhalte

Ähnlich wie How Will Persistent Memory Change Software Design?

Ceph Day Berlin: Deploying Flash Storage for Ceph without Compromising Perfor...
Ceph Day Berlin: Deploying Flash Storage for Ceph without Compromising Perfor...Ceph Day Berlin: Deploying Flash Storage for Ceph without Compromising Perfor...
Ceph Day Berlin: Deploying Flash Storage for Ceph without Compromising Perfor...
Ceph Community
 
Ceph Day Beijing - Ceph on All-Flash Storage - Breaking Performance Barriers
Ceph Day Beijing - Ceph on All-Flash Storage - Breaking Performance BarriersCeph Day Beijing - Ceph on All-Flash Storage - Breaking Performance Barriers
Ceph Day Beijing - Ceph on All-Flash Storage - Breaking Performance Barriers
Ceph Community
 
OSGi Alliance Community Event 2007 - Business Session#2 - Abdallah Bushnaq, A...
OSGi Alliance Community Event 2007 - Business Session#2 - Abdallah Bushnaq, A...OSGi Alliance Community Event 2007 - Business Session#2 - Abdallah Bushnaq, A...
OSGi Alliance Community Event 2007 - Business Session#2 - Abdallah Bushnaq, A...
mfrancis
 

Ähnlich wie How Will Persistent Memory Change Software Design? (20)

Accelerating Ceph Performance with High Speed Networks and Protocols - Qingch...
Accelerating Ceph Performance with High Speed Networks and Protocols - Qingch...Accelerating Ceph Performance with High Speed Networks and Protocols - Qingch...
Accelerating Ceph Performance with High Speed Networks and Protocols - Qingch...
 
Caching Beyond RAM: The Case for NVMe
Caching Beyond RAM: The Case for NVMeCaching Beyond RAM: The Case for NVMe
Caching Beyond RAM: The Case for NVMe
 
Ceph Day Berlin: Deploying Flash Storage for Ceph without Compromising Perfor...
Ceph Day Berlin: Deploying Flash Storage for Ceph without Compromising Perfor...Ceph Day Berlin: Deploying Flash Storage for Ceph without Compromising Perfor...
Ceph Day Berlin: Deploying Flash Storage for Ceph without Compromising Perfor...
 
Datto Keynote - How to Position Business Continuity to Win Business - Rob Rae
Datto Keynote - How to Position Business Continuity to Win Business - Rob RaeDatto Keynote - How to Position Business Continuity to Win Business - Rob Rae
Datto Keynote - How to Position Business Continuity to Win Business - Rob Rae
 
Building the Case for System z Linux
Building the Case for System z LinuxBuilding the Case for System z Linux
Building the Case for System z Linux
 
How do you pick the right Storage vendor?
How do you pick the right Storage vendor?How do you pick the right Storage vendor?
How do you pick the right Storage vendor?
 
WalB: Real-time and Incremental Backup System for Block Devices
WalB: Real-time and Incremental Backup System for Block DevicesWalB: Real-time and Incremental Backup System for Block Devices
WalB: Real-time and Incremental Backup System for Block Devices
 
Ceph Day Beijing - Ceph on All-Flash Storage - Breaking Performance Barriers
Ceph Day Beijing - Ceph on All-Flash Storage - Breaking Performance BarriersCeph Day Beijing - Ceph on All-Flash Storage - Breaking Performance Barriers
Ceph Day Beijing - Ceph on All-Flash Storage - Breaking Performance Barriers
 
The best of Windows Server 2016 - Thomas Maurer
 The best of Windows Server 2016 - Thomas Maurer The best of Windows Server 2016 - Thomas Maurer
The best of Windows Server 2016 - Thomas Maurer
 
#NetflixEverywhere Global Architecture
#NetflixEverywhere Global Architecture#NetflixEverywhere Global Architecture
#NetflixEverywhere Global Architecture
 
RedisConf18 - Video Experience Operational Insights in Real Time.
RedisConf18 - Video Experience Operational Insights in Real Time.RedisConf18 - Video Experience Operational Insights in Real Time.
RedisConf18 - Video Experience Operational Insights in Real Time.
 
Why everyone speaks about DR but only few use it?
Why everyone speaks about DR but only few use it?Why everyone speaks about DR but only few use it?
Why everyone speaks about DR but only few use it?
 
OpenEBS hangout #4
OpenEBS hangout #4OpenEBS hangout #4
OpenEBS hangout #4
 
Анатолий Кулаков «The Metrix has you…»
Анатолий Кулаков «The Metrix has you…»Анатолий Кулаков «The Metrix has you…»
Анатолий Кулаков «The Metrix has you…»
 
OSGi Alliance Community Event 2007 - Business Session#2 - Abdallah Bushnaq, A...
OSGi Alliance Community Event 2007 - Business Session#2 - Abdallah Bushnaq, A...OSGi Alliance Community Event 2007 - Business Session#2 - Abdallah Bushnaq, A...
OSGi Alliance Community Event 2007 - Business Session#2 - Abdallah Bushnaq, A...
 
Flash Roadblock: Latency! - How Storage Interconnects are Slowing Flash Storage
Flash Roadblock: Latency! - How Storage Interconnects are Slowing Flash Storage Flash Roadblock: Latency! - How Storage Interconnects are Slowing Flash Storage
Flash Roadblock: Latency! - How Storage Interconnects are Slowing Flash Storage
 
Building Windows - how the bits flow from check-in to the fast-ring
Building Windows - how the bits flow from check-in to the fast-ringBuilding Windows - how the bits flow from check-in to the fast-ring
Building Windows - how the bits flow from check-in to the fast-ring
 
Optimizing Your z/OS Mainframe Through zIIP Offload and SQL Analysis
Optimizing Your z/OS Mainframe Through zIIP Offload and SQL AnalysisOptimizing Your z/OS Mainframe Through zIIP Offload and SQL Analysis
Optimizing Your z/OS Mainframe Through zIIP Offload and SQL Analysis
 
2016-JAN-28 -- High Performance Production Databases on Ceph
2016-JAN-28 -- High Performance Production Databases on Ceph2016-JAN-28 -- High Performance Production Databases on Ceph
2016-JAN-28 -- High Performance Production Databases on Ceph
 
Transforming your Business with Scale-Out Flash: How MongoDB & Flash Accelera...
Transforming your Business with Scale-Out Flash: How MongoDB & Flash Accelera...Transforming your Business with Scale-Out Flash: How MongoDB & Flash Accelera...
Transforming your Business with Scale-Out Flash: How MongoDB & Flash Accelera...
 

Mehr von C4Media

Mehr von C4Media (20)

Streaming a Million Likes/Second: Real-Time Interactions on Live Video
Streaming a Million Likes/Second: Real-Time Interactions on Live VideoStreaming a Million Likes/Second: Real-Time Interactions on Live Video
Streaming a Million Likes/Second: Real-Time Interactions on Live Video
 
Next Generation Client APIs in Envoy Mobile
Next Generation Client APIs in Envoy MobileNext Generation Client APIs in Envoy Mobile
Next Generation Client APIs in Envoy Mobile
 
Software Teams and Teamwork Trends Report Q1 2020
Software Teams and Teamwork Trends Report Q1 2020Software Teams and Teamwork Trends Report Q1 2020
Software Teams and Teamwork Trends Report Q1 2020
 
Understand the Trade-offs Using Compilers for Java Applications
Understand the Trade-offs Using Compilers for Java ApplicationsUnderstand the Trade-offs Using Compilers for Java Applications
Understand the Trade-offs Using Compilers for Java Applications
 
Kafka Needs No Keeper
Kafka Needs No KeeperKafka Needs No Keeper
Kafka Needs No Keeper
 
High Performing Teams Act Like Owners
High Performing Teams Act Like OwnersHigh Performing Teams Act Like Owners
High Performing Teams Act Like Owners
 
Does Java Need Inline Types? What Project Valhalla Can Bring to Java
Does Java Need Inline Types? What Project Valhalla Can Bring to JavaDoes Java Need Inline Types? What Project Valhalla Can Bring to Java
Does Java Need Inline Types? What Project Valhalla Can Bring to Java
 
Service Meshes- The Ultimate Guide
Service Meshes- The Ultimate GuideService Meshes- The Ultimate Guide
Service Meshes- The Ultimate Guide
 
Shifting Left with Cloud Native CI/CD
Shifting Left with Cloud Native CI/CDShifting Left with Cloud Native CI/CD
Shifting Left with Cloud Native CI/CD
 
CI/CD for Machine Learning
CI/CD for Machine LearningCI/CD for Machine Learning
CI/CD for Machine Learning
 
Fault Tolerance at Speed
Fault Tolerance at SpeedFault Tolerance at Speed
Fault Tolerance at Speed
 
Architectures That Scale Deep - Regaining Control in Deep Systems
Architectures That Scale Deep - Regaining Control in Deep SystemsArchitectures That Scale Deep - Regaining Control in Deep Systems
Architectures That Scale Deep - Regaining Control in Deep Systems
 
ML in the Browser: Interactive Experiences with Tensorflow.js
ML in the Browser: Interactive Experiences with Tensorflow.jsML in the Browser: Interactive Experiences with Tensorflow.js
ML in the Browser: Interactive Experiences with Tensorflow.js
 
Build Your Own WebAssembly Compiler
Build Your Own WebAssembly CompilerBuild Your Own WebAssembly Compiler
Build Your Own WebAssembly Compiler
 
User & Device Identity for Microservices @ Netflix Scale
User & Device Identity for Microservices @ Netflix ScaleUser & Device Identity for Microservices @ Netflix Scale
User & Device Identity for Microservices @ Netflix Scale
 
Scaling Patterns for Netflix's Edge
Scaling Patterns for Netflix's EdgeScaling Patterns for Netflix's Edge
Scaling Patterns for Netflix's Edge
 
Make Your Electron App Feel at Home Everywhere
Make Your Electron App Feel at Home EverywhereMake Your Electron App Feel at Home Everywhere
Make Your Electron App Feel at Home Everywhere
 
The Talk You've Been Await-ing For
The Talk You've Been Await-ing ForThe Talk You've Been Await-ing For
The Talk You've Been Await-ing For
 
Future of Data Engineering
Future of Data EngineeringFuture of Data Engineering
Future of Data Engineering
 
Automated Testing for Terraform, Docker, Packer, Kubernetes, and More
Automated Testing for Terraform, Docker, Packer, Kubernetes, and MoreAutomated Testing for Terraform, Docker, Packer, Kubernetes, and More
Automated Testing for Terraform, Docker, Packer, Kubernetes, and More
 

Kürzlich hochgeladen

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Kürzlich hochgeladen (20)

A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 

How Will Persistent Memory Change Software Design?