SlideShare una empresa de Scribd logo
1 de 38
ServerlessConf NYC’17
Profiling & debugging
AWS Lambda
Erica Windisch
CTO, Founder
IOpipe, Inc.
Erica Windisch
CTO & Founder IOpipe, Inc.
Former maintainer of Docker &
OpenStack Building cloud, ops, and
infrastructure tooling for over 15
years.
(Thanks & credit to Katie Bayes!)
Traditional Instrumentation
Kernel
Hardware & Virtualization
Application
Detail
Accuracy
❖ Step-debugging
❖ CPU Profiling
❖ Heap snapshots &

allocation profiles
Kernel
Hardware & Virtualization
Application
Detail
Accuracy
❖ Step-debugging
❖ CPU Profiling
❖ Heap snapshots &

allocation profiles
Virtualization - Valgrind
https://www.cprogramming.com/debugging/valgrind.html
Kernel
Hardware & Virtualization
Application
Detail
Accuracy
❖ Step-debugging
❖ CPU Profiling
❖ Heap snapshots &

allocation profiles
Kernel-level tooling
Linux perf tools
https://github.com/brendangregg/perf-tools
— Brendan Gregg
Almost everything you need to know
about kernel-level performance
tracing & beyond
http://www.brendangregg.com/
Kernel
Hardware & Virtualization
Application
Detail
Accuracy
❖ Step-debugging
❖ CPU Profiling
❖ Heap snapshots &

allocation profiles
ptrace (i.e. gdb, strace, et al)
https://sysdig.com/blog/sysdig-vs-dtrace-vs-strace-a-technical-discussion/
There’s an excessive

number of tools
(and they don’t work on Lambda)
Instrumenting Lambda
Things that don’t work:
Linux eBPF!
$ iosnoop
Tracing block I/O. Ctrl-C to end.
/usr/bin/iosnoop: line 172: cd: /sys/kernel/debug/tracing: Permission denied
ERROR: accessing tracing. Root user? Kernel has FTRACE?
debugfs mounted? (mount -t debugfs debugfs /sys/kernel/debug)
Things that don’t work:
Linux eBPF!
λ$ ls -l /sys
⨯ Error: function response: Command failed: ls -l /sys
ls: cannot access /sys: No such file or directory
Things that don’t work:
Linux perf
Things that don’t work:
Linux perf
λ$ cat /proc/sys/kernel/perf_event_paranoid
2
Kernel-level instrumentation

is out of reach
HW+Virt instrumentation

is (mostly) out of reach.
Application instrumentation

is hard(er) on Lambda
Lambda Limitations
✤ Event-loop is out of our direct control
✤ Process command-line flags inaccessible
✤ Ptrace disabled!
✤ Linux kernel perf features not available on Lambda.
✤ Local dev+test is an evolving story
✤ Many languages, requiring different implementations
✤ Debugger breakpoints in prod aren’t generally viable
Local Debugging

& Instrumentation
(Thanks Paul Maddox, Sanath Kumar Ramesh, & AWS!)
Debugging Lambda

in the cloud
github.com/trek10inc/

aws-lambda-debugger
Profiling Lambda

in the cloud
github.com/iopipe/

iopipe-plugin-profiler
https://github.com/node-inspector/v8-profiler
(Thanks Pam Selle!)
iopipe.com

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

CI/CD Using Ansible and Jenkins for Infrastructure
CI/CD Using Ansible and Jenkins for InfrastructureCI/CD Using Ansible and Jenkins for Infrastructure
CI/CD Using Ansible and Jenkins for Infrastructure
 
Going Serverless with Azure Functions
Going Serverless with Azure FunctionsGoing Serverless with Azure Functions
Going Serverless with Azure Functions
 
Infrastructure as Code on Azure - NET Conf AR v2018
Infrastructure as Code on Azure - NET Conf AR v2018 Infrastructure as Code on Azure - NET Conf AR v2018
Infrastructure as Code on Azure - NET Conf AR v2018
 
Continuous delivery in AWS
Continuous delivery in AWSContinuous delivery in AWS
Continuous delivery in AWS
 
High Available Drupal
High Available DrupalHigh Available Drupal
High Available Drupal
 
Building cloud native apps with .net core 3.0 and kubernetes
Building cloud native apps with .net core 3.0 and kubernetesBuilding cloud native apps with .net core 3.0 and kubernetes
Building cloud native apps with .net core 3.0 and kubernetes
 
AWSインフラのコード化にトライしてみて
AWSインフラのコード化にトライしてみてAWSインフラのコード化にトライしてみて
AWSインフラのコード化にトライしてみて
 
Serverless Containers
Serverless ContainersServerless Containers
Serverless Containers
 
Implementation of the Continuous Integration based on Atlassian Bamboo
 Implementation of the Continuous Integration based on Atlassian Bamboo Implementation of the Continuous Integration based on Atlassian Bamboo
Implementation of the Continuous Integration based on Atlassian Bamboo
 
Design Patterns for Docker Applications
Design Patterns for Docker ApplicationsDesign Patterns for Docker Applications
Design Patterns for Docker Applications
 
Azure DevOps Multistage YAML Pipelines – Top 10 Features
Azure DevOps Multistage YAML Pipelines – Top 10 FeaturesAzure DevOps Multistage YAML Pipelines – Top 10 Features
Azure DevOps Multistage YAML Pipelines – Top 10 Features
 
Containers and Developer Defined Data Centers - Evan Powell - Keynote in Bang...
Containers and Developer Defined Data Centers - Evan Powell - Keynote in Bang...Containers and Developer Defined Data Centers - Evan Powell - Keynote in Bang...
Containers and Developer Defined Data Centers - Evan Powell - Keynote in Bang...
 
Cloud Foundry Meetup Tokyo #1 Route service
Cloud Foundry Meetup Tokyo #1 Route serviceCloud Foundry Meetup Tokyo #1 Route service
Cloud Foundry Meetup Tokyo #1 Route service
 
IaaS with ARM templates for Azure
IaaS with ARM templates for AzureIaaS with ARM templates for Azure
IaaS with ARM templates for Azure
 
Big Data DC - BenchPress
Big Data DC - BenchPressBig Data DC - BenchPress
Big Data DC - BenchPress
 
Neil Peterson - Azure CLI Deep Dive
Neil Peterson - Azure CLI Deep DiveNeil Peterson - Azure CLI Deep Dive
Neil Peterson - Azure CLI Deep Dive
 
Leveraging Ansible for CI/CD
Leveraging Ansible for CI/CDLeveraging Ansible for CI/CD
Leveraging Ansible for CI/CD
 
Scaling Your First 1000 Containers with Docker
Scaling Your First 1000 Containers with DockerScaling Your First 1000 Containers with Docker
Scaling Your First 1000 Containers with Docker
 
Campus days Azure HDInsight automation
Campus days Azure HDInsight automationCampus days Azure HDInsight automation
Campus days Azure HDInsight automation
 
BUILD, TEST & DEPLOY .NET CORE APPS IN AZURE DEVOPS
BUILD, TEST & DEPLOY .NET CORE APPS IN AZURE DEVOPSBUILD, TEST & DEPLOY .NET CORE APPS IN AZURE DEVOPS
BUILD, TEST & DEPLOY .NET CORE APPS IN AZURE DEVOPS
 

Similar a Debugging & Profiling of AWS Lambda: ServerlessConf - IOpipe

Automating Software Development Life Cycle - A DevOps Approach
Automating Software Development Life Cycle - A DevOps ApproachAutomating Software Development Life Cycle - A DevOps Approach
Automating Software Development Life Cycle - A DevOps Approach
Akshaya Mahapatra
 
What’s Slowing Down Your Kafka Pipeline? With Ruizhe Cheng and Pete Stevenson...
What’s Slowing Down Your Kafka Pipeline? With Ruizhe Cheng and Pete Stevenson...What’s Slowing Down Your Kafka Pipeline? With Ruizhe Cheng and Pete Stevenson...
What’s Slowing Down Your Kafka Pipeline? With Ruizhe Cheng and Pete Stevenson...
HostedbyConfluent
 

Similar a Debugging & Profiling of AWS Lambda: ServerlessConf - IOpipe (20)

Containing Chaos with Kubernetes - Terrence Ryan, Google - DevOpsDays Tel Avi...
Containing Chaos with Kubernetes - Terrence Ryan, Google - DevOpsDays Tel Avi...Containing Chaos with Kubernetes - Terrence Ryan, Google - DevOpsDays Tel Avi...
Containing Chaos with Kubernetes - Terrence Ryan, Google - DevOpsDays Tel Avi...
 
NFV Orchestration for Optimal Performance
NFV Orchestration for Optimal PerformanceNFV Orchestration for Optimal Performance
NFV Orchestration for Optimal Performance
 
Autoscaling OpenStack Natively with Heat, Ceilometer and LBaaS
Autoscaling OpenStack Natively with Heat, Ceilometer and LBaaSAutoscaling OpenStack Natively with Heat, Ceilometer and LBaaS
Autoscaling OpenStack Natively with Heat, Ceilometer and LBaaS
 
DevOps for Databricks
DevOps for DatabricksDevOps for Databricks
DevOps for Databricks
 
Can i service this from my raspberry pi
Can i service this from my raspberry piCan i service this from my raspberry pi
Can i service this from my raspberry pi
 
Automating Software Development Life Cycle - A DevOps Approach
Automating Software Development Life Cycle - A DevOps ApproachAutomating Software Development Life Cycle - A DevOps Approach
Automating Software Development Life Cycle - A DevOps Approach
 
Integrating Infrastructure as Code into a Continuous Delivery Pipeline | AWS ...
Integrating Infrastructure as Code into a Continuous Delivery Pipeline | AWS ...Integrating Infrastructure as Code into a Continuous Delivery Pipeline | AWS ...
Integrating Infrastructure as Code into a Continuous Delivery Pipeline | AWS ...
 
To Build My Own Cloud with Blackjack…
To Build My Own Cloud with Blackjack…To Build My Own Cloud with Blackjack…
To Build My Own Cloud with Blackjack…
 
Quilt - Distributed Load Simulation from AWS
Quilt - Distributed Load Simulation from AWSQuilt - Distributed Load Simulation from AWS
Quilt - Distributed Load Simulation from AWS
 
Virtual Platforms
Virtual PlatformsVirtual Platforms
Virtual Platforms
 
OSDC2014: Testing Server Infrastructure with #serverspec
OSDC2014: Testing Server Infrastructure with #serverspecOSDC2014: Testing Server Infrastructure with #serverspec
OSDC2014: Testing Server Infrastructure with #serverspec
 
StackiFest 16: Stacki Overview- Anoop Rajendra
StackiFest 16: Stacki Overview- Anoop Rajendra StackiFest 16: Stacki Overview- Anoop Rajendra
StackiFest 16: Stacki Overview- Anoop Rajendra
 
Development of a Cisco ACI device package for NGINX as a Load-Balancer
Development of a Cisco ACI device package for NGINX as a Load-BalancerDevelopment of a Cisco ACI device package for NGINX as a Load-Balancer
Development of a Cisco ACI device package for NGINX as a Load-Balancer
 
JUDCon 2010 Boston : BoxGrinder
JUDCon 2010 Boston : BoxGrinderJUDCon 2010 Boston : BoxGrinder
JUDCon 2010 Boston : BoxGrinder
 
OSDC 2014: Andreas Schmidt - Testing server infrastructure with serverspec
OSDC 2014: Andreas Schmidt - Testing server infrastructure with serverspec OSDC 2014: Andreas Schmidt - Testing server infrastructure with serverspec
OSDC 2014: Andreas Schmidt - Testing server infrastructure with serverspec
 
Linux Profiling at Netflix
Linux Profiling at NetflixLinux Profiling at Netflix
Linux Profiling at Netflix
 
What’s Slowing Down Your Kafka Pipeline? With Ruizhe Cheng and Pete Stevenson...
What’s Slowing Down Your Kafka Pipeline? With Ruizhe Cheng and Pete Stevenson...What’s Slowing Down Your Kafka Pipeline? With Ruizhe Cheng and Pete Stevenson...
What’s Slowing Down Your Kafka Pipeline? With Ruizhe Cheng and Pete Stevenson...
 
Immutable Server generation: The new App Deployment
Immutable Server generation: The new App DeploymentImmutable Server generation: The new App Deployment
Immutable Server generation: The new App Deployment
 
What is Digital Rebar Provision (and how RackN extends)?
What is Digital Rebar Provision (and how RackN extends)?What is Digital Rebar Provision (and how RackN extends)?
What is Digital Rebar Provision (and how RackN extends)?
 
AWS CDK introduction
AWS CDK introductionAWS CDK introduction
AWS CDK introduction
 

Más de Erica Windisch

Practical Docker for OpenStack - NYC / PHL OpenStack meetup (4-23-2014)
Practical Docker for OpenStack - NYC / PHL OpenStack meetup (4-23-2014)Practical Docker for OpenStack - NYC / PHL OpenStack meetup (4-23-2014)
Practical Docker for OpenStack - NYC / PHL OpenStack meetup (4-23-2014)
Erica Windisch
 
Docker OpenStack - 3/27/2014
Docker OpenStack - 3/27/2014Docker OpenStack - 3/27/2014
Docker OpenStack - 3/27/2014
Erica Windisch
 

Más de Erica Windisch (12)

Ops for NoOps - Operational Challenges for Serverless Apps
Ops for NoOps - Operational Challenges for Serverless AppsOps for NoOps - Operational Challenges for Serverless Apps
Ops for NoOps - Operational Challenges for Serverless Apps
 
Building Composable Serverless Apps with IOpipe
Building Composable Serverless Apps with IOpipe Building Composable Serverless Apps with IOpipe
Building Composable Serverless Apps with IOpipe
 
Patterns for Secure Containerized Applications (Docker)
Patterns for Secure Containerized Applications (Docker)Patterns for Secure Containerized Applications (Docker)
Patterns for Secure Containerized Applications (Docker)
 
Orchestrating Docker with OpenStack
Orchestrating Docker with OpenStackOrchestrating Docker with OpenStack
Orchestrating Docker with OpenStack
 
Docker for Developers: Dev, Test, Deploy @ BucksCo Devops at MeetMe HQ
Docker for Developers: Dev, Test, Deploy @ BucksCo Devops at MeetMe HQDocker for Developers: Dev, Test, Deploy @ BucksCo Devops at MeetMe HQ
Docker for Developers: Dev, Test, Deploy @ BucksCo Devops at MeetMe HQ
 
The Docker "Gauntlet" - Introduction, Ecosystem, Deployment, Orchestration
The Docker "Gauntlet" - Introduction, Ecosystem, Deployment, OrchestrationThe Docker "Gauntlet" - Introduction, Ecosystem, Deployment, Orchestration
The Docker "Gauntlet" - Introduction, Ecosystem, Deployment, Orchestration
 
Things will Change - Usenix Keynote UCMS'14
Things will Change - Usenix Keynote UCMS'14Things will Change - Usenix Keynote UCMS'14
Things will Change - Usenix Keynote UCMS'14
 
Deploying Docker (Provisioning /w Docker + Chef/Puppet) - DevopsDaysPGH
Deploying Docker (Provisioning /w Docker + Chef/Puppet) - DevopsDaysPGHDeploying Docker (Provisioning /w Docker + Chef/Puppet) - DevopsDaysPGH
Deploying Docker (Provisioning /w Docker + Chef/Puppet) - DevopsDaysPGH
 
Practical Docker for OpenStack (Juno Summit - May 15th, 2014)
Practical Docker for OpenStack (Juno Summit - May 15th, 2014)Practical Docker for OpenStack (Juno Summit - May 15th, 2014)
Practical Docker for OpenStack (Juno Summit - May 15th, 2014)
 
Provisioning & Deploying with Docker
Provisioning & Deploying with DockerProvisioning & Deploying with Docker
Provisioning & Deploying with Docker
 
Practical Docker for OpenStack - NYC / PHL OpenStack meetup (4-23-2014)
Practical Docker for OpenStack - NYC / PHL OpenStack meetup (4-23-2014)Practical Docker for OpenStack - NYC / PHL OpenStack meetup (4-23-2014)
Practical Docker for OpenStack - NYC / PHL OpenStack meetup (4-23-2014)
 
Docker OpenStack - 3/27/2014
Docker OpenStack - 3/27/2014Docker OpenStack - 3/27/2014
Docker OpenStack - 3/27/2014
 

Último

TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 

Último (20)

Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
 
%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 

Debugging & Profiling of AWS Lambda: ServerlessConf - IOpipe