SQS Lambda ESM Scaling Behaviour - Experiment Batch Size vs Queue Depth

#Test

Important

This page only contains the experiments that have been done for the: SQS Lambda ESM Scaling Behaviour blog post.

In these experiments we paused the ESM Lambda poller and enqueued different numbers of messages (1,000; 10,000; 100,000; 1,000,000) before resuming the poller and measuring the invocation and cold start rate over time. Processing time is kept at 200ms while varying batch size.

#Batch Size 1

Queue depthTotal cold startsAvgcold starts per secondAvg cold starts per minuteProcessing time
1,000361.27230s
10,0001362.716250s
100,0004683.62162m 10s
1,000,0007002.31385m 10s
Loading..
Batch Size 1 comparison — Cold Starts Cumulative, Cold Starts, Invocations

📈 CLICK TO SEE QUEUE DEPTH 1000, 10,000, 100,000 and 1,000,000 DETAILED RESULTS

#Queue Depth 1,000

Loading..
Charts: Cold Starts Cumulative, Cold Starts, Invocations

#Queue Depth 10,000

Loading..
Charts: Cold Starts Cumulative, Cold Starts, Invocations

#Queue Depth 100,000

Loading..
Charts: Cold Starts Cumulative, Cold Starts, Invocations

#Queue Depth 1,000,000

Loading..
Charts: Cold Starts Cumulative, Cold Starts, Invocations


#Batch Size 2

Queue depthTotal cold startsAvgcold starts per secondAvg cold starts per minuteProcessing time
1,000341.710220s
10,000832.112640s
100,0003243.62161m 30s
1,000,0006982.81684m 10s
Loading..
Batch Size 1 comparison — Cold Starts Cumulative, Cold Starts, Invocations

📈 CLICK TO SEE QUEUE DEPTH 1000, 10,000, 100,000 and 1,000,000 DETAILED RESULTS

#Queue Depth 1,000

Loading..
Charts: Cold Starts Cumulative, Cold Starts, Invocations

#Queue Depth 10,000

Loading..
Charts: Cold Starts Cumulative, Cold Starts, Invocations

#Queue Depth 100,000

Loading..
Charts: Cold Starts Cumulative, Cold Starts, Invocations

#Queue Depth 1,000,000

Loading..
Charts: Cold Starts Cumulative, Cold Starts, Invocations


#Batch Size 5

Queue depthTotal cold startsAvgcold starts per secondAvg cold starts per minuteProcessing time
1,000251.37820s
10,000702.313830s
100,0002002.91741m 10s
1,000,0006543.82282m 50s
Loading..
Batch Size 5 comparison — Cold Starts Cumulative, Cold Starts, Invocations

📈 CLICK TO SEE QUEUE DEPTH 1000, 10,000, 100,000 and 1,000,000 DETAILED RESULTS

#Queue Depth 1,000

Loading..
Charts: Cold Starts Cumulative, Cold Starts, Invocations

#Queue Depth 10,000

Loading..
Charts: Cold Starts Cumulative, Cold Starts, Invocations

#Queue Depth 100,000

Loading..
Charts: Cold Starts Cumulative, Cold Starts, Invocations

#Queue Depth 1,000,000

Loading..
Charts: Cold Starts Cumulative, Cold Starts, Invocations


#Batch Size 10

Queue depthTotal cold startsAvgcold starts per secondAvg cold starts per minuteProcessing time
1,000150.84820s
10,000461.59030s
100,0001292.615650s
1,000,0004803.72222m 10s
Loading..
Batch Size 10 comparison — Cold Starts Cumulative, Cold Starts, Invocations

📈 CLICK TO SEE QUEUE DEPTH 1000, 10,000, 100,000 and 1,000,000 DETAILED RESULTS

#Queue Depth 1,000

Loading..
Charts: Cold Starts Cumulative, Cold Starts, Invocations

#Queue Depth 10,000

Loading..
Charts: Cold Starts Cumulative, Cold Starts, Invocations

#Queue Depth 100,000

Loading..
Charts: Cold Starts Cumulative, Cold Starts, Invocations

#Queue Depth 1,000,000

Loading..
Charts: Cold Starts Cumulative, Cold Starts, Invocations


#Batch Size 10 & Batch Window 1 second

Queue depthTotal cold startsAvgcold starts per secondAvg cold starts per minuteProcessing time
1,000130.74220s
10,000471.69630s
100,00012221201m
1,000,0004803.42042m 20s

Adding a 1-second batch window at batch size 10 introduces a small but measurable drag on cold start velocity. The 1M run shows ~3.4cold starts per second compared to ~4cold starts per second without the batch window — the extra buffering time slightly reduces the pressure the ESM poller observes, but the effect is modest at this batch size.

Loading..
Batch Size 10 & Batch Window 1 second — Cold Starts Cumulative, Cold Starts, Invocations

📈 CLICK TO SEE QUEUE DEPTH 1000, 10,000, 100,000 and 1,000,000 DETAILED RESULTS

#Queue Depth 1,000

Loading..
Charts: Cold Starts Cumulative, Cold Starts, Invocations

#Queue Depth 10,000

Loading..
Charts: Cold Starts Cumulative, Cold Starts, Invocations

#Queue Depth 100,000

Loading..
Charts: Cold Starts Cumulative, Cold Starts, Invocations

#Queue Depth 1,000,000

Loading..
Charts: Cold Starts Cumulative, Cold Starts, Invocations


#Batch Size 100 & Batch Window 1 second

Queue depthTotal cold startsAvgcold starts per secondAvg cold starts per minuteProcessing time
1,00050.53010s
10,00080.42420s
100,000231.27220s
1,000,000750.9541m 20s

At batch size 100 the pattern changes. The small-queue experiments drained before any meaningful scaling rhythm could develop. Even the 1M run shows a much lower velocity (~1.5cold starts per second vs ~4cold starts per second for smaller batch sizes). With 100 messages per invocation, far fewer concurrent Lambda invocations are needed to drain the queue, which reduces the provisioning pressure the ESM poller observes.

Loading..
Batch Size 100 & Batch Window 1 second — Cold Starts Cumulative, Cold Starts, Invocations

📈 CLICK TO SEE QUEUE DEPTH 1000, 10,000, 100,000 and 1,000,000 DETAILED RESULTS

#Queue Depth 1,000

Loading..
Charts: Cold Starts Cumulative, Cold Starts, Invocations

#Queue Depth 10,000

Loading..
Charts: Cold Starts Cumulative, Cold Starts, Invocations

#Queue Depth 100,000

Loading..
Charts: Cold Starts Cumulative, Cold Starts, Invocations

#Queue Depth 1,000,000

Loading..
Charts: Cold Starts Cumulative, Cold Starts, Invocations