EVM Stack and Memory Usage Statistics Report

Ethereum Mainnet | 1,297 blocks | blocks 24,409,278–24,514,399

Overview

Metric Value
Blocks analyzed 1,297
Block range 24,409,278 – 24,514,399
Total EVM calls 2,092,522
Total transactions 255,696
Avg calls/tx 8.2
Avg calls/block 1613
Avg txs/block 197

1. EVM Stack Height (items)

Max operand stack depth observed per EVM call (one sample per call).

Metric Value
Total samples 2,092,522
Min 0
p50 8
p75 16
p90 32
p95 32
p99 32
p99.9 64
Max 651

Distribution

         0 |  153 (0.0%)
         1 |  0 (0.0%)
         2 | ██ 36,066 (1.7%)
         4 | ████████████████ 265,738 (12.7%)
         8 | ██████████████████████████████████████████████████ 795,021 (38.0%)
        16 | ████████████████████████████████████████████████ 763,410 (36.5%)
        32 | █████████████ 219,094 (10.5%)
        64 |  13,003 (0.6%)
       128 |  34 (0.0%)
       256 |  0 (0.0%)
       512 |  3 (0.0%)

Cumulative Distribution

  <      1 |  0.0%
  <      4 |  1.7%
  <      8 | ███████ 14.4%
  <     16 | ██████████████████████████ 52.4%
  <     32 | ████████████████████████████████████████████ 88.9%
  <     64 | █████████████████████████████████████████████████ 99.4%
  <    128 | █████████████████████████████████████████████████ 100.0%

2. EVM Memory Size (bytes)

Max memory allocated per EVM call in bytes.

Metric Value
Total samples 2,092,522
Min 0B
p50 128B
p75 256B
p90 512B
p95 1KiB
p99 4KiB
p99.9 16KiB
Max 578.8KiB

Distribution

        0B |  8,786 (0.4%)
       32B |  4,675 (0.2%)
       64B | ██████████████ 332,614 (15.9%)
      128B | ██████████████████████████████████████████████████ 1,168,239 (55.8%)
      256B | ██████████ 241,638 (11.5%)
      512B | █████ 132,630 (6.3%)
      1KiB | █████ 128,496 (6.1%)
      2KiB | ██ 48,946 (2.3%)
      4KiB |  17,222 (0.8%)
      8KiB |  6,135 (0.3%)
     16KiB |  1,869 (0.1%)
     32KiB |  411 (0.0%)
     64KiB |  599 (0.0%)
    128KiB |  255 (0.0%)
    256KiB |  4 (0.0%)
    512KiB |  3 (0.0%)

Cumulative Distribution

  <     1B |  0.4%
  <    64B |  0.6%
  <   128B | ████████ 16.5%
  <   256B | ████████████████████████████████████ 72.4%
  <   512B | █████████████████████████████████████████ 83.9%
  <   1KiB | █████████████████████████████████████████████ 90.3%
  <   2KiB | ████████████████████████████████████████████████ 96.4%
  <   4KiB | █████████████████████████████████████████████████ 98.7%
  <   8KiB | █████████████████████████████████████████████████ 99.6%
  <  16KiB | █████████████████████████████████████████████████ 99.8%
  <  32KiB | █████████████████████████████████████████████████ 99.9%
  <  64KiB | █████████████████████████████████████████████████ 100.0%

3. Transaction Call Depth

Max call nesting depth per transaction (one sample per tx).

Metric Value
Total samples 255,696
Min 0
p50 1
p75 2
p90 4
p95 4
p99 8
p99.9 8
Max 35

Distribution

         0 | ██████████████████████████████████████████████████ 116,269 (45.5%)
         1 | ██████████████████████████ 61,369 (24.0%)
         2 | █████████████████ 40,994 (16.0%)
         4 | ████████████ 29,283 (11.5%)
         8 | ███ 7,547 (3.0%)
        16 |  233 (0.1%)
        32 |  1 (0.0%)

Cumulative Distribution

  <      1 | ██████████████████████ 45.5%
  <      2 | ██████████████████████████████████ 69.5%
  <      4 | ██████████████████████████████████████████ 85.5%
  <      8 | ████████████████████████████████████████████████ 97.0%
  <     16 | █████████████████████████████████████████████████ 99.9%
  <     32 | █████████████████████████████████████████████████ 100.0%

4. Transaction Peak Stack (items)

Peak aggregate stack items across all active call frames during a transaction (one sample per tx).

Metric Value
Total samples 255,696
Min 0
p50 16
p75 32
p90 64
p95 128
p99 128
p99.9 256
Max 664

Distribution

         0 |  153 (0.1%)
         1 |  0 (0.0%)
         2 | ██ 6,900 (2.7%)
         4 | ██ 6,704 (2.6%)
         8 | ██ 7,128 (2.8%)
        16 | ██████████████████████████████████████████████████ 140,607 (55.0%)
        32 | ██████████ 30,782 (12.0%)
        64 | ████████████████ 45,555 (17.8%)
       128 | █████ 16,426 (6.4%)
       256 |  1,434 (0.6%)
       512 |  7 (0.0%)

Cumulative Distribution

  <      1 |  0.1%
  <      4 | █ 2.8%
  <      8 | ██ 5.4%
  <     16 | ████ 8.2%
  <     32 | ███████████████████████████████ 63.2%
  <     64 | █████████████████████████████████████ 75.2%
  <    128 | ██████████████████████████████████████████████ 93.0%
  <    256 | █████████████████████████████████████████████████ 99.4%
  <    512 | █████████████████████████████████████████████████ 100.0%

5. Transaction Peak Memory (bytes)

Peak aggregate memory across all active call frames during a transaction (one sample per tx).

Metric Value
Total samples 255,696
Min 0B
p50 256B
p75 1KiB
p90 4KiB
p95 8KiB
p99 16KiB
p99.9 128KiB
Max 584.2KiB

Distribution

        0B | ███ 6,168 (2.4%)
       32B |  93 (0.0%)
       64B | ████ 9,477 (3.7%)
      128B | ██████████████████████████████████████████████████ 95,450 (37.3%)
      256B | █████████████████████████████ 56,335 (22.0%)
      512B | █████ 11,236 (4.4%)
      1KiB | ██████████ 19,891 (7.8%)
      2KiB | ████████████ 24,416 (9.5%)
      4KiB | █████████ 18,152 (7.1%)
      8KiB | ████ 8,852 (3.5%)
     16KiB | █ 3,602 (1.4%)
     32KiB |  1,250 (0.5%)
     64KiB |  392 (0.2%)
    128KiB |  247 (0.1%)
    256KiB |  131 (0.1%)
    512KiB |  4 (0.0%)

Cumulative Distribution

  <     1B | █ 2.4%
  <   128B | ███ 6.2%
  <   256B | █████████████████████ 43.5%
  <   512B | ████████████████████████████████ 65.5%
  <   1KiB | ██████████████████████████████████ 69.9%
  <   2KiB | ██████████████████████████████████████ 77.7%
  <   4KiB | ███████████████████████████████████████████ 87.2%
  <   8KiB | ███████████████████████████████████████████████ 94.3%
  <  16KiB | ████████████████████████████████████████████████ 97.8%
  <  32KiB | █████████████████████████████████████████████████ 99.2%
  <  64KiB | █████████████████████████████████████████████████ 99.7%
  < 128KiB | █████████████████████████████████████████████████ 99.9%
  < 512KiB | █████████████████████████████████████████████████ 100.0%

Key Takeaways

  • Stack: 88.9% of EVM calls use < 32 stack items. p99 = 32, max observed = 651 (EVM limit is 1024).
  • Memory: 90.3% of EVM calls use < 1 KiB memory. p99 = 4KiB, max observed = 578.8KiB.
  • Call depth: 45.5% of transactions make no internal calls. 85.5% stay under depth 4. Max observed = 35.
  • Tx peak stack: p50 = 16, p99 = 128, max observed = 664.
  • Tx peak memory: p50 = 256B, p99 = 16KiB, max observed = 584.2KiB.
  • Calls per tx: median 7.7, min 1.0, max 253.6 across blocks.

Methodology

Data collected by instrumenting Zilkworm’s EVM execution.

Metrics

  • Stack height — maximum number of EVM operand stack items observed during a single EVM call. One sample per call.
  • Memory size — maximum EVM memory allocated (in bytes) during a single EVM call. One sample per call.
  • Call depth — maximum CALL/CREATE nesting depth reached during a transaction. One sample per transaction.
  • Tx peak stack — peak aggregate stack items across all active call frames during a transaction. One sample per transaction.
  • Tx peak memory — peak aggregate memory (in bytes) across all active call frames during a transaction. One sample per transaction.

HDR Histograms

Values are recorded into HDR (High Dynamic Range) histograms using log2 bucketing. This is a simplified variant of Gil Tene’s HdrHistogram with one bucket per power of two:

  • Bucket 0: value = 0
  • Bucket i (i > 0): values in [2^(i−1), 2^i)

This gives 21 buckets covering values from 0 to over 1M, with constant relative error: each bucket spans a 2× range.

Percentile Estimation

Percentiles (p50, p75, p90, p95, p99, p99.9) are approximations computed from the histogram bucket counts. For a given percentile p, we find the first bucket whose cumulative count reaches p × N (where N is the total sample count), and report that bucket’s lower bound as the percentile value. This means reported percentiles may underestimate the true value by up to 2× (the width of one bucket). The min and max values are tracked exactly.

3 Likes