SlideShare a Scribd company logo

Overview of FreeBSD PMC Tools

ACM Tech Talk April 2009 by Joseph Koshy - FreeBSD committer

1 of 48
Download to read offline
PmcTools: Whole-system, low-overhead
             performance measurement in FreeBSD

                                   Joseph Koshy

                                   FreeBSD Developer


                                   18 April 2009




Joseph Koshy (FreeBSD Developer)     FreeBSD/PmcTools   18 April 2009   1 / 48
Outline

    Introduction
1
       Introducing PmcTools
    PmcTools
2
      Architectural Overview
      API
      Design Issues
      Profiling
      Implementation
    Status & Future Work
3
      Status
      Future Projects
      Research Topics
    Conclusion
4


Joseph Koshy (FreeBSD Developer)   FreeBSD/PmcTools   18 April 2009   2 / 48
Introduction


Goals Of This Talk




      Introduce FreeBSD/PmcTools.
      Introduce BSD culture.




Joseph Koshy (FreeBSD Developer)       FreeBSD/PmcTools   18 April 2009   3 / 48
Introduction


About FreeBSD




      http://www.freebsd.org/
      Popular among appliance makers, ISPs, web hosting providers:
              Fast, stable, high-quality code, liberal license.
      FreeBSD culture in one sentence: “Shut up and code”.


Joseph Koshy (FreeBSD Developer)       FreeBSD/PmcTools           18 April 2009   4 / 48
Introduction


About jkoshy@FreeBSD.org




      FreeBSD developer since 1998.
      Technical interests:
              Performance analysis; the design of high performance software.
              Low power computing.
              Higher order, typed languages.
              Writing clean, well-designed code.




Joseph Koshy (FreeBSD Developer)       FreeBSD/PmcTools           18 April 2009   5 / 48
Introduction


The Three Big Questions in Performance Analysis




      What is the system doing?
  1


      Where in the code does the behaviour arise?
  2


      What is to be done about it?
  3




Joseph Koshy (FreeBSD Developer)       FreeBSD/PmcTools   18 April 2009   6 / 48
Ad

Recommended

Linux Profiling at Netflix
Linux Profiling at NetflixLinux Profiling at Netflix
Linux Profiling at NetflixBrendan Gregg
 
Linux Performance Analysis: New Tools and Old Secrets
Linux Performance Analysis: New Tools and Old SecretsLinux Performance Analysis: New Tools and Old Secrets
Linux Performance Analysis: New Tools and Old SecretsBrendan Gregg
 
TIP1 - Overview of C/C++ Debugging/Tracing/Profiling Tools
TIP1 - Overview of C/C++ Debugging/Tracing/Profiling ToolsTIP1 - Overview of C/C++ Debugging/Tracing/Profiling Tools
TIP1 - Overview of C/C++ Debugging/Tracing/Profiling ToolsXiaozhe Wang
 
Berkeley Packet Filters
Berkeley Packet FiltersBerkeley Packet Filters
Berkeley Packet FiltersKernel TLV
 
BPF: Tracing and more
BPF: Tracing and moreBPF: Tracing and more
BPF: Tracing and moreBrendan Gregg
 
Container Performance Analysis
Container Performance AnalysisContainer Performance Analysis
Container Performance AnalysisBrendan Gregg
 

More Related Content

What's hot

Linux 4.x Tracing Tools: Using BPF Superpowers
Linux 4.x Tracing Tools: Using BPF SuperpowersLinux 4.x Tracing Tools: Using BPF Superpowers
Linux 4.x Tracing Tools: Using BPF SuperpowersBrendan Gregg
 
Java Performance Analysis on Linux with Flame Graphs
Java Performance Analysis on Linux with Flame GraphsJava Performance Analysis on Linux with Flame Graphs
Java Performance Analysis on Linux with Flame GraphsBrendan Gregg
 
JavaOne 2015 Java Mixed-Mode Flame Graphs
JavaOne 2015 Java Mixed-Mode Flame GraphsJavaOne 2015 Java Mixed-Mode Flame Graphs
JavaOne 2015 Java Mixed-Mode Flame GraphsBrendan Gregg
 
Performance Analysis Tools for Linux Kernel
Performance Analysis Tools for Linux KernelPerformance Analysis Tools for Linux Kernel
Performance Analysis Tools for Linux Kernellcplcp1
 
eBPF Trace from Kernel to Userspace
eBPF Trace from Kernel to UserspaceeBPF Trace from Kernel to Userspace
eBPF Trace from Kernel to UserspaceSUSE Labs Taipei
 
BPF - in-kernel virtual machine
BPF - in-kernel virtual machineBPF - in-kernel virtual machine
BPF - in-kernel virtual machineAlexei Starovoitov
 
Broken Linux Performance Tools 2016
Broken Linux Performance Tools 2016Broken Linux Performance Tools 2016
Broken Linux Performance Tools 2016Brendan Gregg
 
USENIX ATC 2017: Visualizing Performance with Flame Graphs
USENIX ATC 2017: Visualizing Performance with Flame GraphsUSENIX ATC 2017: Visualizing Performance with Flame Graphs
USENIX ATC 2017: Visualizing Performance with Flame GraphsBrendan Gregg
 
Stateless Hypervisors at Scale
Stateless Hypervisors at ScaleStateless Hypervisors at Scale
Stateless Hypervisors at ScaleAntony Messerl
 
The Next Linux Superpower: eBPF Primer
The Next Linux Superpower: eBPF PrimerThe Next Linux Superpower: eBPF Primer
The Next Linux Superpower: eBPF PrimerSasha Goldshtein
 
DTrace Topics: Introduction
DTrace Topics: IntroductionDTrace Topics: Introduction
DTrace Topics: IntroductionBrendan Gregg
 
MeetBSD2014 Performance Analysis
MeetBSD2014 Performance AnalysisMeetBSD2014 Performance Analysis
MeetBSD2014 Performance AnalysisBrendan Gregg
 
Modern Linux Tracing Landscape
Modern Linux Tracing LandscapeModern Linux Tracing Landscape
Modern Linux Tracing LandscapeSasha Goldshtein
 
Designing Tracing Tools
Designing Tracing ToolsDesigning Tracing Tools
Designing Tracing ToolsBrendan Gregg
 
Kernel Recipes 2017: Using Linux perf at Netflix
Kernel Recipes 2017: Using Linux perf at NetflixKernel Recipes 2017: Using Linux perf at Netflix
Kernel Recipes 2017: Using Linux perf at NetflixBrendan Gregg
 
YOW2021 Computing Performance
YOW2021 Computing PerformanceYOW2021 Computing Performance
YOW2021 Computing PerformanceBrendan Gregg
 
Linux Performance Profiling and Monitoring
Linux Performance Profiling and MonitoringLinux Performance Profiling and Monitoring
Linux Performance Profiling and MonitoringGeorg Schönberger
 
Netflix: From Clouds to Roots
Netflix: From Clouds to RootsNetflix: From Clouds to Roots
Netflix: From Clouds to RootsBrendan Gregg
 
Tracing MariaDB server with bpftrace - MariaDB Server Fest 2021
Tracing MariaDB server with bpftrace - MariaDB Server Fest 2021Tracing MariaDB server with bpftrace - MariaDB Server Fest 2021
Tracing MariaDB server with bpftrace - MariaDB Server Fest 2021Valeriy Kravchuk
 
Linux Performance Tools
Linux Performance ToolsLinux Performance Tools
Linux Performance ToolsBrendan Gregg
 

What's hot (20)

Linux 4.x Tracing Tools: Using BPF Superpowers
Linux 4.x Tracing Tools: Using BPF SuperpowersLinux 4.x Tracing Tools: Using BPF Superpowers
Linux 4.x Tracing Tools: Using BPF Superpowers
 
Java Performance Analysis on Linux with Flame Graphs
Java Performance Analysis on Linux with Flame GraphsJava Performance Analysis on Linux with Flame Graphs
Java Performance Analysis on Linux with Flame Graphs
 
JavaOne 2015 Java Mixed-Mode Flame Graphs
JavaOne 2015 Java Mixed-Mode Flame GraphsJavaOne 2015 Java Mixed-Mode Flame Graphs
JavaOne 2015 Java Mixed-Mode Flame Graphs
 
Performance Analysis Tools for Linux Kernel
Performance Analysis Tools for Linux KernelPerformance Analysis Tools for Linux Kernel
Performance Analysis Tools for Linux Kernel
 
eBPF Trace from Kernel to Userspace
eBPF Trace from Kernel to UserspaceeBPF Trace from Kernel to Userspace
eBPF Trace from Kernel to Userspace
 
BPF - in-kernel virtual machine
BPF - in-kernel virtual machineBPF - in-kernel virtual machine
BPF - in-kernel virtual machine
 
Broken Linux Performance Tools 2016
Broken Linux Performance Tools 2016Broken Linux Performance Tools 2016
Broken Linux Performance Tools 2016
 
USENIX ATC 2017: Visualizing Performance with Flame Graphs
USENIX ATC 2017: Visualizing Performance with Flame GraphsUSENIX ATC 2017: Visualizing Performance with Flame Graphs
USENIX ATC 2017: Visualizing Performance with Flame Graphs
 
Stateless Hypervisors at Scale
Stateless Hypervisors at ScaleStateless Hypervisors at Scale
Stateless Hypervisors at Scale
 
The Next Linux Superpower: eBPF Primer
The Next Linux Superpower: eBPF PrimerThe Next Linux Superpower: eBPF Primer
The Next Linux Superpower: eBPF Primer
 
DTrace Topics: Introduction
DTrace Topics: IntroductionDTrace Topics: Introduction
DTrace Topics: Introduction
 
MeetBSD2014 Performance Analysis
MeetBSD2014 Performance AnalysisMeetBSD2014 Performance Analysis
MeetBSD2014 Performance Analysis
 
Modern Linux Tracing Landscape
Modern Linux Tracing LandscapeModern Linux Tracing Landscape
Modern Linux Tracing Landscape
 
Designing Tracing Tools
Designing Tracing ToolsDesigning Tracing Tools
Designing Tracing Tools
 
Kernel Recipes 2017: Using Linux perf at Netflix
Kernel Recipes 2017: Using Linux perf at NetflixKernel Recipes 2017: Using Linux perf at Netflix
Kernel Recipes 2017: Using Linux perf at Netflix
 
YOW2021 Computing Performance
YOW2021 Computing PerformanceYOW2021 Computing Performance
YOW2021 Computing Performance
 
Linux Performance Profiling and Monitoring
Linux Performance Profiling and MonitoringLinux Performance Profiling and Monitoring
Linux Performance Profiling and Monitoring
 
Netflix: From Clouds to Roots
Netflix: From Clouds to RootsNetflix: From Clouds to Roots
Netflix: From Clouds to Roots
 
Tracing MariaDB server with bpftrace - MariaDB Server Fest 2021
Tracing MariaDB server with bpftrace - MariaDB Server Fest 2021Tracing MariaDB server with bpftrace - MariaDB Server Fest 2021
Tracing MariaDB server with bpftrace - MariaDB Server Fest 2021
 
Linux Performance Tools
Linux Performance ToolsLinux Performance Tools
Linux Performance Tools
 

Viewers also liked

MECHANICAL & THERMAL PROPERTIES OF NANO COMPOSITES
MECHANICAL & THERMAL PROPERTIES OF NANO COMPOSITESMECHANICAL & THERMAL PROPERTIES OF NANO COMPOSITES
MECHANICAL & THERMAL PROPERTIES OF NANO COMPOSITESArjun K Gopi
 
Blazing Performance with Flame Graphs
Blazing Performance with Flame GraphsBlazing Performance with Flame Graphs
Blazing Performance with Flame GraphsBrendan Gregg
 
Linux Systems Performance 2016
Linux Systems Performance 2016Linux Systems Performance 2016
Linux Systems Performance 2016Brendan Gregg
 
Securing Wireless Cellular Systems
Securing Wireless Cellular SystemsSecuring Wireless Cellular Systems
Securing Wireless Cellular SystemsACMBangalore
 
Linux Performance Analysis and Tools
Linux Performance Analysis and ToolsLinux Performance Analysis and Tools
Linux Performance Analysis and ToolsBrendan Gregg
 

Viewers also liked (6)

MECHANICAL & THERMAL PROPERTIES OF NANO COMPOSITES
MECHANICAL & THERMAL PROPERTIES OF NANO COMPOSITESMECHANICAL & THERMAL PROPERTIES OF NANO COMPOSITES
MECHANICAL & THERMAL PROPERTIES OF NANO COMPOSITES
 
Ch15
Ch15Ch15
Ch15
 
Blazing Performance with Flame Graphs
Blazing Performance with Flame GraphsBlazing Performance with Flame Graphs
Blazing Performance with Flame Graphs
 
Linux Systems Performance 2016
Linux Systems Performance 2016Linux Systems Performance 2016
Linux Systems Performance 2016
 
Securing Wireless Cellular Systems
Securing Wireless Cellular SystemsSecuring Wireless Cellular Systems
Securing Wireless Cellular Systems
 
Linux Performance Analysis and Tools
Linux Performance Analysis and ToolsLinux Performance Analysis and Tools
Linux Performance Analysis and Tools
 

Similar to Overview of FreeBSD PMC Tools

PmcTools: Whole-System, Low-Overhead Performance Measurement in FreeBSD
PmcTools: Whole-System, Low-Overhead Performance Measurement in FreeBSDPmcTools: Whole-System, Low-Overhead Performance Measurement in FreeBSD
PmcTools: Whole-System, Low-Overhead Performance Measurement in FreeBSDjkoshy
 
Creating an Embedded System Lab
Creating an Embedded System LabCreating an Embedded System Lab
Creating an Embedded System LabNonamepro
 
Introduction of eBPF - 時下最夯的Linux Technology
Introduction of eBPF - 時下最夯的Linux Technology Introduction of eBPF - 時下最夯的Linux Technology
Introduction of eBPF - 時下最夯的Linux Technology Jace Liang
 
”Bare-Metal Container" presented at HPCC2016
”Bare-Metal Container" presented at HPCC2016”Bare-Metal Container" presented at HPCC2016
”Bare-Metal Container" presented at HPCC2016Kuniyasu Suzaki
 
Persistent Memory Development Kit (PMDK): State of the Project
Persistent Memory Development Kit (PMDK): State of the ProjectPersistent Memory Development Kit (PMDK): State of the Project
Persistent Memory Development Kit (PMDK): State of the ProjectIntel® Software
 
ERTS 2008 - Using Linux for industrial projects
ERTS 2008 - Using Linux for industrial projectsERTS 2008 - Using Linux for industrial projects
ERTS 2008 - Using Linux for industrial projectsChristian Charreyre
 
Linux rumpkernel - ABC2018 (AsiaBSDCon 2018)
Linux rumpkernel - ABC2018 (AsiaBSDCon 2018)Linux rumpkernel - ABC2018 (AsiaBSDCon 2018)
Linux rumpkernel - ABC2018 (AsiaBSDCon 2018)Hajime Tazaki
 
Instalando Cacti no CentOS 5
Instalando Cacti no CentOS 5Instalando Cacti no CentOS 5
Instalando Cacti no CentOS 5Carlos Eduardo
 
pythonOCC PDE2009 presentation
pythonOCC PDE2009 presentationpythonOCC PDE2009 presentation
pythonOCC PDE2009 presentationThomas Paviot
 
Inria Tech Talk : RIOT, l'OS libre pour vos objets connectés #IoT
Inria Tech Talk : RIOT, l'OS libre pour vos objets connectés #IoTInria Tech Talk : RIOT, l'OS libre pour vos objets connectés #IoT
Inria Tech Talk : RIOT, l'OS libre pour vos objets connectés #IoTStéphanie Roger
 
Embedded Os [Linux & Co.]
Embedded Os [Linux & Co.]Embedded Os [Linux & Co.]
Embedded Os [Linux & Co.]Ionela
 
The Yocto Project
The Yocto ProjectThe Yocto Project
The Yocto Projectrossburton
 
Linux-Based Data Acquisition and Processing On Palmtop Computer
Linux-Based Data Acquisition and Processing On Palmtop ComputerLinux-Based Data Acquisition and Processing On Palmtop Computer
Linux-Based Data Acquisition and Processing On Palmtop ComputerIOSR Journals
 
Linux-Based Data Acquisition and Processing On Palmtop Computer
Linux-Based Data Acquisition and Processing On Palmtop ComputerLinux-Based Data Acquisition and Processing On Palmtop Computer
Linux-Based Data Acquisition and Processing On Palmtop ComputerIOSR Journals
 
From Silicon to Software - IIT Madras
From Silicon to Software - IIT MadrasFrom Silicon to Software - IIT Madras
From Silicon to Software - IIT MadrasAanjhan Ranganathan
 
PyCon2022 - Building Python Extensions
PyCon2022 - Building Python ExtensionsPyCon2022 - Building Python Extensions
PyCon2022 - Building Python ExtensionsHenry Schreiner
 

Similar to Overview of FreeBSD PMC Tools (20)

PmcTools: Whole-System, Low-Overhead Performance Measurement in FreeBSD
PmcTools: Whole-System, Low-Overhead Performance Measurement in FreeBSDPmcTools: Whole-System, Low-Overhead Performance Measurement in FreeBSD
PmcTools: Whole-System, Low-Overhead Performance Measurement in FreeBSD
 
Creating an Embedded System Lab
Creating an Embedded System LabCreating an Embedded System Lab
Creating an Embedded System Lab
 
Introduction of eBPF - 時下最夯的Linux Technology
Introduction of eBPF - 時下最夯的Linux Technology Introduction of eBPF - 時下最夯的Linux Technology
Introduction of eBPF - 時下最夯的Linux Technology
 
”Bare-Metal Container" presented at HPCC2016
”Bare-Metal Container" presented at HPCC2016”Bare-Metal Container" presented at HPCC2016
”Bare-Metal Container" presented at HPCC2016
 
Persistent Memory Development Kit (PMDK): State of the Project
Persistent Memory Development Kit (PMDK): State of the ProjectPersistent Memory Development Kit (PMDK): State of the Project
Persistent Memory Development Kit (PMDK): State of the Project
 
ERTS 2008 - Using Linux for industrial projects
ERTS 2008 - Using Linux for industrial projectsERTS 2008 - Using Linux for industrial projects
ERTS 2008 - Using Linux for industrial projects
 
Multicore
MulticoreMulticore
Multicore
 
Linux rumpkernel - ABC2018 (AsiaBSDCon 2018)
Linux rumpkernel - ABC2018 (AsiaBSDCon 2018)Linux rumpkernel - ABC2018 (AsiaBSDCon 2018)
Linux rumpkernel - ABC2018 (AsiaBSDCon 2018)
 
Instalando Cacti no CentOS 5
Instalando Cacti no CentOS 5Instalando Cacti no CentOS 5
Instalando Cacti no CentOS 5
 
Japan's post K Computer
Japan's post K ComputerJapan's post K Computer
Japan's post K Computer
 
pythonOCC PDE2009 presentation
pythonOCC PDE2009 presentationpythonOCC PDE2009 presentation
pythonOCC PDE2009 presentation
 
Inria Tech Talk : RIOT, l'OS libre pour vos objets connectés #IoT
Inria Tech Talk : RIOT, l'OS libre pour vos objets connectés #IoTInria Tech Talk : RIOT, l'OS libre pour vos objets connectés #IoT
Inria Tech Talk : RIOT, l'OS libre pour vos objets connectés #IoT
 
MULTICS
MULTICSMULTICS
MULTICS
 
Embedded Os [Linux & Co.]
Embedded Os [Linux & Co.]Embedded Os [Linux & Co.]
Embedded Os [Linux & Co.]
 
The Yocto Project
The Yocto ProjectThe Yocto Project
The Yocto Project
 
Rhce ppt
Rhce pptRhce ppt
Rhce ppt
 
Linux-Based Data Acquisition and Processing On Palmtop Computer
Linux-Based Data Acquisition and Processing On Palmtop ComputerLinux-Based Data Acquisition and Processing On Palmtop Computer
Linux-Based Data Acquisition and Processing On Palmtop Computer
 
Linux-Based Data Acquisition and Processing On Palmtop Computer
Linux-Based Data Acquisition and Processing On Palmtop ComputerLinux-Based Data Acquisition and Processing On Palmtop Computer
Linux-Based Data Acquisition and Processing On Palmtop Computer
 
From Silicon to Software - IIT Madras
From Silicon to Software - IIT MadrasFrom Silicon to Software - IIT Madras
From Silicon to Software - IIT Madras
 
PyCon2022 - Building Python Extensions
PyCon2022 - Building Python ExtensionsPyCon2022 - Building Python Extensions
PyCon2022 - Building Python Extensions
 

More from ACMBangalore

The power of abstraction
The power of abstractionThe power of abstraction
The power of abstractionACMBangalore
 
Lesson from Building a Search Engine using the cloud
Lesson from Building a Search Engine using the cloudLesson from Building a Search Engine using the cloud
Lesson from Building a Search Engine using the cloudACMBangalore
 
Automated Design of Digital Microfluids Lab-on-Chip
Automated Design of Digital Microfluids Lab-on-ChipAutomated Design of Digital Microfluids Lab-on-Chip
Automated Design of Digital Microfluids Lab-on-ChipACMBangalore
 
Social Network Analysis (SNA) and its implications for knowledge discovery in...
Social Network Analysis (SNA) and its implications for knowledge discovery in...Social Network Analysis (SNA) and its implications for knowledge discovery in...
Social Network Analysis (SNA) and its implications for knowledge discovery in...ACMBangalore
 
Opening Remarks - Cloud Symposium
Opening Remarks - Cloud SymposiumOpening Remarks - Cloud Symposium
Opening Remarks - Cloud SymposiumACMBangalore
 
Clouds in emerging markets
Clouds in emerging marketsClouds in emerging markets
Clouds in emerging marketsACMBangalore
 
Opportunites and Challenges in Cloud COmputing
Opportunites and Challenges in Cloud COmputingOpportunites and Challenges in Cloud COmputing
Opportunites and Challenges in Cloud COmputingACMBangalore
 
Perspectives on Cloud COmputing - Google
Perspectives on Cloud COmputing - GooglePerspectives on Cloud COmputing - Google
Perspectives on Cloud COmputing - GoogleACMBangalore
 
Making of a Successful Cloud Business
Making of a Successful Cloud BusinessMaking of a Successful Cloud Business
Making of a Successful Cloud BusinessACMBangalore
 
Web Business Platforms on the Cloud
Web Business Platforms on the CloudWeb Business Platforms on the Cloud
Web Business Platforms on the CloudACMBangalore
 
Badrinath Ramamurthy Cloud Infrastructure
Badrinath Ramamurthy   Cloud InfrastructureBadrinath Ramamurthy   Cloud Infrastructure
Badrinath Ramamurthy Cloud InfrastructureACMBangalore
 
market oriented cloud
market oriented cloudmarket oriented cloud
market oriented cloudACMBangalore
 
Case study - SaaS Abs Experience Jan07 09
Case study - SaaS Abs Experience Jan07 09Case study - SaaS Abs Experience Jan07 09
Case study - SaaS Abs Experience Jan07 09ACMBangalore
 
cloud - internet rengineering
cloud - internet rengineeringcloud - internet rengineering
cloud - internet rengineeringACMBangalore
 
virtualization tutorial at ACM bangalore Compute 2009
virtualization tutorial at ACM bangalore Compute 2009virtualization tutorial at ACM bangalore Compute 2009
virtualization tutorial at ACM bangalore Compute 2009ACMBangalore
 
ACM Bangalore Distinguished Speaker Program
ACM Bangalore Distinguished Speaker ProgramACM Bangalore Distinguished Speaker Program
ACM Bangalore Distinguished Speaker ProgramACMBangalore
 

More from ACMBangalore (16)

The power of abstraction
The power of abstractionThe power of abstraction
The power of abstraction
 
Lesson from Building a Search Engine using the cloud
Lesson from Building a Search Engine using the cloudLesson from Building a Search Engine using the cloud
Lesson from Building a Search Engine using the cloud
 
Automated Design of Digital Microfluids Lab-on-Chip
Automated Design of Digital Microfluids Lab-on-ChipAutomated Design of Digital Microfluids Lab-on-Chip
Automated Design of Digital Microfluids Lab-on-Chip
 
Social Network Analysis (SNA) and its implications for knowledge discovery in...
Social Network Analysis (SNA) and its implications for knowledge discovery in...Social Network Analysis (SNA) and its implications for knowledge discovery in...
Social Network Analysis (SNA) and its implications for knowledge discovery in...
 
Opening Remarks - Cloud Symposium
Opening Remarks - Cloud SymposiumOpening Remarks - Cloud Symposium
Opening Remarks - Cloud Symposium
 
Clouds in emerging markets
Clouds in emerging marketsClouds in emerging markets
Clouds in emerging markets
 
Opportunites and Challenges in Cloud COmputing
Opportunites and Challenges in Cloud COmputingOpportunites and Challenges in Cloud COmputing
Opportunites and Challenges in Cloud COmputing
 
Perspectives on Cloud COmputing - Google
Perspectives on Cloud COmputing - GooglePerspectives on Cloud COmputing - Google
Perspectives on Cloud COmputing - Google
 
Making of a Successful Cloud Business
Making of a Successful Cloud BusinessMaking of a Successful Cloud Business
Making of a Successful Cloud Business
 
Web Business Platforms on the Cloud
Web Business Platforms on the CloudWeb Business Platforms on the Cloud
Web Business Platforms on the Cloud
 
Badrinath Ramamurthy Cloud Infrastructure
Badrinath Ramamurthy   Cloud InfrastructureBadrinath Ramamurthy   Cloud Infrastructure
Badrinath Ramamurthy Cloud Infrastructure
 
market oriented cloud
market oriented cloudmarket oriented cloud
market oriented cloud
 
Case study - SaaS Abs Experience Jan07 09
Case study - SaaS Abs Experience Jan07 09Case study - SaaS Abs Experience Jan07 09
Case study - SaaS Abs Experience Jan07 09
 
cloud - internet rengineering
cloud - internet rengineeringcloud - internet rengineering
cloud - internet rengineering
 
virtualization tutorial at ACM bangalore Compute 2009
virtualization tutorial at ACM bangalore Compute 2009virtualization tutorial at ACM bangalore Compute 2009
virtualization tutorial at ACM bangalore Compute 2009
 
ACM Bangalore Distinguished Speaker Program
ACM Bangalore Distinguished Speaker ProgramACM Bangalore Distinguished Speaker Program
ACM Bangalore Distinguished Speaker Program
 

Recently uploaded

21ST CENTURY LITERACY FROM TRADITIONAL TO MODERN
21ST CENTURY LITERACY FROM TRADITIONAL TO MODERN21ST CENTURY LITERACY FROM TRADITIONAL TO MODERN
21ST CENTURY LITERACY FROM TRADITIONAL TO MODERNRonnelBaroc
 
"The Transformative Power of AI and Open Challenges" by Dr. Manish Gupta, Google
"The Transformative Power of AI and Open Challenges" by Dr. Manish Gupta, Google"The Transformative Power of AI and Open Challenges" by Dr. Manish Gupta, Google
"The Transformative Power of AI and Open Challenges" by Dr. Manish Gupta, GoogleISPMAIndia
 
IT Nation Evolve event 2024 - Quarter 1
IT Nation Evolve event 2024  - Quarter 1IT Nation Evolve event 2024  - Quarter 1
IT Nation Evolve event 2024 - Quarter 1Inbay UK
 
Progress Report: Ministry of IT under Dr. Umar Saif Aug 23-Feb'24
Progress Report: Ministry of IT under Dr. Umar Saif Aug 23-Feb'24Progress Report: Ministry of IT under Dr. Umar Saif Aug 23-Feb'24
Progress Report: Ministry of IT under Dr. Umar Saif Aug 23-Feb'24Umar Saif
 
Dev Dives: Leverage APIs and Gen AI to power automations for RPA and software...
Dev Dives: Leverage APIs and Gen AI to power automations for RPA and software...Dev Dives: Leverage APIs and Gen AI to power automations for RPA and software...
Dev Dives: Leverage APIs and Gen AI to power automations for RPA and software...UiPathCommunity
 
Battle of React State Managers in frontend applications
Battle of React State Managers in frontend applicationsBattle of React State Managers in frontend applications
Battle of React State Managers in frontend applicationsEvangelia Mitsopoulou
 
Campotel: Telecommunications Infra and Network Builder - Company Profile
Campotel: Telecommunications Infra and Network Builder - Company ProfileCampotel: Telecommunications Infra and Network Builder - Company Profile
Campotel: Telecommunications Infra and Network Builder - Company ProfileCampotelPhilippines
 
Digital Transformation Strategy & Plan Templates - www.beyondthecloud.digital...
Digital Transformation Strategy & Plan Templates - www.beyondthecloud.digital...Digital Transformation Strategy & Plan Templates - www.beyondthecloud.digital...
Digital Transformation Strategy & Plan Templates - www.beyondthecloud.digital...MarcovanHurne2
 
Act Like an Owner, Challenge Like a VC by former CPO, Tripadvisor
Act Like an Owner,  Challenge Like a VC by former CPO, TripadvisorAct Like an Owner,  Challenge Like a VC by former CPO, Tripadvisor
Act Like an Owner, Challenge Like a VC by former CPO, TripadvisorProduct School
 
"How we created an SRE team in Temabit as a part of FOZZY Group in conditions...
"How we created an SRE team in Temabit as a part of FOZZY Group in conditions..."How we created an SRE team in Temabit as a part of FOZZY Group in conditions...
"How we created an SRE team in Temabit as a part of FOZZY Group in conditions...Fwdays
 
Bit N Build Poland
Bit N Build PolandBit N Build Poland
Bit N Build PolandGDSC PJATK
 
The Art of the Possible with Graph by Dr Jim Webber Neo4j.pptx
The Art of the Possible with Graph by Dr Jim Webber Neo4j.pptxThe Art of the Possible with Graph by Dr Jim Webber Neo4j.pptx
The Art of the Possible with Graph by Dr Jim Webber Neo4j.pptxNeo4j
 
Harnessing the Power of GenAI for Exceptional Product Outcomes by Booking.com...
Harnessing the Power of GenAI for Exceptional Product Outcomes by Booking.com...Harnessing the Power of GenAI for Exceptional Product Outcomes by Booking.com...
Harnessing the Power of GenAI for Exceptional Product Outcomes by Booking.com...Product School
 
Enterprise Architecture As Strategy - Book Review
Enterprise Architecture As Strategy - Book ReviewEnterprise Architecture As Strategy - Book Review
Enterprise Architecture As Strategy - Book ReviewAshraf Fouad
 
How AI and ChatGPT are changing cybersecurity forever.pptx
How AI and ChatGPT are changing cybersecurity forever.pptxHow AI and ChatGPT are changing cybersecurity forever.pptx
How AI and ChatGPT are changing cybersecurity forever.pptxInfosec
 
Enhancing Productivity and Insight A Tour of JDK Tools Progress Beyond Java 17
Enhancing Productivity and Insight  A Tour of JDK Tools Progress Beyond Java 17Enhancing Productivity and Insight  A Tour of JDK Tools Progress Beyond Java 17
Enhancing Productivity and Insight A Tour of JDK Tools Progress Beyond Java 17Ana-Maria Mihalceanu
 
HBR SERIES METAL HOUSED RESISTORS POWER ELECTRICAL ABSORBS HIGH CURRENT DURIN...
HBR SERIES METAL HOUSED RESISTORS POWER ELECTRICAL ABSORBS HIGH CURRENT DURIN...HBR SERIES METAL HOUSED RESISTORS POWER ELECTRICAL ABSORBS HIGH CURRENT DURIN...
HBR SERIES METAL HOUSED RESISTORS POWER ELECTRICAL ABSORBS HIGH CURRENT DURIN...htrindia
 
Avoiding Bad Stats and the Benefits of Playing Trivia with Friends: PancakesC...
Avoiding Bad Stats and the Benefits of Playing Trivia with Friends: PancakesC...Avoiding Bad Stats and the Benefits of Playing Trivia with Friends: PancakesC...
Avoiding Bad Stats and the Benefits of Playing Trivia with Friends: PancakesC...Adrian Sanabria
 
"Testing of Helm Charts or There and Back Again", Yura Rochniak
"Testing of Helm Charts or There and Back Again", Yura Rochniak"Testing of Helm Charts or There and Back Again", Yura Rochniak
"Testing of Helm Charts or There and Back Again", Yura RochniakFwdays
 

Recently uploaded (20)

21ST CENTURY LITERACY FROM TRADITIONAL TO MODERN
21ST CENTURY LITERACY FROM TRADITIONAL TO MODERN21ST CENTURY LITERACY FROM TRADITIONAL TO MODERN
21ST CENTURY LITERACY FROM TRADITIONAL TO MODERN
 
"The Transformative Power of AI and Open Challenges" by Dr. Manish Gupta, Google
"The Transformative Power of AI and Open Challenges" by Dr. Manish Gupta, Google"The Transformative Power of AI and Open Challenges" by Dr. Manish Gupta, Google
"The Transformative Power of AI and Open Challenges" by Dr. Manish Gupta, Google
 
IT Nation Evolve event 2024 - Quarter 1
IT Nation Evolve event 2024  - Quarter 1IT Nation Evolve event 2024  - Quarter 1
IT Nation Evolve event 2024 - Quarter 1
 
Progress Report: Ministry of IT under Dr. Umar Saif Aug 23-Feb'24
Progress Report: Ministry of IT under Dr. Umar Saif Aug 23-Feb'24Progress Report: Ministry of IT under Dr. Umar Saif Aug 23-Feb'24
Progress Report: Ministry of IT under Dr. Umar Saif Aug 23-Feb'24
 
In sharing we trust. Taking advantage of a diverse consortium to build a tran...
In sharing we trust. Taking advantage of a diverse consortium to build a tran...In sharing we trust. Taking advantage of a diverse consortium to build a tran...
In sharing we trust. Taking advantage of a diverse consortium to build a tran...
 
Dev Dives: Leverage APIs and Gen AI to power automations for RPA and software...
Dev Dives: Leverage APIs and Gen AI to power automations for RPA and software...Dev Dives: Leverage APIs and Gen AI to power automations for RPA and software...
Dev Dives: Leverage APIs and Gen AI to power automations for RPA and software...
 
Battle of React State Managers in frontend applications
Battle of React State Managers in frontend applicationsBattle of React State Managers in frontend applications
Battle of React State Managers in frontend applications
 
Campotel: Telecommunications Infra and Network Builder - Company Profile
Campotel: Telecommunications Infra and Network Builder - Company ProfileCampotel: Telecommunications Infra and Network Builder - Company Profile
Campotel: Telecommunications Infra and Network Builder - Company Profile
 
Digital Transformation Strategy & Plan Templates - www.beyondthecloud.digital...
Digital Transformation Strategy & Plan Templates - www.beyondthecloud.digital...Digital Transformation Strategy & Plan Templates - www.beyondthecloud.digital...
Digital Transformation Strategy & Plan Templates - www.beyondthecloud.digital...
 
Act Like an Owner, Challenge Like a VC by former CPO, Tripadvisor
Act Like an Owner,  Challenge Like a VC by former CPO, TripadvisorAct Like an Owner,  Challenge Like a VC by former CPO, Tripadvisor
Act Like an Owner, Challenge Like a VC by former CPO, Tripadvisor
 
"How we created an SRE team in Temabit as a part of FOZZY Group in conditions...
"How we created an SRE team in Temabit as a part of FOZZY Group in conditions..."How we created an SRE team in Temabit as a part of FOZZY Group in conditions...
"How we created an SRE team in Temabit as a part of FOZZY Group in conditions...
 
Bit N Build Poland
Bit N Build PolandBit N Build Poland
Bit N Build Poland
 
The Art of the Possible with Graph by Dr Jim Webber Neo4j.pptx
The Art of the Possible with Graph by Dr Jim Webber Neo4j.pptxThe Art of the Possible with Graph by Dr Jim Webber Neo4j.pptx
The Art of the Possible with Graph by Dr Jim Webber Neo4j.pptx
 
Harnessing the Power of GenAI for Exceptional Product Outcomes by Booking.com...
Harnessing the Power of GenAI for Exceptional Product Outcomes by Booking.com...Harnessing the Power of GenAI for Exceptional Product Outcomes by Booking.com...
Harnessing the Power of GenAI for Exceptional Product Outcomes by Booking.com...
 
Enterprise Architecture As Strategy - Book Review
Enterprise Architecture As Strategy - Book ReviewEnterprise Architecture As Strategy - Book Review
Enterprise Architecture As Strategy - Book Review
 
How AI and ChatGPT are changing cybersecurity forever.pptx
How AI and ChatGPT are changing cybersecurity forever.pptxHow AI and ChatGPT are changing cybersecurity forever.pptx
How AI and ChatGPT are changing cybersecurity forever.pptx
 
Enhancing Productivity and Insight A Tour of JDK Tools Progress Beyond Java 17
Enhancing Productivity and Insight  A Tour of JDK Tools Progress Beyond Java 17Enhancing Productivity and Insight  A Tour of JDK Tools Progress Beyond Java 17
Enhancing Productivity and Insight A Tour of JDK Tools Progress Beyond Java 17
 
HBR SERIES METAL HOUSED RESISTORS POWER ELECTRICAL ABSORBS HIGH CURRENT DURIN...
HBR SERIES METAL HOUSED RESISTORS POWER ELECTRICAL ABSORBS HIGH CURRENT DURIN...HBR SERIES METAL HOUSED RESISTORS POWER ELECTRICAL ABSORBS HIGH CURRENT DURIN...
HBR SERIES METAL HOUSED RESISTORS POWER ELECTRICAL ABSORBS HIGH CURRENT DURIN...
 
Avoiding Bad Stats and the Benefits of Playing Trivia with Friends: PancakesC...
Avoiding Bad Stats and the Benefits of Playing Trivia with Friends: PancakesC...Avoiding Bad Stats and the Benefits of Playing Trivia with Friends: PancakesC...
Avoiding Bad Stats and the Benefits of Playing Trivia with Friends: PancakesC...
 
"Testing of Helm Charts or There and Back Again", Yura Rochniak
"Testing of Helm Charts or There and Back Again", Yura Rochniak"Testing of Helm Charts or There and Back Again", Yura Rochniak
"Testing of Helm Charts or There and Back Again", Yura Rochniak
 

Overview of FreeBSD PMC Tools

  • 1. PmcTools: Whole-system, low-overhead performance measurement in FreeBSD Joseph Koshy FreeBSD Developer 18 April 2009 Joseph Koshy (FreeBSD Developer) FreeBSD/PmcTools 18 April 2009 1 / 48
  • 2. Outline Introduction 1 Introducing PmcTools PmcTools 2 Architectural Overview API Design Issues Profiling Implementation Status & Future Work 3 Status Future Projects Research Topics Conclusion 4 Joseph Koshy (FreeBSD Developer) FreeBSD/PmcTools 18 April 2009 2 / 48
  • 3. Introduction Goals Of This Talk Introduce FreeBSD/PmcTools. Introduce BSD culture. Joseph Koshy (FreeBSD Developer) FreeBSD/PmcTools 18 April 2009 3 / 48
  • 4. Introduction About FreeBSD http://www.freebsd.org/ Popular among appliance makers, ISPs, web hosting providers: Fast, stable, high-quality code, liberal license. FreeBSD culture in one sentence: “Shut up and code”. Joseph Koshy (FreeBSD Developer) FreeBSD/PmcTools 18 April 2009 4 / 48
  • 5. Introduction About jkoshy@FreeBSD.org FreeBSD developer since 1998. Technical interests: Performance analysis; the design of high performance software. Low power computing. Higher order, typed languages. Writing clean, well-designed code. Joseph Koshy (FreeBSD Developer) FreeBSD/PmcTools 18 April 2009 5 / 48
  • 6. Introduction The Three Big Questions in Performance Analysis What is the system doing? 1 Where in the code does the behaviour arise? 2 What is to be done about it? 3 Joseph Koshy (FreeBSD Developer) FreeBSD/PmcTools 18 April 2009 6 / 48
  • 7. Introduction Question 1: What is the system doing? System behaviour: Traditional UNIX tools: vmstat, iostat, top, systat, ktrace, truss. Counters under the sysctl hierarchy. Compile time options such as LOCK PROFILING. New tools like dtrace. Machine behaviour: Modern CPUs have in-CPU hardware counters measuring hardware behaviour: bus utilization, cache operations, instructions decoded and executed, branch behaviour, floating point and vector operations, speculative execution, . . . Near zero overheads, good precision. Joseph Koshy (FreeBSD Developer) FreeBSD/PmcTools 18 April 2009 7 / 48
  • 8. Introduction Question 2: Which portion of the system is responsible? Which subsystems are involved? Where specifically in the code is the problem arising? System performance is a “global” property. “Local” inspection of code not always sufficient. As a community we are still exploring the domain of performance analysis tools: Which data to collect. Collecting it with low-overheads. Making sense of the information collected. Joseph Koshy (FreeBSD Developer) FreeBSD/PmcTools 18 April 2009 8 / 48
  • 9. Introduction Introducing PmcTools Introduction 1 Introducing PmcTools PmcTools 2 Architectural Overview API Design Issues Profiling Implementation Status & Future Work 3 Status Future Projects Research Topics Conclusion 4 Joseph Koshy (FreeBSD Developer) FreeBSD/PmcTools 18 April 2009 9 / 48
  • 10. Introduction Introducing PmcTools PmcTools Project Goals Low−overheads Whole−system Measurements FreeBSD Tier−1 Architectures PmcTools Use in production Have Fun! Platform for Interesting tools Joseph Koshy (FreeBSD Developer) FreeBSD/PmcTools 18 April 2009 10 / 48
  • 11. Introduction Introducing PmcTools Performance Analysis: Conventional vs. PmcTools Description Conventional PmcTools Need special binaries Yes No Dynamically loaded objects No Yes Profiling scope Executable Process & System Need restart Yes No Measurement overheads High Low Profiling tick Time Many options Profile inside critical sections No Yes (x86) Cross-architecture analysis No Yes Distributed profiling No Yes Production use No Yes Joseph Koshy (FreeBSD Developer) FreeBSD/PmcTools 18 April 2009 11 / 48
  • 12. Introduction Introducing PmcTools Related open-source projects Linux Many projects related to PMCs: Oprofile: http://oprofile.sourceforge.net/ Perfmon: http://perfmon2.sourceforge.net/ Perfctr: http://sourceforge.net/projects/perfctr/ Rabbit: http://www.scl.ameslab.gov/Projects/Rabbit/ Solaris CPC(3) library. NetBSD A pmc(3) API. Joseph Koshy (FreeBSD Developer) FreeBSD/PmcTools 18 April 2009 12 / 48
  • 13. PmcTools Architectural Overview Introduction 1 Introducing PmcTools PmcTools 2 Architectural Overview API Design Issues Profiling Implementation Status & Future Work 3 Status Future Projects Research Topics Conclusion 4 Joseph Koshy (FreeBSD Developer) FreeBSD/PmcTools 18 April 2009 13 / 48
  • 14. PmcTools Architectural Overview Overview: Architecture process process process log libpmc hwpmc kernel CPU CPU CPU CPU CPU CPU A platform to build tools that use PMC data. Joseph Koshy (FreeBSD Developer) FreeBSD/PmcTools 18 April 2009 14 / 48
  • 15. PmcTools Architectural Overview Components hwpmc kernel bits kernel changes (see later) libpmc application API pmccontrol management tool pmcstat proof-of-concept application pmcannotate contributed tool etc... others in the future Joseph Koshy (FreeBSD Developer) FreeBSD/PmcTools 18 April 2009 15 / 48
  • 16. PmcTools Architectural Overview PMC Scopes #0 #1 #2 #3 #4 CPU 0 CPU 1 CPU 2 CPU 3 Process−scope PMC System−scope PMC 1 process-scope PMC & 2 system-scope PMCs simultaneously active. Joseph Koshy (FreeBSD Developer) FreeBSD/PmcTools 18 April 2009 16 / 48
  • 17. PmcTools Architectural Overview Counting vs. Sampling Process−scope, System−scope, Counting Counting Process−scope, System−scope, Sampling Sampling Joseph Koshy (FreeBSD Developer) FreeBSD/PmcTools 18 April 2009 17 / 48
  • 18. PmcTools Architectural Overview Using system-scope PMCs process process kernel Three system scope PMCs, on three CPUs. Measure behaviour of the system as a whole. Joseph Koshy (FreeBSD Developer) FreeBSD/PmcTools 18 April 2009 18 / 48
  • 19. PmcTools Architectural Overview Using process-scope PMCs owner target 2: attach 1: allocate kernel A process-scope PMC is allocated & attached to a target process. Entire “row” of PMCs reserved across CPUs. Joseph Koshy (FreeBSD Developer) FreeBSD/PmcTools 18 April 2009 19 / 48
  • 20. PmcTools API Introduction 1 Introducing PmcTools PmcTools 2 Architectural Overview API Design Issues Profiling Implementation Status & Future Work 3 Status Future Projects Research Topics Conclusion 4 Joseph Koshy (FreeBSD Developer) FreeBSD/PmcTools 18 April 2009 20 / 48
  • 21. PmcTools API API Overview Categories: Administration (2). Convenience Functions (8). Initialization (1). Log file handling (3). PMC Management (10). Queries (7). Arch-specific functions (1). 32 functions documented in 15 manual pages. 10 manual pages for supported hardware events. Joseph Koshy (FreeBSD Developer) FreeBSD/PmcTools 18 April 2009 21 / 48
  • 22. PmcTools API Example: API Usage attach allocate start release stop read Allocate a PMC; returns a handle. pmc allocate() Attach a PMC to a target process. pmc attach() Start a PMC. pmc start() Read PMC values. pmc read() Stop a PMC. pmc stop() Release resources. pmc release() Joseph Koshy (FreeBSD Developer) FreeBSD/PmcTools 18 April 2009 22 / 48
  • 23. PmcTools Design Issues Introduction 1 Introducing PmcTools PmcTools 2 Architectural Overview API Design Issues Profiling Implementation Status & Future Work 3 Status Future Projects Research Topics Conclusion 4 Joseph Koshy (FreeBSD Developer) FreeBSD/PmcTools 18 April 2009 23 / 48
  • 24. PmcTools Design Issues PMCs Vary A Lot AMD Athlon XP 4 PMCs, 48 bits wide. AMD Athlon64 4 PMCs, Different set of hardware events. Intel Pentium MMX 2 PMCs. 40 bits wide. Counting only. Intel Pentium Pro 2 PMCs, 40 bits for reads, 32 bits for writes. Intel Pentium IV 18 PMCs shared across logical CPUs. En- tirely different programming model. Intel Core Number of PMCs and widths vary. Has programmable & fixed-function PMCs. Intel Core/i7 As above, but also has per-package PMCs. PMCs are closely tied to CPU micro-architecture. PMC capabilities, supported events, access methods, programming constraints can vary across CPU generations. Joseph Koshy (FreeBSD Developer) FreeBSD/PmcTools 18 April 2009 24 / 48
  • 25. PmcTools Design Issues API Design Issues Issues: Designing an extensible programming interface for application use. Allowing knowledgeable applications to make full use of hardware. PmcTools philosophy: Make simple things easy to do. Make complex things possible. Current “UI” uses name=value pairs: % pmcstat -p k8-bu-fill-request-l2-miss, mask=dc-fill+ic-fill,usr Joseph Koshy (FreeBSD Developer) FreeBSD/PmcTools 18 April 2009 25 / 48
  • 26. PmcTools Profiling Introduction 1 Introducing PmcTools PmcTools 2 Architectural Overview API Design Issues Profiling Implementation Status & Future Work 3 Status Future Projects Research Topics Conclusion 4 Joseph Koshy (FreeBSD Developer) FreeBSD/PmcTools 18 April 2009 26 / 48
  • 27. PmcTools Profiling Conventional Statistical Profiling Needs specially compiled binaries (cc -pg). Sampling runs off the clock tick. Cannot profile inside kernel critical sections. “In-place” record keeping. Call graph is approximated. Joseph Koshy (FreeBSD Developer) FreeBSD/PmcTools 18 April 2009 27 / 48
  • 28. PmcTools Profiling PmcTools’ Statistical Profiling Sets up PMCs to interrupt the CPU on overflow. Uses an NMI to drive sampling (on x86): Can profile inside kernel critical sections. Needs lock-free implementation techniques. Separates record keeping from data collection. Captures the exact callchain at the point of the sample. Joseph Koshy (FreeBSD Developer) FreeBSD/PmcTools 18 April 2009 28 / 48
  • 29. PmcTools Profiling Profiling with NMIs HWPMC(4) hwpmc_hook() machine dependent trap handler trap() low level trap handler log file NMI #0 #1 #2 #3 hwpmc helper hardclock() thread record sample lock−less ring per−owner CPU 0 CPU 1 CPU 2 CPU 3 buffers log buffer Joseph Koshy (FreeBSD Developer) FreeBSD/PmcTools 18 April 2009 29 / 48
  • 30. PmcTools Profiling Profiling Workflow System/application hwpmc(4) logfile under investigation pmcstat pmcstat gprof(1) data gprof gprof(1) output Uses gprof(1) to do user reports (currently): Needs to be redone: gprof(1) limitations. Call chains are captured and used to generate call graphs. Joseph Koshy (FreeBSD Developer) FreeBSD/PmcTools 18 April 2009 30 / 48
  • 31. PmcTools Profiling Profiling of Shared Objects 0 0xFFFFFFFF text data bss heap mmap stack Kernel unmapped rtld command line arguments data data data text text Each executable object in the system gets its own gmon.out file: kernel kernel modules executables shared libraries run time loader Joseph Koshy (FreeBSD Developer) FreeBSD/PmcTools 18 April 2009 31 / 48
  • 32. PmcTools Profiling Remote Profiling log data analysis system under console measurement pmc configure log() takes a file descriptor. Can log to a disk file, a pipe, or to a network socket. Events in log file carry timestamps for disambiguation. Joseph Koshy (FreeBSD Developer) FreeBSD/PmcTools 18 April 2009 32 / 48
  • 33. PmcTools Implementation Introduction 1 Introducing PmcTools PmcTools 2 Architectural Overview API Design Issues Profiling Implementation Status & Future Work 3 Status Future Projects Research Topics Conclusion 4 Joseph Koshy (FreeBSD Developer) FreeBSD/PmcTools 18 April 2009 33 / 48
  • 34. PmcTools Implementation Implementation Information Module Comments 31K LoC, i386&amd64 sys/dev/hwpmc, sys/sys/pmc*.h 3.3K LoC lib/libpmc 5.4K LoC usr.sbin/* documentation 29 manual pages, 11K LoD All public APIs have manual pages. All hardware events, and their modifiers are documented. The internal API between libpmc and hwpmc is also documented. See also: “Beautiful Code Exists, If You Know Where To Look”, CACM, July 2008. Joseph Koshy (FreeBSD Developer) FreeBSD/PmcTools 18 April 2009 34 / 48
  • 35. PmcTools Implementation Impact on Base Kernel Space Requirements 2 bits (P HWPMC, TDP CALLCHAIN). Uses free bits in existing flags words. Kernel Changes Clock handling, kernel linker, MD code, process handling, scheduler, VM (options HWPMC HOOKS). Kernel Callbacks scheduler low−level (assembler) kernel linker trap() hwpmc VM (mmap) exec clock handling Joseph Koshy (FreeBSD Developer) FreeBSD/PmcTools 18 April 2009 35 / 48
  • 36. PmcTools Implementation Portability Application Portability High. Portability of libpmc Moderate. Requires a POSIX-like system. Adding support for new PMC hardware Moderate. Kernel bits Low. Joseph Koshy (FreeBSD Developer) FreeBSD/PmcTools 18 April 2009 36 / 48
  • 37. Status & Future Work Status Introduction 1 Introducing PmcTools PmcTools 2 Architectural Overview API Design Issues Profiling Implementation Status & Future Work 3 Status Future Projects Research Topics Conclusion 4 Joseph Koshy (FreeBSD Developer) FreeBSD/PmcTools 18 April 2009 37 / 48
  • 38. Status & Future Work Status Current State Proof-of-concept application pmcstat is the current “user interface”. Crufty. Low overheads (design goal: 5%) and tunable. In production use. Being shipped on customer boxes by appliance vendors. Support load on the rise (esp. requests for support of new hardware). Joseph Koshy (FreeBSD Developer) FreeBSD/PmcTools 18 April 2009 38 / 48
  • 39. Status & Future Work Status Support load Volunteer project. Initial hardware bought from pocket, or on loan. Current hardware support: 12 combinations of {PMC hardware × 32/64 bit OS variants} × 9 OS versions [FreeBSD 6.0 · · · 6.4, 7.0 · · · 7.2, 8.0] = 108 combinations! Need a hardware lab to manage testing and bug reports. Need an automated test suite that is run continuously. Also useful for detecting OS & application performance regressions early. Email support load is on the rise: Rise in FreeBSD adoption. FreeBSD users and developers worldwide now chipping in with features, bug fixes, offering tutorials and spreading the word. Joseph Koshy (FreeBSD Developer) FreeBSD/PmcTools 18 April 2009 39 / 48
  • 40. Status & Future Work Future Projects Introduction 1 Introducing PmcTools PmcTools 2 Architectural Overview API Design Issues Profiling Implementation Status & Future Work 3 Status Future Projects Research Topics Conclusion 4 Joseph Koshy (FreeBSD Developer) FreeBSD/PmcTools 18 April 2009 40 / 48
  • 41. Status & Future Work Future Projects Profiling the Cloud traffic Control/Data Analysis Console Joseph Koshy (FreeBSD Developer) FreeBSD/PmcTools 18 April 2009 41 / 48
  • 42. Status & Future Work Future Projects Other project ideas A graphical visualizer “console”. Enhance gprof, or write a report generator afresh. Link up with existing profile based optimization frameworks. Allow performance analysis of non-native architectures. Support non-x86 PMCs. Integrate PmcTools and DTrace. Port to other BSDs and/or OpenSolaris. Joseph Koshy (FreeBSD Developer) FreeBSD/PmcTools 18 April 2009 42 / 48
  • 43. Status & Future Work Research Topics Introduction 1 Introducing PmcTools PmcTools 2 Architectural Overview API Design Issues Profiling Implementation Status & Future Work 3 Status Future Projects Research Topics Conclusion 4 Joseph Koshy (FreeBSD Developer) FreeBSD/PmcTools 18 April 2009 43 / 48
  • 44. Status & Future Work Research Topics Profile guided system layout applications kernel L1/L2/L3 Cache Lay out the whole system to help “hot” portions remain in cache. Would require an augmented toolchain (http://elftoolchain.sourceforge.net/) & enhancements to hwpmc(4). Useful for low end devices using direct-mapped caches. Joseph Koshy (FreeBSD Developer) FreeBSD/PmcTools 18 April 2009 44 / 48
  • 45. Status & Future Work Research Topics Detection of SMP data structure layout bugs struct shared ... char sh foo; int sh bar; char sh buzz; ... ; Would use a combination of static analysis & hwpmc(4) data. Detection of the poor cache line layout behaviour. Cache line ping-ponging between CPUs. Joseph Koshy (FreeBSD Developer) FreeBSD/PmcTools 18 April 2009 45 / 48
  • 46. Status & Future Work Research Topics Profiling for power use What part of the system consumes power? Where in the code is power being spent? Joseph Koshy (FreeBSD Developer) FreeBSD/PmcTools 18 April 2009 46 / 48
  • 47. Conclusion Introduction 1 Introducing PmcTools PmcTools 2 Architectural Overview API Design Issues Profiling Implementation Status & Future Work 3 Status Future Projects Research Topics Conclusion 4 Joseph Koshy (FreeBSD Developer) FreeBSD/PmcTools 18 April 2009 47 / 48
  • 48. Conclusion Talk Summary FreeBSD/PmcTools was introduced. The design & implementation of PmcTools was looked at. Possible future development and research directions for the project were touched upon. Joseph Koshy (FreeBSD Developer) FreeBSD/PmcTools 18 April 2009 48 / 48