SlideShare a Scribd company logo
RAMinate: Hypervisor-based Virtualization
for Hybrid Main Memory Systems
The Best Paper Award of ACM Symposium on Cloud Computing
2016
More info: https://github.com/takahiro-hirofuchi/raminate
Takahiro Hirofuchi and Ryousei Takano
National Institute of Advanced Industrial Science and Technology
(AIST)
Invited Talk at NII, Tokyo, Dec. 16, 2016
Emerging Non-volatile Memory (NVM)
A DRAM cell =~ a capacitor
Pinned layer
Free layer
Low
resistance
High
resistance
A MRAM cell =~ ferromagnetism
Energy consuming
• Need refresh energy
• More than 30% of energy
consumption of a data center
Not scalable anymore
• Due to serious energy dissipation
Energy efficient
• No refresh energy
Scalable in theory
• Higher density will be
possible
2
Technology Roadmap on STT-MRAM
Spin Transfer Torque Magnetoresistive RAM (STT-MRAM, in short, we say MRAM
here) will achieve the same level of read/write latency as DRAM around 2016.
MRAM can rewrite memory cells without any practical degradation.
However, the write energy will be 10^2 times larger than that of DRAM.
Table 1. Technology roadmap on STT-MRAM and DRAM, according to
International Technology Roadmap for Semiconductor 2013
2013 2026
Read Time (ns)
DRAM <10 <10
STT-MRAM 35 <10
Write/Erasure Time (ns)
DRAM <10 <10
STT-MRAM 35 <1
Write Energy (J/bit)
DRAM 4E-15 2E-15
STT-MRAM 2.5E-12 1.5E-13
3
Hybrid Main Memory
• Achieve large main memory capacity with small energy
consumption
• To avoid write energy problems of MRAM, both DRAM and
MRAM must be combined for the main memory of a computer.
• CPU must send most write requests to DRAM.
DRAM
(Small)
MRAM
(Large)
CPU
Most write requests
4
Requirements for Hybrid Memory Systems in IaaS
Datacenters
• Transparent to guest operating systems
• A guest OS is under customer’s administrative domain,
not service provider’s administrative domain.
• Easy to apply the current server systems
• Extending a memory controller is costly, and should be avoided.
5
Assumption
Both DRAM and STT-MRAM are byte-addressable.
Both are mapped to different physical address ranges.
MRAM
(Large)
DRAM
(Small)
Physical Address Mapping
Offset 0 Offset M Offset N
• Future NVM technologies will be
also attached to a DIMM
interface
• Note: Currently, DIMM-based
Flash modules are already on
the market.
6
2. Determine necessary
page swap
operations
1. Detect written
pages
3. Update page
mapping
MRAM PoolDRAM Pool
1GB 3GB
VM (DRAM 4GB)
RAMinate (Qemu/KVM)
RAMinate: Hybrid Memory Support at Hypervisor
Provide transparency to guest operating systems without any modification
to existing memory controllers.
7
How RAMinate works (1)
8
MRAM PoolDRAM Pool
1a. Detect write-intensive guest physical pages on MRAM
How RAMinate works (2)
9
MRAM PoolDRAM Pool
1b. Detect guest physical pages on DRAM
that have few write operations
How RAMinate works (3)
2. Swap write-intensive MRAM pages
with DRAM pages having few write requests
10
MRAM PoolDRAM Pool
Divert write traffic to DRAM
behind the guest OS
Component 1. RAMinate periodically scans Extended Page
Table entries of a VM and finds dirty guest pages.
9
EPT maintains mapping between guest frame numbers and physical
frame numbers. When a guest page is written, CPU sets the dirty bit.
12
Component 2. The optimization algorithm, Corked Multi
Queue, determines which guest pages must be migrated.
The queue level relates to the number of past page updates.
MRAM pages in higher levels of queues are candidates for
page migration.
Q0
Q1
Q2
Q3
Q0
Q1
Q2
Q3
Promote a page when the number
of past detected updates of a page
exceeds a threshold value.
Demote a page when the elapsed
time from its last update exceeds a
threshold value.
Simulation
• Compare CMQ, LRU and nothing
• Use trace data during SPEC CPU 2006
13
DRAM hit ratio The number of swapped pages
CMQ drastically reduces the
number of necessary page swaps.
14
Component 3. RAMinate dynamically updates page mapping
between guest and physical pages without disrupting the
guest operating system.
Page Swap in Detail
• Temporary stop the VM during optimization
1. Stop the VM
2. Repeat page swap operations
1. Swap the PFNs of 2 EPT entries
2. Swap the data of the memory pages
3. Restart the VM
15
Page Swap Overhead
• Downtime is approximately 30ms for 1000
swap operations.
• Short enough, acceptable
– Page mapping optimization is performed every 5
second in the default setting.
16
Experiments
17
CH3
RAMinate
CH2CH1
Host OS
CH0
• Use one memory channel for MRAM
• Disable memory channel interleaving
• Measure read/write traffic per memory
channel by PMU
– CAS_COUNT.RD Counter
– CAS_COUNT.WR Counter
VM
PMUPMUPMUPMU
DRAM
Pool
MRAM
Pool
Kernel Compile (DRAM 40MB, MRAM 3960MB)
18
First, most write traffic went to MRAM. After optimized, only 50%.
The Total Amount of Written Data to DRAM and MRAM in
GB
19
The DRAM size is 10% of VM memory (400MB).
A smaller interval of optimization reduced the ratio of MRAM traffic, but increased
the total of written data because of memory copy operations for page swaps.
(Also, there is more performance overhead in a smaller interval. )
The Number of Page Swaps
20
Overhead on Application Performance
21
A shorter interval of optimization costs greater impact on application
performance. Overhead is larger than expected, due to EPT cache flush (?)
Energy Estimation
• Explore how much energy can be saved (or wasted)
if RAMinate is applied to future STT-MRAM devices
• First, develop energy models of DRAM and STT-
MRAM
• Next, estimate energy consumption by applying
obtained the data through the experiments to the
models
22
Energy Models
• DRAM
– X: Read data size (MB)
– Y: Written data size (MB)
– P: Idle Power (W) per VM
– T: Duration of an experiment (s)
– Energy (J) = a*X + a*Y + P*T
• STT-MRAM with 100x write energy
– X: Read data size (MB)
– Y: Written data size (MB)
– Energy (J) = a*X + (100*a)*Y
23
• Assume a simple linear correlation
between read/write throughput and energy consumption
• Sufficient for discussing orders of magnitudes larger write
energy
Estimated Energy Consumption
24
• Assume MRAM write energy x10^2 than that of DRAM.
Other values are discussed in the paper.
• Hybrid memory with 10% DRAM outperformed DRAM-only memory in most cases.
まとめ
• RAMinate: DRAMと次世代不揮発メモリを使い分ける仕組み
– アプリケーションの変更不要
– メモリコントローラの変更不要
– 我々の知る限り、ハイパーバイザでハイブリッドメモリに対応
した最初の研究
• 評価
– Qemu/KVMを拡張して実装
– STT-MRAMは手に入らないので、評価実験も工夫
– STT-MRAMに対する書き込み量を70%削減
– 消費電力を50%削減
25
論文やスライド等を https://github.com/takahiro-hirofuchi/raminate で公開してます。

More Related Content

What's hot

APSys Presentation Final copy2
APSys Presentation Final copy2APSys Presentation Final copy2
APSys Presentation Final copy2
Junli Gu
 
Revisiting Co-Processing for Hash Joins on the Coupled Cpu-GPU Architecture
Revisiting Co-Processing for Hash Joins on the CoupledCpu-GPU ArchitectureRevisiting Co-Processing for Hash Joins on the CoupledCpu-GPU Architecture
Revisiting Co-Processing for Hash Joins on the Coupled Cpu-GPU Architecture
mohamedragabslideshare
 
OpenCL caffe IWOCL 2016 presentation final
OpenCL caffe IWOCL 2016 presentation finalOpenCL caffe IWOCL 2016 presentation final
OpenCL caffe IWOCL 2016 presentation final
Junli Gu
 
Big_Data_Heterogeneous_Programming IEEE_Big_Data 2015
Big_Data_Heterogeneous_Programming IEEE_Big_Data 2015Big_Data_Heterogeneous_Programming IEEE_Big_Data 2015
Big_Data_Heterogeneous_Programming IEEE_Big_Data 2015
Junli Gu
 

What's hot (20)

TPU paper slide
TPU paper slideTPU paper slide
TPU paper slide
 
48a tuning
48a tuning48a tuning
48a tuning
 
Recent advancements in cache technology
Recent advancements in cache technologyRecent advancements in cache technology
Recent advancements in cache technology
 
Dynamo db and Cross Region Migration
Dynamo db and Cross Region MigrationDynamo db and Cross Region Migration
Dynamo db and Cross Region Migration
 
improve deep learning training and inference performance
improve deep learning training and inference performanceimprove deep learning training and inference performance
improve deep learning training and inference performance
 
Slides for In-Datacenter Performance Analysis of a Tensor Processing Unit
Slides for In-Datacenter Performance Analysis of a Tensor Processing UnitSlides for In-Datacenter Performance Analysis of a Tensor Processing Unit
Slides for In-Datacenter Performance Analysis of a Tensor Processing Unit
 
Firebird Scalability, by Dmitry Yemanov (in English)
Firebird Scalability, by Dmitry Yemanov (in English)Firebird Scalability, by Dmitry Yemanov (in English)
Firebird Scalability, by Dmitry Yemanov (in English)
 
2017 04-13-google-tpu-04
2017 04-13-google-tpu-042017 04-13-google-tpu-04
2017 04-13-google-tpu-04
 
Time For DIME
Time For DIMETime For DIME
Time For DIME
 
Demand paging
Demand pagingDemand paging
Demand paging
 
Shadow paging
Shadow pagingShadow paging
Shadow paging
 
Multiscale Dataflow Computing: Competitive Advantage at the Exascale Frontier
Multiscale Dataflow Computing: Competitive Advantage at the Exascale FrontierMultiscale Dataflow Computing: Competitive Advantage at the Exascale Frontier
Multiscale Dataflow Computing: Competitive Advantage at the Exascale Frontier
 
Page replacement
Page replacementPage replacement
Page replacement
 
APSys Presentation Final copy2
APSys Presentation Final copy2APSys Presentation Final copy2
APSys Presentation Final copy2
 
Revisiting Co-Processing for Hash Joins on the Coupled Cpu-GPU Architecture
Revisiting Co-Processing for Hash Joins on the CoupledCpu-GPU ArchitectureRevisiting Co-Processing for Hash Joins on the CoupledCpu-GPU Architecture
Revisiting Co-Processing for Hash Joins on the Coupled Cpu-GPU Architecture
 
OpenCL caffe IWOCL 2016 presentation final
OpenCL caffe IWOCL 2016 presentation finalOpenCL caffe IWOCL 2016 presentation final
OpenCL caffe IWOCL 2016 presentation final
 
Build2016 - P470 - Using Non-volatile Memory (NVDIMM-N) as Byte-Addressable S...
Build2016 - P470 - Using Non-volatile Memory (NVDIMM-N) as Byte-Addressable S...Build2016 - P470 - Using Non-volatile Memory (NVDIMM-N) as Byte-Addressable S...
Build2016 - P470 - Using Non-volatile Memory (NVDIMM-N) as Byte-Addressable S...
 
[2A2]Vectorized_processing_in_a_Nutshell
[2A2]Vectorized_processing_in_a_Nutshell[2A2]Vectorized_processing_in_a_Nutshell
[2A2]Vectorized_processing_in_a_Nutshell
 
Big_Data_Heterogeneous_Programming IEEE_Big_Data 2015
Big_Data_Heterogeneous_Programming IEEE_Big_Data 2015Big_Data_Heterogeneous_Programming IEEE_Big_Data 2015
Big_Data_Heterogeneous_Programming IEEE_Big_Data 2015
 
NUMA
NUMANUMA
NUMA
 

Viewers also liked

CareerSource SRNT Presentation 3-16-16
CareerSource SRNT Presentation 3-16-16CareerSource SRNT Presentation 3-16-16
CareerSource SRNT Presentation 3-16-16
Elisia Norton
 
Trabajo de ciencias politicas
Trabajo de ciencias politicasTrabajo de ciencias politicas
Trabajo de ciencias politicas
rigailvillazon
 
Importancia del internet en mi educación
Importancia del internet en mi educaciónImportancia del internet en mi educación
Importancia del internet en mi educación
rigailvillazon
 
Mtk karel bab 3
Mtk karel bab 3Mtk karel bab 3
Mtk karel bab 3
Zinoa
 
Matematika bab 3 della
Matematika bab 3 dellaMatematika bab 3 della
Matematika bab 3 della
Zinoa
 

Viewers also liked (17)

ComSys 2012 Yabusame Talk
ComSys 2012 Yabusame TalkComSys 2012 Yabusame Talk
ComSys 2012 Yabusame Talk
 
Overview of Blue Medora - New Relic Plugin for VMware
Overview of Blue Medora - New Relic Plugin for VMwareOverview of Blue Medora - New Relic Plugin for VMware
Overview of Blue Medora - New Relic Plugin for VMware
 
O visual de sua empresa como aliado na conquista de novos clientes
O visual de sua empresa como aliado na conquista de novos clientesO visual de sua empresa como aliado na conquista de novos clientes
O visual de sua empresa como aliado na conquista de novos clientes
 
Namo Advertising India
Namo Advertising IndiaNamo Advertising India
Namo Advertising India
 
Diez metaforas (1)
Diez metaforas (1)Diez metaforas (1)
Diez metaforas (1)
 
University Programs from Post Road Consulting
University Programs from Post Road ConsultingUniversity Programs from Post Road Consulting
University Programs from Post Road Consulting
 
CV_Praveen
CV_PraveenCV_Praveen
CV_Praveen
 
CareerSource SRNT Presentation 3-16-16
CareerSource SRNT Presentation 3-16-16CareerSource SRNT Presentation 3-16-16
CareerSource SRNT Presentation 3-16-16
 
Shobitha Mallika
Shobitha MallikaShobitha Mallika
Shobitha Mallika
 
Trabajo de ciencias politicas
Trabajo de ciencias politicasTrabajo de ciencias politicas
Trabajo de ciencias politicas
 
Importancia del internet en mi educación
Importancia del internet en mi educaciónImportancia del internet en mi educación
Importancia del internet en mi educación
 
Controllo della telecamera virtuale in software di modellazione in base a pro...
Controllo della telecamera virtuale in software di modellazione in base a pro...Controllo della telecamera virtuale in software di modellazione in base a pro...
Controllo della telecamera virtuale in software di modellazione in base a pro...
 
Auren Adenda actualidad fiscal cast diciembre 2016
Auren Adenda actualidad fiscal cast diciembre 2016Auren Adenda actualidad fiscal cast diciembre 2016
Auren Adenda actualidad fiscal cast diciembre 2016
 
Mtk karel bab 3
Mtk karel bab 3Mtk karel bab 3
Mtk karel bab 3
 
CA Datacom®/AD Report Utilization, and Information Gather for Support
CA Datacom®/AD Report Utilization, and Information Gather for SupportCA Datacom®/AD Report Utilization, and Information Gather for Support
CA Datacom®/AD Report Utilization, and Information Gather for Support
 
Matematika bab 3 della
Matematika bab 3 dellaMatematika bab 3 della
Matematika bab 3 della
 
SVP1 Portfolio
SVP1 Portfolio SVP1 Portfolio
SVP1 Portfolio
 

Similar to RAMinate Invited Talk at NII

Literature survey presentation
Literature survey presentationLiterature survey presentation
Literature survey presentation
Karthik Iyr
 
A survey on exploring memory optimizations in smartphones
A survey on exploring memory optimizations in smartphonesA survey on exploring memory optimizations in smartphones
A survey on exploring memory optimizations in smartphones
Karthik Iyr
 
RAMCloud: Scalable Datacenter Storage Entirely in DRAM
RAMCloud: Scalable  Datacenter Storage  Entirely in DRAMRAMCloud: Scalable  Datacenter Storage  Entirely in DRAM
RAMCloud: Scalable Datacenter Storage Entirely in DRAM
George Ang
 
lecture asdkvakm;bk;dv;advvAVHD;KASV;DVKHSVDK
lecture asdkvakm;bk;dv;advvAVHD;KASV;DVKHSVDKlecture asdkvakm;bk;dv;advvAVHD;KASV;DVKHSVDK
lecture asdkvakm;bk;dv;advvAVHD;KASV;DVKHSVDK
officeaiotfab
 

Similar to RAMinate Invited Talk at NII (20)

Virtualization for Emerging Memory Devices
Virtualization for Emerging Memory DevicesVirtualization for Emerging Memory Devices
Virtualization for Emerging Memory Devices
 
Literature survey presentation
Literature survey presentationLiterature survey presentation
Literature survey presentation
 
A survey on exploring memory optimizations in smartphones
A survey on exploring memory optimizations in smartphonesA survey on exploring memory optimizations in smartphones
A survey on exploring memory optimizations in smartphones
 
Emt
EmtEmt
Emt
 
RAMCloud: Scalable Datacenter Storage Entirely in DRAM
RAMCloud: Scalable  Datacenter Storage  Entirely in DRAMRAMCloud: Scalable  Datacenter Storage  Entirely in DRAM
RAMCloud: Scalable Datacenter Storage Entirely in DRAM
 
CA assignment group.pptx
CA assignment group.pptxCA assignment group.pptx
CA assignment group.pptx
 
CPN302 your-linux-ami-optimization-and-performance
CPN302 your-linux-ami-optimization-and-performanceCPN302 your-linux-ami-optimization-and-performance
CPN302 your-linux-ami-optimization-and-performance
 
Adaptive bank management[1]
Adaptive bank management[1]Adaptive bank management[1]
Adaptive bank management[1]
 
lecture asdkvakm;bk;dv;advvAVHD;KASV;DVKHSVDK
lecture asdkvakm;bk;dv;advvAVHD;KASV;DVKHSVDKlecture asdkvakm;bk;dv;advvAVHD;KASV;DVKHSVDK
lecture asdkvakm;bk;dv;advvAVHD;KASV;DVKHSVDK
 
Nvram applications in the architectural revolutions of main memory implementa...
Nvram applications in the architectural revolutions of main memory implementa...Nvram applications in the architectural revolutions of main memory implementa...
Nvram applications in the architectural revolutions of main memory implementa...
 
In datacenter performance analysis of a tensor processing unit
In datacenter performance analysis of a tensor processing unitIn datacenter performance analysis of a tensor processing unit
In datacenter performance analysis of a tensor processing unit
 
Time and Low Power Operation Using Embedded Dram to Gain Cell Data Retention
Time and Low Power Operation Using Embedded Dram to Gain Cell Data RetentionTime and Low Power Operation Using Embedded Dram to Gain Cell Data Retention
Time and Low Power Operation Using Embedded Dram to Gain Cell Data Retention
 
SRAM
SRAMSRAM
SRAM
 
Processing-in-Memory
Processing-in-MemoryProcessing-in-Memory
Processing-in-Memory
 
What is Server RAM.pdf
What is Server RAM.pdfWhat is Server RAM.pdf
What is Server RAM.pdf
 
Improving DRAM performance
Improving DRAM performanceImproving DRAM performance
Improving DRAM performance
 
30_Design.pdf
30_Design.pdf30_Design.pdf
30_Design.pdf
 
IRJET- Design And VLSI Verification of DDR SDRAM Controller Using VHDL
IRJET- Design And VLSI Verification of DDR SDRAM Controller Using VHDLIRJET- Design And VLSI Verification of DDR SDRAM Controller Using VHDL
IRJET- Design And VLSI Verification of DDR SDRAM Controller Using VHDL
 
GCMA: Guaranteed Contiguous Memory Allocator
GCMA: Guaranteed Contiguous Memory AllocatorGCMA: Guaranteed Contiguous Memory Allocator
GCMA: Guaranteed Contiguous Memory Allocator
 
RRAM Status and Opportunities
RRAM Status and Opportunities RRAM Status and Opportunities
RRAM Status and Opportunities
 

Recently uploaded

Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Peter Udo Diehl
 

Recently uploaded (20)

Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomSalesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
 
In-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT ProfessionalsIn-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT Professionals
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutes
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
 
UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
 
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and Planning
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
 
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
 

RAMinate Invited Talk at NII

  • 1. RAMinate: Hypervisor-based Virtualization for Hybrid Main Memory Systems The Best Paper Award of ACM Symposium on Cloud Computing 2016 More info: https://github.com/takahiro-hirofuchi/raminate Takahiro Hirofuchi and Ryousei Takano National Institute of Advanced Industrial Science and Technology (AIST) Invited Talk at NII, Tokyo, Dec. 16, 2016
  • 2. Emerging Non-volatile Memory (NVM) A DRAM cell =~ a capacitor Pinned layer Free layer Low resistance High resistance A MRAM cell =~ ferromagnetism Energy consuming • Need refresh energy • More than 30% of energy consumption of a data center Not scalable anymore • Due to serious energy dissipation Energy efficient • No refresh energy Scalable in theory • Higher density will be possible 2
  • 3. Technology Roadmap on STT-MRAM Spin Transfer Torque Magnetoresistive RAM (STT-MRAM, in short, we say MRAM here) will achieve the same level of read/write latency as DRAM around 2016. MRAM can rewrite memory cells without any practical degradation. However, the write energy will be 10^2 times larger than that of DRAM. Table 1. Technology roadmap on STT-MRAM and DRAM, according to International Technology Roadmap for Semiconductor 2013 2013 2026 Read Time (ns) DRAM <10 <10 STT-MRAM 35 <10 Write/Erasure Time (ns) DRAM <10 <10 STT-MRAM 35 <1 Write Energy (J/bit) DRAM 4E-15 2E-15 STT-MRAM 2.5E-12 1.5E-13 3
  • 4. Hybrid Main Memory • Achieve large main memory capacity with small energy consumption • To avoid write energy problems of MRAM, both DRAM and MRAM must be combined for the main memory of a computer. • CPU must send most write requests to DRAM. DRAM (Small) MRAM (Large) CPU Most write requests 4
  • 5. Requirements for Hybrid Memory Systems in IaaS Datacenters • Transparent to guest operating systems • A guest OS is under customer’s administrative domain, not service provider’s administrative domain. • Easy to apply the current server systems • Extending a memory controller is costly, and should be avoided. 5
  • 6. Assumption Both DRAM and STT-MRAM are byte-addressable. Both are mapped to different physical address ranges. MRAM (Large) DRAM (Small) Physical Address Mapping Offset 0 Offset M Offset N • Future NVM technologies will be also attached to a DIMM interface • Note: Currently, DIMM-based Flash modules are already on the market. 6
  • 7. 2. Determine necessary page swap operations 1. Detect written pages 3. Update page mapping MRAM PoolDRAM Pool 1GB 3GB VM (DRAM 4GB) RAMinate (Qemu/KVM) RAMinate: Hybrid Memory Support at Hypervisor Provide transparency to guest operating systems without any modification to existing memory controllers. 7
  • 8. How RAMinate works (1) 8 MRAM PoolDRAM Pool 1a. Detect write-intensive guest physical pages on MRAM
  • 9. How RAMinate works (2) 9 MRAM PoolDRAM Pool 1b. Detect guest physical pages on DRAM that have few write operations
  • 10. How RAMinate works (3) 2. Swap write-intensive MRAM pages with DRAM pages having few write requests 10 MRAM PoolDRAM Pool Divert write traffic to DRAM behind the guest OS
  • 11. Component 1. RAMinate periodically scans Extended Page Table entries of a VM and finds dirty guest pages. 9 EPT maintains mapping between guest frame numbers and physical frame numbers. When a guest page is written, CPU sets the dirty bit.
  • 12. 12 Component 2. The optimization algorithm, Corked Multi Queue, determines which guest pages must be migrated. The queue level relates to the number of past page updates. MRAM pages in higher levels of queues are candidates for page migration. Q0 Q1 Q2 Q3 Q0 Q1 Q2 Q3 Promote a page when the number of past detected updates of a page exceeds a threshold value. Demote a page when the elapsed time from its last update exceeds a threshold value.
  • 13. Simulation • Compare CMQ, LRU and nothing • Use trace data during SPEC CPU 2006 13 DRAM hit ratio The number of swapped pages CMQ drastically reduces the number of necessary page swaps.
  • 14. 14 Component 3. RAMinate dynamically updates page mapping between guest and physical pages without disrupting the guest operating system.
  • 15. Page Swap in Detail • Temporary stop the VM during optimization 1. Stop the VM 2. Repeat page swap operations 1. Swap the PFNs of 2 EPT entries 2. Swap the data of the memory pages 3. Restart the VM 15
  • 16. Page Swap Overhead • Downtime is approximately 30ms for 1000 swap operations. • Short enough, acceptable – Page mapping optimization is performed every 5 second in the default setting. 16
  • 17. Experiments 17 CH3 RAMinate CH2CH1 Host OS CH0 • Use one memory channel for MRAM • Disable memory channel interleaving • Measure read/write traffic per memory channel by PMU – CAS_COUNT.RD Counter – CAS_COUNT.WR Counter VM PMUPMUPMUPMU DRAM Pool MRAM Pool
  • 18. Kernel Compile (DRAM 40MB, MRAM 3960MB) 18 First, most write traffic went to MRAM. After optimized, only 50%.
  • 19. The Total Amount of Written Data to DRAM and MRAM in GB 19 The DRAM size is 10% of VM memory (400MB). A smaller interval of optimization reduced the ratio of MRAM traffic, but increased the total of written data because of memory copy operations for page swaps. (Also, there is more performance overhead in a smaller interval. )
  • 20. The Number of Page Swaps 20
  • 21. Overhead on Application Performance 21 A shorter interval of optimization costs greater impact on application performance. Overhead is larger than expected, due to EPT cache flush (?)
  • 22. Energy Estimation • Explore how much energy can be saved (or wasted) if RAMinate is applied to future STT-MRAM devices • First, develop energy models of DRAM and STT- MRAM • Next, estimate energy consumption by applying obtained the data through the experiments to the models 22
  • 23. Energy Models • DRAM – X: Read data size (MB) – Y: Written data size (MB) – P: Idle Power (W) per VM – T: Duration of an experiment (s) – Energy (J) = a*X + a*Y + P*T • STT-MRAM with 100x write energy – X: Read data size (MB) – Y: Written data size (MB) – Energy (J) = a*X + (100*a)*Y 23 • Assume a simple linear correlation between read/write throughput and energy consumption • Sufficient for discussing orders of magnitudes larger write energy
  • 24. Estimated Energy Consumption 24 • Assume MRAM write energy x10^2 than that of DRAM. Other values are discussed in the paper. • Hybrid memory with 10% DRAM outperformed DRAM-only memory in most cases.
  • 25. まとめ • RAMinate: DRAMと次世代不揮発メモリを使い分ける仕組み – アプリケーションの変更不要 – メモリコントローラの変更不要 – 我々の知る限り、ハイパーバイザでハイブリッドメモリに対応 した最初の研究 • 評価 – Qemu/KVMを拡張して実装 – STT-MRAMは手に入らないので、評価実験も工夫 – STT-MRAMに対する書き込み量を70%削減 – 消費電力を50%削減 25 論文やスライド等を https://github.com/takahiro-hirofuchi/raminate で公開してます。