SlideShare ist ein Scribd-Unternehmen logo
1 von 16
Downloaden Sie, um offline zu lesen
Brought to you by
Optane PMem latency
for disk and in-memory DB
Doug Hood
Consulting Member of Technical Staff at
Latency of Optane PMem for databases
Can Intel Optane Persistent Memory improve database Latency?
■ Buffer cache reads
■ Log writes
■ Commits
Can Intel Optane Persistent Memory improve In-Memory database latency?
■ Reads and writes
■ Log writes
■ Commits
Should you use App Direct Mode or Memory Mode?
App Direct Mode, Memory Mode or Both?
App Direct Mode
■ Byte addressable memory
■ Persistent
■ Need to explicitly design/code for it
■ Need to create file systems for it
Memory Mode
■ Byte addressable memory
■ Non persistent
■ Treat it like DRAM
■ It just works
DRAM Optane Persistent Memory
App Direct Mode Memory Mode
Explicitly use DRAM & PMem as
needed based on your design
Just use ‘memory’
The ‘memory’ may be DRAM or PMem
depending on the working set size
App Direct Mode for disk based databases
Buffer Cache Reads
■ Design an automatic read hierarchy
■ Use App Direct Mode for the hotest data
■ Use NVMe storage for hot data
■ Use SSDs for the coldest data
■ Resulted in 10x faster reads
■ Enables consistent reads in 19 microseconds
Log Writes and Commits
■ 8 time faster than using the fastest NVMe
Optane PMem for in-memory databases
Intel Optane persistent memory is good, but it is not magic:
■ It has finite capacity (max 512 GB per module)
■ Only works with the latest Intel Xeon CPUs
■ Slower than DDR4 RAM
■ You still have to make hard design choices
■ Cost effective != free
App Direct Mode for in-memory databases
Pro
Instant DB load for multi TB database is nice
Sync writes to logs are fast & simple
Con
PMem is up to 3x slower than DDR4 RAM
Designing DDR4 caches for PMem = big redesign
Memory Mode for in-memory databases
Hot
Data
Cold
Data
Intel memory
controller
It just works!
How much PMem is really being used?
■ The latency of 100% PMem can be up to 3x slower than DRAM
■ Memory Mode always has a DRAM cache for PMem, but the size will vary
■ Vary the working set size to see the effect on performance
■ Need to check the CPU hardware events to verify what is actually
happening
DRAM = 384 GB
PMem = 1.5 TB
1:4 ratio of DRAM to
PMem
DRAM Optane Persistent Memory
Vary the working set size
Uniform with bounds
using drand48()
Zipfian various skew Poisson various skew
Tools used for these benchmarks
Memory Mode Latency for an IMDB
L3 Cache [0.1 us]
DDR4 RAM [1.07 us] Optane PMem [2.1 us]
Throughput
(TPS)
Analysis of Results
■ Working set within DRAM, ie < 384 GB
■ The Memory Mode read results were the same as the DRAM results
■ The Memory Mode write results were within 5% of the DRAM results
■ Working set within PMem, ie 25% - 100% of PMem
■ The DRAM cache hit ratio only slightly improved the performance
■ This is not what I expected, but a good outcome
■ The read scalability was not affected by the PMem
■ The write scalability was minimally affected by PMem
Workload Schema
create table vpn_users (
vpn_id integer not null,
vpn_nb integer not null,
directory_nb char(10) not null,
last_calling_party char(10) not null,
desc char(100) not null,
myjson char(8300),
primary key (vpn_id, vpn_nb)
);
Insert 1.4 TB of data [160M rows]
SQL Workload
select
directory_nb,
last_calling_party,
descr
from vpn_users
where vpn_id = ?
and vpn_nb= ?;
update vpn_users
set last_calling_party = ?
where vpn_id = ?
and vpn_nb = ?;
commit;
Lookup by PK Update by PK
Tools used for these benchmarks
■ gettimeofday()
■ Intel icc C++ complier [+ gcc]
■ Intel VTune Profiler
■ Intel Microarchitecture Code Named Cascade Lake-X Events
■ ipmctl https://github.com/intel/ipmctl
■ https://man7.org/linux/man-pages/man2/perf_event_open.2.html
■ Process Counter Monitor https://github.com/opcm/pcm
■ Prometheus & Grafana
■ A database with buffer cache (Oracle Exadata X8M)
■ An In-Memory database (Oracle TimesTen 18.1)
■ tptbm.c https://github.com/oracle/oracle-timesten-samples
Brought to you by
Doug Hood
douglas.hood@oracle.com
@ScalableDBDoug

Weitere ähnliche Inhalte

Was ist angesagt?

OSv Unikernel — Optimizing Guest OS to Run Stateless and Serverless Apps in t...
OSv Unikernel — Optimizing Guest OS to Run Stateless and Serverless Apps in t...OSv Unikernel — Optimizing Guest OS to Run Stateless and Serverless Apps in t...
OSv Unikernel — Optimizing Guest OS to Run Stateless and Serverless Apps in t...
ScyllaDB
 
High-Performance Networking Using eBPF, XDP, and io_uring
High-Performance Networking Using eBPF, XDP, and io_uringHigh-Performance Networking Using eBPF, XDP, and io_uring
High-Performance Networking Using eBPF, XDP, and io_uring
ScyllaDB
 
OSNoise Tracer: Who Is Stealing My CPU Time?
OSNoise Tracer: Who Is Stealing My CPU Time?OSNoise Tracer: Who Is Stealing My CPU Time?
OSNoise Tracer: Who Is Stealing My CPU Time?
ScyllaDB
 

Was ist angesagt? (20)

Keeping Latency Low and Throughput High with Application-level Priority Manag...
Keeping Latency Low and Throughput High with Application-level Priority Manag...Keeping Latency Low and Throughput High with Application-level Priority Manag...
Keeping Latency Low and Throughput High with Application-level Priority Manag...
 
Extreme HTTP Performance Tuning: 1.2M API req/s on a 4 vCPU EC2 Instance
Extreme HTTP Performance Tuning: 1.2M API req/s on a 4 vCPU EC2 InstanceExtreme HTTP Performance Tuning: 1.2M API req/s on a 4 vCPU EC2 Instance
Extreme HTTP Performance Tuning: 1.2M API req/s on a 4 vCPU EC2 Instance
 
Continuous Go Profiling & Observability
Continuous Go Profiling & ObservabilityContinuous Go Profiling & Observability
Continuous Go Profiling & Observability
 
Data Structures for High Resolution, Real-time Telemetry at Scale
Data Structures for High Resolution, Real-time Telemetry at ScaleData Structures for High Resolution, Real-time Telemetry at Scale
Data Structures for High Resolution, Real-time Telemetry at Scale
 
G1: To Infinity and Beyond
G1: To Infinity and BeyondG1: To Infinity and Beyond
G1: To Infinity and Beyond
 
Understanding Apache Kafka P99 Latency at Scale
Understanding Apache Kafka P99 Latency at ScaleUnderstanding Apache Kafka P99 Latency at Scale
Understanding Apache Kafka P99 Latency at Scale
 
Rust, Wright's Law, and the Future of Low-Latency Systems
Rust, Wright's Law, and the Future of Low-Latency SystemsRust, Wright's Law, and the Future of Low-Latency Systems
Rust, Wright's Law, and the Future of Low-Latency Systems
 
Using eBPF to Measure the k8s Cluster Health
Using eBPF to Measure the k8s Cluster HealthUsing eBPF to Measure the k8s Cluster Health
Using eBPF to Measure the k8s Cluster Health
 
OSv Unikernel — Optimizing Guest OS to Run Stateless and Serverless Apps in t...
OSv Unikernel — Optimizing Guest OS to Run Stateless and Serverless Apps in t...OSv Unikernel — Optimizing Guest OS to Run Stateless and Serverless Apps in t...
OSv Unikernel — Optimizing Guest OS to Run Stateless and Serverless Apps in t...
 
Get Lower Latency and Higher Throughput for Java Applications
Get Lower Latency and Higher Throughput for Java ApplicationsGet Lower Latency and Higher Throughput for Java Applications
Get Lower Latency and Higher Throughput for Java Applications
 
High-Performance Networking Using eBPF, XDP, and io_uring
High-Performance Networking Using eBPF, XDP, and io_uringHigh-Performance Networking Using eBPF, XDP, and io_uring
High-Performance Networking Using eBPF, XDP, and io_uring
 
Unikraft: Fast, Specialized Unikernels the Easy Way
Unikraft: Fast, Specialized Unikernels the Easy WayUnikraft: Fast, Specialized Unikernels the Easy Way
Unikraft: Fast, Specialized Unikernels the Easy Way
 
Rust Is Safe. But Is It Fast?
Rust Is Safe. But Is It Fast?Rust Is Safe. But Is It Fast?
Rust Is Safe. But Is It Fast?
 
Performance Tuning - Memory leaks, Thread deadlocks, JDK tools
Performance Tuning -  Memory leaks, Thread deadlocks, JDK toolsPerformance Tuning -  Memory leaks, Thread deadlocks, JDK tools
Performance Tuning - Memory leaks, Thread deadlocks, JDK tools
 
Practical SystemTAP basics: Perl memory profiling
Practical SystemTAP basics: Perl memory profilingPractical SystemTAP basics: Perl memory profiling
Practical SystemTAP basics: Perl memory profiling
 
Kernel Recipes 2017 - What's new in the world of storage for Linux - Jens Axboe
Kernel Recipes 2017 - What's new in the world of storage for Linux - Jens AxboeKernel Recipes 2017 - What's new in the world of storage for Linux - Jens Axboe
Kernel Recipes 2017 - What's new in the world of storage for Linux - Jens Axboe
 
OSNoise Tracer: Who Is Stealing My CPU Time?
OSNoise Tracer: Who Is Stealing My CPU Time?OSNoise Tracer: Who Is Stealing My CPU Time?
OSNoise Tracer: Who Is Stealing My CPU Time?
 
RISC-V on Edge: Porting EVE and Alpine Linux to RISC-V
RISC-V on Edge: Porting EVE and Alpine Linux to RISC-VRISC-V on Edge: Porting EVE and Alpine Linux to RISC-V
RISC-V on Edge: Porting EVE and Alpine Linux to RISC-V
 
Scylla Summit 2018: Rebuilding the Ceph Distributed Storage Solution with Sea...
Scylla Summit 2018: Rebuilding the Ceph Distributed Storage Solution with Sea...Scylla Summit 2018: Rebuilding the Ceph Distributed Storage Solution with Sea...
Scylla Summit 2018: Rebuilding the Ceph Distributed Storage Solution with Sea...
 
Optimizing Linux Servers
Optimizing Linux ServersOptimizing Linux Servers
Optimizing Linux Servers
 

Ähnlich wie DB Latency Using DRAM + PMem in App Direct & Memory Modes

All Flash is not Equal: Tony Pearson contrasts IBM FlashSystem with Solid-Sta...
All Flash is not Equal: Tony Pearson contrasts IBM FlashSystem with Solid-Sta...All Flash is not Equal: Tony Pearson contrasts IBM FlashSystem with Solid-Sta...
All Flash is not Equal: Tony Pearson contrasts IBM FlashSystem with Solid-Sta...
Tony Pearson
 
Introduction of ram ddr3
Introduction of ram ddr3Introduction of ram ddr3
Introduction of ram ddr3
Technocratz
 

Ähnlich wie DB Latency Using DRAM + PMem in App Direct & Memory Modes (20)

Ram ppt
Ram pptRam ppt
Ram ppt
 
UPGRADE YOUR RAM
UPGRADE YOUR RAMUPGRADE YOUR RAM
UPGRADE YOUR RAM
 
All Flash is not Equal: Tony Pearson contrasts IBM FlashSystem with Solid-Sta...
All Flash is not Equal: Tony Pearson contrasts IBM FlashSystem with Solid-Sta...All Flash is not Equal: Tony Pearson contrasts IBM FlashSystem with Solid-Sta...
All Flash is not Equal: Tony Pearson contrasts IBM FlashSystem with Solid-Sta...
 
Memory
MemoryMemory
Memory
 
Virtualization for Emerging Memory Devices
Virtualization for Emerging Memory DevicesVirtualization for Emerging Memory Devices
Virtualization for Emerging Memory Devices
 
Accelerating Apache Spark Shuffle for Data Analytics on the Cloud with Remote...
Accelerating Apache Spark Shuffle for Data Analytics on the Cloud with Remote...Accelerating Apache Spark Shuffle for Data Analytics on the Cloud with Remote...
Accelerating Apache Spark Shuffle for Data Analytics on the Cloud with Remote...
 
Introduction of ram ddr3
Introduction of ram ddr3Introduction of ram ddr3
Introduction of ram ddr3
 
Introduction of ram ddr3
Introduction of ram ddr3Introduction of ram ddr3
Introduction of ram ddr3
 
Basics Of Semiconductor Memories
Basics Of Semiconductor MemoriesBasics Of Semiconductor Memories
Basics Of Semiconductor Memories
 
Memory - RAM and its types
Memory - RAM and its typesMemory - RAM and its types
Memory - RAM and its types
 
Live memory forensics
Live memory forensicsLive memory forensics
Live memory forensics
 
Working memory in computer
Working memory in computerWorking memory in computer
Working memory in computer
 
What is Server RAM.pdf
What is Server RAM.pdfWhat is Server RAM.pdf
What is Server RAM.pdf
 
06 - Memory.ppt
06 - Memory.ppt06 - Memory.ppt
06 - Memory.ppt
 
logical memory-organisation
logical memory-organisationlogical memory-organisation
logical memory-organisation
 
diskmfr
diskmfrdiskmfr
diskmfr
 
MariaDB Server Performance Tuning & Optimization
MariaDB Server Performance Tuning & OptimizationMariaDB Server Performance Tuning & Optimization
MariaDB Server Performance Tuning & Optimization
 
MySQL Tuning
MySQL TuningMySQL Tuning
MySQL Tuning
 
Computer memory and types of memory.pptx
Computer memory and types of memory.pptxComputer memory and types of memory.pptx
Computer memory and types of memory.pptx
 
Computer Memory: Which is Better, Density or Speed?
Computer Memory: Which is Better, Density or Speed?Computer Memory: Which is Better, Density or Speed?
Computer Memory: Which is Better, Density or Speed?
 

Mehr von ScyllaDB

Mehr von ScyllaDB (20)

Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
What Developers Need to Unlearn for High Performance NoSQL
What Developers Need to Unlearn for High Performance NoSQLWhat Developers Need to Unlearn for High Performance NoSQL
What Developers Need to Unlearn for High Performance NoSQL
 
Low Latency at Extreme Scale: Proven Practices & Pitfalls
Low Latency at Extreme Scale: Proven Practices & PitfallsLow Latency at Extreme Scale: Proven Practices & Pitfalls
Low Latency at Extreme Scale: Proven Practices & Pitfalls
 
Dissecting Real-World Database Performance Dilemmas
Dissecting Real-World Database Performance DilemmasDissecting Real-World Database Performance Dilemmas
Dissecting Real-World Database Performance Dilemmas
 
Beyond Linear Scaling: A New Path for Performance with ScyllaDB
Beyond Linear Scaling: A New Path for Performance with ScyllaDBBeyond Linear Scaling: A New Path for Performance with ScyllaDB
Beyond Linear Scaling: A New Path for Performance with ScyllaDB
 
Dissecting Real-World Database Performance Dilemmas
Dissecting Real-World Database Performance DilemmasDissecting Real-World Database Performance Dilemmas
Dissecting Real-World Database Performance Dilemmas
 
Database Performance at Scale Masterclass: Workload Characteristics by Felipe...
Database Performance at Scale Masterclass: Workload Characteristics by Felipe...Database Performance at Scale Masterclass: Workload Characteristics by Felipe...
Database Performance at Scale Masterclass: Workload Characteristics by Felipe...
 
Database Performance at Scale Masterclass: Database Internals by Pavel Emelya...
Database Performance at Scale Masterclass: Database Internals by Pavel Emelya...Database Performance at Scale Masterclass: Database Internals by Pavel Emelya...
Database Performance at Scale Masterclass: Database Internals by Pavel Emelya...
 
Database Performance at Scale Masterclass: Driver Strategies by Piotr Sarna
Database Performance at Scale Masterclass: Driver Strategies by Piotr SarnaDatabase Performance at Scale Masterclass: Driver Strategies by Piotr Sarna
Database Performance at Scale Masterclass: Driver Strategies by Piotr Sarna
 
Replacing Your Cache with ScyllaDB
Replacing Your Cache with ScyllaDBReplacing Your Cache with ScyllaDB
Replacing Your Cache with ScyllaDB
 
Powering Real-Time Apps with ScyllaDB_ Low Latency & Linear Scalability
Powering Real-Time Apps with ScyllaDB_ Low Latency & Linear ScalabilityPowering Real-Time Apps with ScyllaDB_ Low Latency & Linear Scalability
Powering Real-Time Apps with ScyllaDB_ Low Latency & Linear Scalability
 
7 Reasons Not to Put an External Cache in Front of Your Database.pptx
7 Reasons Not to Put an External Cache in Front of Your Database.pptx7 Reasons Not to Put an External Cache in Front of Your Database.pptx
7 Reasons Not to Put an External Cache in Front of Your Database.pptx
 
Getting the most out of ScyllaDB
Getting the most out of ScyllaDBGetting the most out of ScyllaDB
Getting the most out of ScyllaDB
 
NoSQL Database Migration Masterclass - Session 2: The Anatomy of a Migration
NoSQL Database Migration Masterclass - Session 2: The Anatomy of a MigrationNoSQL Database Migration Masterclass - Session 2: The Anatomy of a Migration
NoSQL Database Migration Masterclass - Session 2: The Anatomy of a Migration
 
NoSQL Database Migration Masterclass - Session 3: Migration Logistics
NoSQL Database Migration Masterclass - Session 3: Migration LogisticsNoSQL Database Migration Masterclass - Session 3: Migration Logistics
NoSQL Database Migration Masterclass - Session 3: Migration Logistics
 
NoSQL Data Migration Masterclass - Session 1 Migration Strategies and Challenges
NoSQL Data Migration Masterclass - Session 1 Migration Strategies and ChallengesNoSQL Data Migration Masterclass - Session 1 Migration Strategies and Challenges
NoSQL Data Migration Masterclass - Session 1 Migration Strategies and Challenges
 
ScyllaDB Virtual Workshop
ScyllaDB Virtual WorkshopScyllaDB Virtual Workshop
ScyllaDB Virtual Workshop
 
DBaaS in the Real World: Risks, Rewards & Tradeoffs
DBaaS in the Real World: Risks, Rewards & TradeoffsDBaaS in the Real World: Risks, Rewards & Tradeoffs
DBaaS in the Real World: Risks, Rewards & Tradeoffs
 
Build Low-Latency Applications in Rust on ScyllaDB
Build Low-Latency Applications in Rust on ScyllaDBBuild Low-Latency Applications in Rust on ScyllaDB
Build Low-Latency Applications in Rust on ScyllaDB
 
NoSQL Data Modeling 101
NoSQL Data Modeling 101NoSQL Data Modeling 101
NoSQL Data Modeling 101
 

Kürzlich hochgeladen

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Kürzlich hochgeladen (20)

DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
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)
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
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...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
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
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
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
 

DB Latency Using DRAM + PMem in App Direct & Memory Modes

  • 1. Brought to you by Optane PMem latency for disk and in-memory DB Doug Hood Consulting Member of Technical Staff at
  • 2. Latency of Optane PMem for databases Can Intel Optane Persistent Memory improve database Latency? ■ Buffer cache reads ■ Log writes ■ Commits Can Intel Optane Persistent Memory improve In-Memory database latency? ■ Reads and writes ■ Log writes ■ Commits Should you use App Direct Mode or Memory Mode?
  • 3. App Direct Mode, Memory Mode or Both? App Direct Mode ■ Byte addressable memory ■ Persistent ■ Need to explicitly design/code for it ■ Need to create file systems for it Memory Mode ■ Byte addressable memory ■ Non persistent ■ Treat it like DRAM ■ It just works DRAM Optane Persistent Memory App Direct Mode Memory Mode Explicitly use DRAM & PMem as needed based on your design Just use ‘memory’ The ‘memory’ may be DRAM or PMem depending on the working set size
  • 4. App Direct Mode for disk based databases Buffer Cache Reads ■ Design an automatic read hierarchy ■ Use App Direct Mode for the hotest data ■ Use NVMe storage for hot data ■ Use SSDs for the coldest data ■ Resulted in 10x faster reads ■ Enables consistent reads in 19 microseconds Log Writes and Commits ■ 8 time faster than using the fastest NVMe
  • 5. Optane PMem for in-memory databases Intel Optane persistent memory is good, but it is not magic: ■ It has finite capacity (max 512 GB per module) ■ Only works with the latest Intel Xeon CPUs ■ Slower than DDR4 RAM ■ You still have to make hard design choices ■ Cost effective != free
  • 6. App Direct Mode for in-memory databases Pro Instant DB load for multi TB database is nice Sync writes to logs are fast & simple Con PMem is up to 3x slower than DDR4 RAM Designing DDR4 caches for PMem = big redesign
  • 7. Memory Mode for in-memory databases Hot Data Cold Data Intel memory controller It just works!
  • 8. How much PMem is really being used? ■ The latency of 100% PMem can be up to 3x slower than DRAM ■ Memory Mode always has a DRAM cache for PMem, but the size will vary ■ Vary the working set size to see the effect on performance ■ Need to check the CPU hardware events to verify what is actually happening DRAM = 384 GB PMem = 1.5 TB 1:4 ratio of DRAM to PMem DRAM Optane Persistent Memory
  • 9. Vary the working set size Uniform with bounds using drand48() Zipfian various skew Poisson various skew
  • 10. Tools used for these benchmarks
  • 11. Memory Mode Latency for an IMDB L3 Cache [0.1 us] DDR4 RAM [1.07 us] Optane PMem [2.1 us] Throughput (TPS)
  • 12. Analysis of Results ■ Working set within DRAM, ie < 384 GB ■ The Memory Mode read results were the same as the DRAM results ■ The Memory Mode write results were within 5% of the DRAM results ■ Working set within PMem, ie 25% - 100% of PMem ■ The DRAM cache hit ratio only slightly improved the performance ■ This is not what I expected, but a good outcome ■ The read scalability was not affected by the PMem ■ The write scalability was minimally affected by PMem
  • 13. Workload Schema create table vpn_users ( vpn_id integer not null, vpn_nb integer not null, directory_nb char(10) not null, last_calling_party char(10) not null, desc char(100) not null, myjson char(8300), primary key (vpn_id, vpn_nb) ); Insert 1.4 TB of data [160M rows]
  • 14. SQL Workload select directory_nb, last_calling_party, descr from vpn_users where vpn_id = ? and vpn_nb= ?; update vpn_users set last_calling_party = ? where vpn_id = ? and vpn_nb = ?; commit; Lookup by PK Update by PK
  • 15. Tools used for these benchmarks ■ gettimeofday() ■ Intel icc C++ complier [+ gcc] ■ Intel VTune Profiler ■ Intel Microarchitecture Code Named Cascade Lake-X Events ■ ipmctl https://github.com/intel/ipmctl ■ https://man7.org/linux/man-pages/man2/perf_event_open.2.html ■ Process Counter Monitor https://github.com/opcm/pcm ■ Prometheus & Grafana ■ A database with buffer cache (Oracle Exadata X8M) ■ An In-Memory database (Oracle TimesTen 18.1) ■ tptbm.c https://github.com/oracle/oracle-timesten-samples
  • 16. Brought to you by Doug Hood douglas.hood@oracle.com @ScalableDBDoug