Closed
Description
What were you trying to accomplish?
While testing in my sample (cold start optimized) application I can measure up to 20%+ increase by enable powertools-logging instead of lambda-logging (SLF4J + Logback)
The tests are executed by leveraging lumigo-cli measure-lambda-cold-starts.
Expected Behavior
Cold starts timings shouldn't become much worse by switching out another logging framework for powertools-logging
Current Behavior
lambda-logging (baseline)
{
"functionName": "client-service-dev-create-client",
"memorySize": 3008,
"coldStarts": 40,
"min": 1142.29,
"p25": 1192.22,
"median": 1213.9,
"p75": 1223.73,
"p95": 1261.69,
"max": 1276.78,
"stddev": 29.0004
}
powertools-logging
{
"functionName": "client-service-dev-create-client",
"memorySize": 3008,
"coldStarts": 71,
"min": 1787.6,
"p25": 1952.06,
"median": 1981.9,
"p75": 2004.21,
"p95": 2063.38,
"max": 2149.03,
"stddev": 53.575
}
Possible Solution
/
Steps to Reproduce (for bugs)
- git clone https://github.com/drissamri/powertools-coldstart-issue
- mvn clean package
- sls deploy --region eu-central-1
- npm install -g lumigo-cli
- lumigo-cli measure-lambda-cold-starts -p dev -n client-service-dev-create-client -r eu-central-1 -f src/test/resources/create-client-event.json
This gives you the baseline results, now we enable powertools:
- Switch to
powertools
git branch - mvn clean package
- sls deploy --region eu-central-1
- lumigo-cli measure-lambda-cold-starts -p dev -n client-service-dev-create-client -r eu-central-1 -f
Environment
- Powertools version used: 0.4.0-beta
- Packaging format (Layers, Maven/Gradle): maven (zip)
- AWS Lambda function runtime: java11