Skip to content

Cold start increased significantly by enabling powertools-logging #121

Closed
@drissamri

Description

@drissamri

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)

  1. git clone https://github.com/drissamri/powertools-coldstart-issue
  2. mvn clean package
  3. sls deploy --region eu-central-1
  4. npm install -g lumigo-cli
  5. 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:

  1. Switch to powertools git branch
  2. mvn clean package
  3. sls deploy --region eu-central-1
  4. 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

Metadata

Metadata

Labels

questionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions