SlideShare une entreprise Scribd logo
1  sur  20
Télécharger pour lire hors ligne
Short-term Regions 
A Region based Short-term Memory Allocator 
Stephanie Stroka  steffueue@gmail.com
MEMORY LEAKS DUE TO 
PROGRAMMING ERRORS
SHORT-TERM MEMORY
void  scm malloc ( s i z e t size ) ; 
void scm ref resh ( void  pt r , i n t e x p i r a t i o n ) ; 
void scm t ick ( ) ;
const i n t scm create region ( ) ; 
void  s cm mal loc in region ( s i z e t size , 
const i n t r e g i d ) ; 
void scm ref resh region ( const i n t reg id , 
i n t e x p i r a t i o n ) ; 
void scm ref resh ( void  pt r , i n t e x p i r a t i o n ) ; 
void scm t ick ( ) ;
Performance gain of STR compared to MALLOC. 
SINGLE-THREADED 
AVG 55.47 % 
MIN 51.97 % 
MAX 58.44 % 
MULTI-THREADED 
AVG 65.47 % 
MIN 52.94 % 
MAX 70.11 %
Performance gain of STR compared to STM. 
SINGLE-THREADED 
AVG 79.60 % 
MIN 78.80 % 
MAX 80.39 % 
MULTI-THREADED 
AVG 87.26 % 
MIN 75.51 % 
MAX 95.20 %
1e+06 
100000 
10000 
1000 
Memory Consumption - sh6bench multi-threaded, nonleaky 
0 10000 20000 30000 40000 50000 60000 70000 80000 90000 100000 
Memory (bytes, logscale) 
Allocation Phase 
MALLOC area 
MALLOC gross memory 
STM area 
STM gross memory 
STR area 
STR gross memory 
STRMC area 
STRMC gross memory 
net memory
1e+07 
1e+06 
100000 
10000 
1000 
Memory Consumption - sh6bench multi-threaded, leaky 
0 10000 20000 30000 40000 50000 60000 70000 80000 90000 100000 
Memory (bytes, logscale) 
Allocation Phase 
MALLOC_LEAK area 
MALLOC_LEAK gross memory 
STM_LEAK area 
STM_LEAK gross memory 
STR_LEAK area 
STR_LEAK gross memory 
STRMC_LEAK area 
STRMC_LEAK gross memory 
net memory
1e+07 
The percentage of unused (allocated, but not needed) memory 
1e+06 
100000 
10000 
1000 
Memory Consumption - sh6bench multi-threaded, leaky 
0 10000 20000 30000 40000 50000 60000 70000 80000 90000 100000 
Memory (bytes, logscale) 
Allocation Phase 
MALLOC_LEAK area 
MALLOC_LEAK gross memory 
STM_LEAK area 
STM_LEAK gross memory 
STR_LEAK area 
STR_LEAK gross memory 
STRMC_LEAK area 
STRMC_LEAK gross memory 
net memory 
in sh6bench. 
Fragmentation in % 
single-threaded multi-threaded 
MALLOC 1.0700 17.1700 
MALLOC LEAK 99.3000 99.3700 
STM 26.0100 72.2400 
STM LEAK 27.7000 71.0900 
STR 37.0000 81.6300 
STR LEAK 39.1100 82.6400
PERFORMANCE AT A 
COST OF MEMORY, 
NO MEMORY LEAKS

Contenu connexe

Similaire à Short-term Regions

Performance tuning
Performance tuningPerformance tuning
Performance tuningJon Haddad
 
A Speculative Technique for Auto-Memoization Processor with Multithreading
A Speculative Technique for Auto-Memoization Processor with MultithreadingA Speculative Technique for Auto-Memoization Processor with Multithreading
A Speculative Technique for Auto-Memoization Processor with MultithreadingMatsuo and Tsumura lab.
 
java memory management & gc
java memory management & gcjava memory management & gc
java memory management & gcexsuns
 
Performance tuning jvm
Performance tuning jvmPerformance tuning jvm
Performance tuning jvmPrem Kuppumani
 
Optimizing the Graphics Pipeline with Compute, GDC 2016
Optimizing the Graphics Pipeline with Compute, GDC 2016Optimizing the Graphics Pipeline with Compute, GDC 2016
Optimizing the Graphics Pipeline with Compute, GDC 2016Graham Wihlidal
 
(PFC302) Performance Benchmarking on AWS | AWS re:Invent 2014
(PFC302) Performance Benchmarking on AWS | AWS re:Invent 2014(PFC302) Performance Benchmarking on AWS | AWS re:Invent 2014
(PFC302) Performance Benchmarking on AWS | AWS re:Invent 2014Amazon Web Services
 
Best Practices for Benchmarking and Performance Analysis in the Cloud (ENT305...
Best Practices for Benchmarking and Performance Analysis in the Cloud (ENT305...Best Practices for Benchmarking and Performance Analysis in the Cloud (ENT305...
Best Practices for Benchmarking and Performance Analysis in the Cloud (ENT305...Amazon Web Services
 
Use Ruby GC in full..
Use Ruby GC in full..Use Ruby GC in full..
Use Ruby GC in full..Alex Mercer
 
YOW2020 Linux Systems Performance
YOW2020 Linux Systems PerformanceYOW2020 Linux Systems Performance
YOW2020 Linux Systems PerformanceBrendan Gregg
 
Column store indexes and batch processing mode (nx power lite)
Column store indexes and batch processing mode (nx power lite)Column store indexes and batch processing mode (nx power lite)
Column store indexes and batch processing mode (nx power lite)Chris Adkin
 
Writing Metasploit Plugins
Writing Metasploit PluginsWriting Metasploit Plugins
Writing Metasploit Pluginsamiable_indian
 
Performance Tuning EC2 Instances
Performance Tuning EC2 InstancesPerformance Tuning EC2 Instances
Performance Tuning EC2 InstancesBrendan Gregg
 
Профилирование и оптимизация производительности Ruby-кода
Профилирование и оптимизация производительности Ruby-кодаПрофилирование и оптимизация производительности Ruby-кода
Профилирование и оптимизация производительности Ruby-кодаsamsolutionsby
 
CRAMM: Virtual Memory Support for Garbage-Collected Applications
CRAMM: Virtual Memory Support for Garbage-Collected ApplicationsCRAMM: Virtual Memory Support for Garbage-Collected Applications
CRAMM: Virtual Memory Support for Garbage-Collected ApplicationsEmery Berger
 
Introduction to Java Profiling
Introduction to Java ProfilingIntroduction to Java Profiling
Introduction to Java ProfilingJerry Yoakum
 

Similaire à Short-term Regions (20)

Performance tuning
Performance tuningPerformance tuning
Performance tuning
 
A Speculative Technique for Auto-Memoization Processor with Multithreading
A Speculative Technique for Auto-Memoization Processor with MultithreadingA Speculative Technique for Auto-Memoization Processor with Multithreading
A Speculative Technique for Auto-Memoization Processor with Multithreading
 
java memory management & gc
java memory management & gcjava memory management & gc
java memory management & gc
 
Performance tuning jvm
Performance tuning jvmPerformance tuning jvm
Performance tuning jvm
 
Architect Cheatsheet
Architect CheatsheetArchitect Cheatsheet
Architect Cheatsheet
 
Optimizing the Graphics Pipeline with Compute, GDC 2016
Optimizing the Graphics Pipeline with Compute, GDC 2016Optimizing the Graphics Pipeline with Compute, GDC 2016
Optimizing the Graphics Pipeline with Compute, GDC 2016
 
Deep Dive on Amazon EC2
Deep Dive on Amazon EC2Deep Dive on Amazon EC2
Deep Dive on Amazon EC2
 
(PFC302) Performance Benchmarking on AWS | AWS re:Invent 2014
(PFC302) Performance Benchmarking on AWS | AWS re:Invent 2014(PFC302) Performance Benchmarking on AWS | AWS re:Invent 2014
(PFC302) Performance Benchmarking on AWS | AWS re:Invent 2014
 
Dma
DmaDma
Dma
 
Best Practices for Benchmarking and Performance Analysis in the Cloud (ENT305...
Best Practices for Benchmarking and Performance Analysis in the Cloud (ENT305...Best Practices for Benchmarking and Performance Analysis in the Cloud (ENT305...
Best Practices for Benchmarking and Performance Analysis in the Cloud (ENT305...
 
Use Ruby GC in full..
Use Ruby GC in full..Use Ruby GC in full..
Use Ruby GC in full..
 
YOW2020 Linux Systems Performance
YOW2020 Linux Systems PerformanceYOW2020 Linux Systems Performance
YOW2020 Linux Systems Performance
 
Column store indexes and batch processing mode (nx power lite)
Column store indexes and batch processing mode (nx power lite)Column store indexes and batch processing mode (nx power lite)
Column store indexes and batch processing mode (nx power lite)
 
Writing Metasploit Plugins
Writing Metasploit PluginsWriting Metasploit Plugins
Writing Metasploit Plugins
 
Enhancing the region model of RTSJ
Enhancing the region model of RTSJEnhancing the region model of RTSJ
Enhancing the region model of RTSJ
 
Performance Tuning EC2 Instances
Performance Tuning EC2 InstancesPerformance Tuning EC2 Instances
Performance Tuning EC2 Instances
 
Профилирование и оптимизация производительности Ruby-кода
Профилирование и оптимизация производительности Ruby-кодаПрофилирование и оптимизация производительности Ruby-кода
Профилирование и оптимизация производительности Ruby-кода
 
CRAMM: Virtual Memory Support for Garbage-Collected Applications
CRAMM: Virtual Memory Support for Garbage-Collected ApplicationsCRAMM: Virtual Memory Support for Garbage-Collected Applications
CRAMM: Virtual Memory Support for Garbage-Collected Applications
 
8th semester Computer Science and Information Science Engg (2013 December) Qu...
8th semester Computer Science and Information Science Engg (2013 December) Qu...8th semester Computer Science and Information Science Engg (2013 December) Qu...
8th semester Computer Science and Information Science Engg (2013 December) Qu...
 
Introduction to Java Profiling
Introduction to Java ProfilingIntroduction to Java Profiling
Introduction to Java Profiling
 

Dernier

Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
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 NoSQLScyllaDB
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 

Dernier (20)

Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
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
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 

Short-term Regions

  • 1. Short-term Regions A Region based Short-term Memory Allocator Stephanie Stroka steffueue@gmail.com
  • 2. MEMORY LEAKS DUE TO PROGRAMMING ERRORS
  • 3.
  • 5.
  • 6.
  • 7. void scm malloc ( s i z e t size ) ; void scm ref resh ( void pt r , i n t e x p i r a t i o n ) ; void scm t ick ( ) ;
  • 8.
  • 9. const i n t scm create region ( ) ; void s cm mal loc in region ( s i z e t size , const i n t r e g i d ) ; void scm ref resh region ( const i n t reg id , i n t e x p i r a t i o n ) ; void scm ref resh ( void pt r , i n t e x p i r a t i o n ) ; void scm t ick ( ) ;
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15. Performance gain of STR compared to MALLOC. SINGLE-THREADED AVG 55.47 % MIN 51.97 % MAX 58.44 % MULTI-THREADED AVG 65.47 % MIN 52.94 % MAX 70.11 %
  • 16. Performance gain of STR compared to STM. SINGLE-THREADED AVG 79.60 % MIN 78.80 % MAX 80.39 % MULTI-THREADED AVG 87.26 % MIN 75.51 % MAX 95.20 %
  • 17. 1e+06 100000 10000 1000 Memory Consumption - sh6bench multi-threaded, nonleaky 0 10000 20000 30000 40000 50000 60000 70000 80000 90000 100000 Memory (bytes, logscale) Allocation Phase MALLOC area MALLOC gross memory STM area STM gross memory STR area STR gross memory STRMC area STRMC gross memory net memory
  • 18. 1e+07 1e+06 100000 10000 1000 Memory Consumption - sh6bench multi-threaded, leaky 0 10000 20000 30000 40000 50000 60000 70000 80000 90000 100000 Memory (bytes, logscale) Allocation Phase MALLOC_LEAK area MALLOC_LEAK gross memory STM_LEAK area STM_LEAK gross memory STR_LEAK area STR_LEAK gross memory STRMC_LEAK area STRMC_LEAK gross memory net memory
  • 19. 1e+07 The percentage of unused (allocated, but not needed) memory 1e+06 100000 10000 1000 Memory Consumption - sh6bench multi-threaded, leaky 0 10000 20000 30000 40000 50000 60000 70000 80000 90000 100000 Memory (bytes, logscale) Allocation Phase MALLOC_LEAK area MALLOC_LEAK gross memory STM_LEAK area STM_LEAK gross memory STR_LEAK area STR_LEAK gross memory STRMC_LEAK area STRMC_LEAK gross memory net memory in sh6bench. Fragmentation in % single-threaded multi-threaded MALLOC 1.0700 17.1700 MALLOC LEAK 99.3000 99.3700 STM 26.0100 72.2400 STM LEAK 27.7000 71.0900 STR 37.0000 81.6300 STR LEAK 39.1100 82.6400
  • 20. PERFORMANCE AT A COST OF MEMORY, NO MEMORY LEAKS