Resource Utilization

CPU, memory, disk I/O, and network throughput analysis for PQ Devnet clients.

This notebook examines container-level resource usage using cAdvisor metrics:

  • CPU usage (cores) per client
  • Memory working set and RSS per client
  • Disk read/write throughput
  • Disk usage over time
  • Network receive/transmit throughput
Show code
import json
from pathlib import Path

import pandas as pd
import plotly.express as px
import plotly.graph_objects as go
from plotly.subplots import make_subplots
from IPython.display import HTML, display

# Set default renderer for static HTML output
import plotly.io as pio
pio.renderers.default = "notebook"
Show code
# Resolve devnet_id
DATA_DIR = Path("../data")

if devnet_id is None:
    # Use latest devnet from manifest
    devnets_path = DATA_DIR / "devnets.json"
    if devnets_path.exists():
        with open(devnets_path) as f:
            devnets = json.load(f).get("devnets", [])
        if devnets:
            devnet_id = devnets[-1]["id"]  # Latest
            print(f"Using latest devnet: {devnet_id}")
    else:
        raise ValueError("No devnets.json found. Run 'just detect-devnets' first.")

DEVNET_DIR = DATA_DIR / devnet_id
print(f"Loading data from: {DEVNET_DIR}")
Loading data from: ../data/pqdevnet-20260513T1731Z
Show code
# Load devnet metadata
with open(DATA_DIR / "devnets.json") as f:
    devnets_data = json.load(f)
    devnet_info = next((d for d in devnets_data["devnets"] if d["id"] == devnet_id), None)

if devnet_info:
    print(f"Devnet: {devnet_info['id']}")
    print(f"Duration: {devnet_info['duration_hours']:.1f} hours")
    print(f"Time: {devnet_info['start_time']} to {devnet_info['end_time']}")
    print(f"Slots: {devnet_info['start_slot']} \u2192 {devnet_info['end_slot']}")
    print(f"Clients: {', '.join(devnet_info['clients'])}")
Devnet: pqdevnet-20260513T1731Z
Duration: 1.0 hours
Time: 2026-05-13T17:31:56+00:00 to 2026-05-13T18:32:21+00:00
Slots: 0 β†’ 2118
Clients: ethlambda_0, ethlambda_1, ethlambda_12, ethlambda_13, ethlambda_14, ethlambda_15, ethlambda_2, ethlambda_3, ethlambda_4, ethlambda_5, ethlambda_6, gean_0, gean_1, gean_10, gean_11, gean_12, gean_13, gean_14, gean_15, gean_2, gean_3, gean_4, gean_5, gean_6, gean_7, gean_8, gean_9, nlean_0, nlean_1, nlean_10, nlean_11, nlean_12, nlean_13, nlean_14, nlean_15, nlean_2, nlean_3, nlean_4, nlean_5, nlean_6, nlean_7, nlean_8, nlean_9, zeam_0, zeam_1, zeam_10, zeam_11, zeam_12, zeam_14, zeam_2, zeam_3, zeam_4, zeam_5, zeam_6, zeam_7, zeam_8, zeam_9
Show code
def format_bytes(val: float) -> str:
    """Format bytes to human-readable units."""
    for unit in ["B", "KB", "MB", "GB", "TB"]:
        if abs(val) < 1024:
            return f"{val:.1f} {unit}"
        val /= 1024
    return f"{val:.1f} PB"


def format_bytes_per_sec(val: float) -> str:
    """Format bytes/s to human-readable units."""
    return format_bytes(val) + "/s"

Load DataΒΆ

Show code
# Load container resource data
data_files = {
    "cpu": "container_cpu.parquet",
    "memory": "container_memory.parquet",
    "disk_io": "container_disk_io.parquet",
    "network": "container_network.parquet",
}

# Infrastructure containers irrelevant to devnet client analysis
EXCLUDED_CONTAINERS = {"unknown", "cadvisor", "prometheus", "promtail", "node-exporter", "node_exporter", "grafana"}

# Aggregation strategy per data type:
# - cpu/memory: max (gauge-like, take the active container's value)
# - disk_io/network: sum (per-device/interface rates should be summed)
AGG_STRATEGY = {"cpu": "max", "memory": "max", "disk_io": "sum", "network": "sum"}

# Group-by columns per data type (all have container+timestamp, some have metric)
GROUP_COLS = {
    "cpu": ["container", "timestamp"],
    "memory": ["container", "metric", "timestamp"],
    "disk_io": ["container", "metric", "timestamp"],
    "network": ["container", "metric", "timestamp"],
}

dfs = {}
for key, filename in data_files.items():
    path = DEVNET_DIR / filename
    if path.exists():
        df = pd.read_parquet(path)
        df = df[~df["container"].isin(EXCLUDED_CONTAINERS)]
        # Deduplicate: multiple Prometheus series (interfaces, devices, container
        # IDs after restarts) can produce duplicate rows per container+timestamp.
        df = df.groupby(GROUP_COLS[key], as_index=False)["value"].agg(AGG_STRATEGY[key])
        dfs[key] = df
        print(f"{key}: {len(df)} records, containers: {df['container'].nunique()}")
    else:
        dfs[key] = pd.DataFrame()
        print(f"{key}: no data (file not found)")

# Unified container list: use devnet_info["clients"] which already contains
# full names with instance suffixes (e.g., "ream_0", "ream_1").
all_containers = sorted(devnet_info["clients"])
n_cols = min(len(all_containers), 2)
n_rows = -(-len(all_containers) // n_cols)
print(f"\nAll containers ({len(all_containers)}): {all_containers}")
cpu: 345 records, containers: 55
memory: 3512 records, containers: 58
disk_io: 682 records, containers: 55
network: 690 records, containers: 55

All containers (57): ['ethlambda_0', 'ethlambda_1', 'ethlambda_12', 'ethlambda_13', 'ethlambda_14', 'ethlambda_15', 'ethlambda_2', 'ethlambda_3', 'ethlambda_4', 'ethlambda_5', 'ethlambda_6', 'gean_0', 'gean_1', 'gean_10', 'gean_11', 'gean_12', 'gean_13', 'gean_14', 'gean_15', 'gean_2', 'gean_3', 'gean_4', 'gean_5', 'gean_6', 'gean_7', 'gean_8', 'gean_9', 'nlean_0', 'nlean_1', 'nlean_10', 'nlean_11', 'nlean_12', 'nlean_13', 'nlean_14', 'nlean_15', 'nlean_2', 'nlean_3', 'nlean_4', 'nlean_5', 'nlean_6', 'nlean_7', 'nlean_8', 'nlean_9', 'zeam_0', 'zeam_1', 'zeam_10', 'zeam_11', 'zeam_12', 'zeam_14', 'zeam_2', 'zeam_3', 'zeam_4', 'zeam_5', 'zeam_6', 'zeam_7', 'zeam_8', 'zeam_9']

CPU UsageΒΆ

CPU cores used per container over time, derived from rate(container_cpu_usage_seconds_total[5m]).

Show code
cpu_df = dfs["cpu"]

if cpu_df.empty:
    print("No CPU data available")
else:
    fig = make_subplots(
        rows=n_rows, cols=n_cols,
        subplot_titles=all_containers,
        vertical_spacing=0.12 / max(n_rows - 1, 1) * 2,
        horizontal_spacing=0.08,
    )

    for i, container in enumerate(all_containers):
        row = i // n_cols + 1
        col = i % n_cols + 1
        cdf = cpu_df[cpu_df["container"] == container].sort_values("timestamp")
        if not cdf.empty:
            fig.add_trace(
                go.Scatter(
                    x=cdf["timestamp"], y=cdf["value"],
                    name=container, showlegend=False,
                    line=dict(color="#636EFA"),
                ),
                row=row, col=col,
            )
        else:
            fig.add_trace(
                go.Scatter(x=[None], y=[None], showlegend=False, hoverinfo='skip'),
                row=row, col=col,
            )
            _n = (row - 1) * n_cols + col
            _s = "" if _n == 1 else str(_n)
            fig.add_annotation(
                text="No data available",
                xref=f"x{_s} domain", yref=f"y{_s} domain",
                x=0.5, y=0.5,
                showarrow=False,
                font=dict(size=12, color="#999"),
            )
        fig.update_yaxes(title_text="CPU (cores)", row=row, col=col)

    fig.update_layout(
        title="CPU Usage per Container",
        height=270 * n_rows,
    )
    fig.show()
Show code
# CPU summary statistics
if not cpu_df.empty:
    cpu_summary = cpu_df.groupby("container")["value"].agg(
        ["mean", "max", "min", "std"]
    ).round(3)
    cpu_summary.columns = ["Mean (cores)", "Max (cores)", "Min (cores)", "Std Dev"]
    cpu_summary = cpu_summary.sort_index()
    display(cpu_summary)
Mean (cores) Max (cores) Min (cores) Std Dev
container
ethlambda_0 2.390 3.525 0.762 0.913
ethlambda_1 0.610 1.782 0.014 0.718
ethlambda_12 0.784 1.643 0.124 0.644
ethlambda_13 0.947 1.880 0.148 0.767
ethlambda_14 1.323 2.225 0.208 0.873
ethlambda_15 1.593 2.664 0.246 1.101
ethlambda_2 1.223 2.254 0.188 0.864
ethlambda_3 1.544 2.603 0.227 1.076
ethlambda_4 0.775 1.613 0.114 0.631
ethlambda_5 0.946 1.877 0.151 0.756
ethlambda_6 1.331 2.235 0.198 0.875
gean_0 3.101 5.361 1.378 1.751
gean_1 0.451 1.133 0.021 0.443
gean_10 0.599 0.988 0.154 0.337
gean_11 0.651 1.065 0.155 0.380
gean_12 0.548 0.908 0.120 0.340
gean_13 0.662 1.143 0.152 0.409
gean_14 0.661 1.069 0.160 0.383
gean_15 0.697 1.308 0.152 0.452
gean_2 0.699 1.251 0.138 0.449
gean_3 0.679 1.156 0.131 0.425
gean_4 0.529 0.894 0.111 0.333
gean_5 0.578 0.989 0.137 0.352
gean_6 0.643 1.080 0.154 0.398
gean_7 0.607 1.019 0.150 0.363
gean_8 0.505 0.839 0.110 0.307
gean_9 0.630 1.034 0.154 0.365
nlean_0 4.403 6.157 1.248 2.069
nlean_1 1.250 1.765 0.521 0.521
nlean_10 1.389 1.676 0.499 0.507
nlean_11 1.110 1.814 0.488 0.517
nlean_12 0.381 0.615 0.254 0.135
nlean_13 1.287 1.804 0.432 0.588
nlean_14 1.394 1.702 0.493 0.506
nlean_15 1.020 1.802 0.488 0.492
nlean_2 1.405 1.654 0.510 0.502
nlean_3 1.086 1.477 0.390 0.481
nlean_4 0.449 0.749 0.269 0.192
nlean_5 1.088 1.679 0.502 0.478
nlean_6 1.374 1.648 0.493 0.495
nlean_7 1.228 1.883 0.492 0.619
nlean_8 0.402 0.533 0.196 0.125
nlean_9 1.377 1.947 0.504 0.657
zeam_0 0.999 2.705 0.052 1.101
zeam_1 0.248 1.321 0.007 0.435
zeam_10 0.344 1.128 0.006 0.450
zeam_11 0.373 1.280 0.006 0.504
zeam_2 0.364 1.231 0.006 0.493
zeam_3 0.326 1.240 0.009 0.473
zeam_4 0.261 0.984 0.008 0.375
zeam_5 0.269 1.077 0.007 0.420
zeam_6 0.340 1.088 0.011 0.434
zeam_7 0.285 1.049 0.009 0.407
zeam_8 0.304 0.982 0.007 0.392
zeam_9 0.309 1.199 0.006 0.455

Memory UsageΒΆ

Memory consumption per container, including working set (total usage minus inactive file cache) and RSS (Resident Set Size -- anonymous memory only, excluding file-backed pages). The gap between the two shows active file cache usage.

Show code
mem_df = dfs["memory"]

if mem_df.empty:
    print("No memory data available")
else:
    # Combine working_set and rss for per-container comparison
    mem_plot_df = mem_df[mem_df["metric"].isin(["working_set", "rss"])].copy()
    if not mem_plot_df.empty:
        mem_plot_df["value_mb"] = mem_plot_df["value"] / (1024 * 1024)

        fig = make_subplots(
            rows=n_rows, cols=n_cols,
            subplot_titles=all_containers,
            vertical_spacing=0.12 / max(n_rows - 1, 1) * 2,
            horizontal_spacing=0.08,
        )

        colors = {"working_set": "#636EFA", "rss": "#EF553B"}
        legend_added = set()

        for i, container in enumerate(all_containers):
            row = i // n_cols + 1
            col = i % n_cols + 1
            cdf = mem_plot_df[mem_plot_df["container"] == container]
            if not cdf.empty:
                for metric in ["working_set", "rss"]:
                    mdf = cdf[cdf["metric"] == metric].sort_values("timestamp")
                    if mdf.empty:
                        continue
                    show_legend = metric not in legend_added
                    legend_added.add(metric)
                    fig.add_trace(
                        go.Scatter(
                            x=mdf["timestamp"], y=mdf["value_mb"],
                            name=metric, legendgroup=metric,
                            showlegend=show_legend,
                            line=dict(color=colors[metric]),
                        ),
                        row=row, col=col,
                    )
            else:
                fig.add_trace(
                    go.Scatter(x=[None], y=[None], showlegend=False, hoverinfo='skip'),
                    row=row, col=col,
                )
                _n = (row - 1) * n_cols + col
                _s = "" if _n == 1 else str(_n)
                fig.add_annotation(
                    text="No data available",
                    xref=f"x{_s} domain", yref=f"y{_s} domain",
                    x=0.5, y=0.5,
                    showarrow=False,
                    font=dict(size=12, color="#999"),
                )
            fig.update_yaxes(title_text="MB", row=row, col=col)

        fig.update_layout(
            title="Memory Usage per Container (Working Set vs RSS)",
            height=270 * n_rows,
        )
        fig.show()
Show code
# Memory summary
if not mem_df.empty:
    ws_df = mem_df[mem_df["metric"] == "working_set"]
    if not ws_df.empty:
        mem_summary = ws_df.groupby("container")["value"].agg(["mean", "max"]).reset_index()
        mem_summary["Mean"] = mem_summary["mean"].apply(format_bytes)
        mem_summary["Peak"] = mem_summary["max"].apply(format_bytes)
        mem_summary = mem_summary.rename(columns={"container": "Container"})[["Container", "Mean", "Peak"]]
        mem_summary = mem_summary.sort_values("Container")
        display(mem_summary.set_index("Container"))
Mean Peak
Container
ethlambda_0 1.8 GB 2.6 GB
ethlambda_1 1.0 GB 2.8 GB
ethlambda_12 1.0 GB 1.6 GB
ethlambda_13 1.1 GB 1.9 GB
ethlambda_14 1.5 GB 2.9 GB
ethlambda_15 1.5 GB 3.3 GB
ethlambda_2 1.4 GB 2.7 GB
ethlambda_3 1.8 GB 5.2 GB
ethlambda_4 1.2 GB 3.0 GB
ethlambda_5 1.2 GB 2.5 GB
ethlambda_6 1.5 GB 2.7 GB
gean_0 4.6 GB 7.9 GB
gean_1 1.0 GB 1.4 GB
gean_10 1.1 GB 1.5 GB
gean_11 1.1 GB 1.5 GB
gean_12 1.1 GB 1.5 GB
gean_13 1001.0 MB 1.4 GB
gean_14 1.1 GB 1.5 GB
gean_15 1.1 GB 1.5 GB
gean_2 1.1 GB 1.6 GB
gean_3 1.1 GB 1.5 GB
gean_4 1.1 GB 1.5 GB
gean_5 1023.3 MB 1.4 GB
gean_6 1.1 GB 1.4 GB
gean_7 1.1 GB 1.5 GB
gean_8 1.0 GB 1.6 GB
gean_9 1.0 GB 1.5 GB
nlean_0 3.4 GB 4.1 GB
nlean_1 3.3 GB 5.6 GB
nlean_10 3.3 GB 3.6 GB
nlean_11 4.3 GB 6.1 GB
nlean_12 3.5 GB 5.1 GB
nlean_13 3.4 GB 4.9 GB
nlean_14 3.8 GB 4.3 GB
nlean_15 2.6 GB 3.3 GB
nlean_2 3.3 GB 3.9 GB
nlean_3 2.2 GB 3.0 GB
nlean_4 2.7 GB 3.7 GB
nlean_5 3.3 GB 4.3 GB
nlean_6 2.7 GB 3.4 GB
nlean_7 2.7 GB 3.3 GB
nlean_8 2.5 GB 3.6 GB
nlean_9 3.1 GB 4.7 GB
zeam_0 3.0 GB 3.6 GB
zeam_1 3.6 GB 4.1 GB
zeam_10 2.6 GB 3.1 GB
zeam_11 2.8 GB 3.6 GB
zeam_12 2.9 MB 4.4 MB
zeam_14 2.1 MB 2.1 MB
zeam_15 1.6 MB 1.6 MB
zeam_2 2.8 GB 3.4 GB
zeam_3 2.9 GB 3.5 GB
zeam_4 2.3 GB 2.7 GB
zeam_5 2.3 GB 2.8 GB
zeam_6 2.3 GB 2.8 GB
zeam_7 2.3 GB 2.8 GB
zeam_8 2.3 GB 2.7 GB
zeam_9 2.5 GB 3.2 GB

Disk I/OΒΆ

Disk read/write throughput per container.

Show code
disk_df = dfs["disk_io"]

if disk_df.empty:
    print("No disk I/O data available")
else:
    # Read/write throughput per container
    throughput_df = disk_df[disk_df["metric"].isin(["read_throughput", "write_throughput"])].copy()
    if not throughput_df.empty:
        throughput_df["value_mb"] = throughput_df["value"] / (1024 * 1024)

        fig = make_subplots(
            rows=n_rows, cols=n_cols,
            subplot_titles=all_containers,
            vertical_spacing=0.12 / max(n_rows - 1, 1) * 2,
            horizontal_spacing=0.08,
        )

        colors = {"read_throughput": "#636EFA", "write_throughput": "#EF553B"}
        legend_added = set()

        for i, container in enumerate(all_containers):
            row = i // n_cols + 1
            col = i % n_cols + 1
            cdf = throughput_df[throughput_df["container"] == container]
            if not cdf.empty:
                for metric in ["read_throughput", "write_throughput"]:
                    mdf = cdf[cdf["metric"] == metric].sort_values("timestamp")
                    if mdf.empty:
                        continue
                    label = metric.replace("_throughput", "")
                    show_legend = metric not in legend_added
                    legend_added.add(metric)
                    fig.add_trace(
                        go.Scatter(
                            x=mdf["timestamp"], y=mdf["value_mb"],
                            name=label, legendgroup=metric,
                            showlegend=show_legend,
                            line=dict(color=colors[metric]),
                        ),
                        row=row, col=col,
                    )
            else:
                fig.add_trace(
                    go.Scatter(x=[None], y=[None], showlegend=False, hoverinfo='skip'),
                    row=row, col=col,
                )
                _n = (row - 1) * n_cols + col
                _s = "" if _n == 1 else str(_n)
                fig.add_annotation(
                    text="No data available",
                    xref=f"x{_s} domain", yref=f"y{_s} domain",
                    x=0.5, y=0.5,
                    showarrow=False,
                    font=dict(size=12, color="#999"),
                )
            fig.update_yaxes(title_text="MB/s", row=row, col=col)

        fig.update_layout(
            title="Disk I/O Throughput per Container (Read vs Write)",
            height=270 * n_rows,
        )
        fig.show()

Disk UsageΒΆ

Total disk space used per container over time.

Show code
# Disk usage uses the 'client' column (container is 'unknown' for this metric)
disk_io_path = DEVNET_DIR / "container_disk_io.parquet"
if disk_io_path.exists():
    raw_disk = pd.read_parquet(disk_io_path)
    usage_df = raw_disk[raw_disk["metric"] == "disk_usage"].copy()
    usage_df = usage_df.groupby(["client", "timestamp"], as_index=False)["value"].max()
else:
    usage_df = pd.DataFrame()

if usage_df.empty:
    print("No disk usage data available")
else:
    usage_df["value_gb"] = usage_df["value"] / (1024 * 1024 * 1024)

    # Use client names from devnet metadata
    all_clients_sorted = sorted(devnet_info["clients"])
    n_cols_du = min(len(all_clients_sorted), 2)
    n_rows_du = -(-len(all_clients_sorted) // n_cols_du)

    fig = make_subplots(
        rows=n_rows_du, cols=n_cols_du,
        subplot_titles=all_clients_sorted,
        vertical_spacing=0.12 / max(n_rows_du - 1, 1) * 2,
        horizontal_spacing=0.08,
    )

    for i, client in enumerate(all_clients_sorted):
        row = i // n_cols_du + 1
        col = i % n_cols_du + 1
        cdf = usage_df[usage_df["client"] == client].sort_values("timestamp")
        if not cdf.empty and cdf["value"].max() > 0:
            fig.add_trace(
                go.Scatter(
                    x=cdf["timestamp"], y=cdf["value_gb"],
                    name=client, showlegend=False,
                    line=dict(color="#636EFA"),
                ),
                row=row, col=col,
            )
        else:
            fig.add_trace(
                go.Scatter(x=[None], y=[None], showlegend=False, hoverinfo='skip'),
                row=row, col=col,
            )
            _n = (row - 1) * n_cols_du + col
            _s = "" if _n == 1 else str(_n)
            fig.add_annotation(
                text="No data available",
                xref=f"x{_s} domain", yref=f"y{_s} domain",
                x=0.5, y=0.5,
                showarrow=False,
                font=dict(size=12, color="#999"),
            )
        fig.update_yaxes(title_text="GB", row=row, col=col)

    fig.update_layout(
        title="Disk Usage per Client",
        height=270 * n_rows_du,
    )
    fig.show()

Network ThroughputΒΆ

Network receive (rx) and transmit (tx) throughput per container.

Show code
net_df = dfs["network"]

if net_df.empty:
    print("No network data available")
else:
    net_df["value_mb"] = net_df["value"] / (1024 * 1024)

    fig = make_subplots(
        rows=n_rows, cols=n_cols,
        subplot_titles=all_containers,
        vertical_spacing=0.12 / max(n_rows - 1, 1) * 2,
        horizontal_spacing=0.08,
    )

    colors = {"rx": "#636EFA", "tx": "#EF553B"}
    legend_added = set()

    for i, container in enumerate(all_containers):
        row = i // n_cols + 1
        col = i % n_cols + 1
        cdf = net_df[net_df["container"] == container]
        if not cdf.empty:
            for metric in ["rx", "tx"]:
                mdf = cdf[cdf["metric"] == metric].sort_values("timestamp")
                if mdf.empty:
                    continue
                show_legend = metric not in legend_added
                legend_added.add(metric)
                fig.add_trace(
                    go.Scatter(
                        x=mdf["timestamp"], y=mdf["value_mb"],
                        name=metric, legendgroup=metric,
                        showlegend=show_legend,
                        line=dict(color=colors[metric]),
                    ),
                    row=row, col=col,
                )
        else:
            fig.add_trace(
                go.Scatter(x=[None], y=[None], showlegend=False, hoverinfo='skip'),
                row=row, col=col,
            )
            _n = (row - 1) * n_cols + col
            _s = "" if _n == 1 else str(_n)
            fig.add_annotation(
                text="No data available",
                xref=f"x{_s} domain", yref=f"y{_s} domain",
                x=0.5, y=0.5,
                showarrow=False,
                font=dict(size=12, color="#999"),
            )
        fig.update_yaxes(title_text="MB/s", row=row, col=col)

    fig.update_layout(
        title="Network Throughput per Container (RX vs TX)",
        height=270 * n_rows,
    )
    fig.show()

SummaryΒΆ

Peak and average resource usage per container across the devnet.

Show code
# Build summary table across all resource types
summary_rows = []

# CPU
if not cpu_df.empty:
    for container, group in cpu_df.groupby("container"):
        summary_rows.append({
            "Container": container,
            "Avg CPU (cores)": f"{group['value'].mean():.3f}",
            "Peak CPU (cores)": f"{group['value'].max():.3f}",
        })

# Memory
if not mem_df.empty:
    ws_df = mem_df[mem_df["metric"] == "working_set"]
    for container, group in ws_df.groupby("container"):
        existing = next((r for r in summary_rows if r["Container"] == container), None)
        if existing is None:
            existing = {"Container": container}
            summary_rows.append(existing)
        existing["Avg Memory"] = format_bytes(group["value"].mean())
        existing["Peak Memory"] = format_bytes(group["value"].max())

# Network
if not net_df.empty:
    for container, group in net_df.groupby("container"):
        existing = next((r for r in summary_rows if r["Container"] == container), None)
        if existing is None:
            existing = {"Container": container}
            summary_rows.append(existing)
        rx = group[group["metric"] == "rx"]["value"]
        tx = group[group["metric"] == "tx"]["value"]
        if not rx.empty:
            existing["Avg RX"] = format_bytes_per_sec(rx.mean())
        if not tx.empty:
            existing["Avg TX"] = format_bytes_per_sec(tx.mean())

if summary_rows:
    summary_df = pd.DataFrame(summary_rows).set_index("Container").sort_index().fillna("-")
    display(summary_df)
else:
    print("No resource data available for summary.")
Avg CPU (cores) Peak CPU (cores) Avg Memory Peak Memory Avg RX Avg TX
Container
ethlambda_0 2.390 3.525 1.8 GB 2.6 GB 93.1 MB/s 138.6 MB/s
ethlambda_1 0.610 1.782 1.0 GB 2.8 GB 60.4 MB/s 88.7 MB/s
ethlambda_12 0.784 1.643 1.0 GB 1.6 GB 93.2 MB/s 138.7 MB/s
ethlambda_13 0.947 1.880 1.1 GB 1.9 GB 90.6 MB/s 133.1 MB/s
ethlambda_14 1.323 2.225 1.5 GB 2.9 GB 68.8 MB/s 146.1 MB/s
ethlambda_15 1.593 2.664 1.5 GB 3.3 GB 58.8 MB/s 74.1 MB/s
ethlambda_2 1.223 2.254 1.4 GB 2.7 GB 68.7 MB/s 145.9 MB/s
ethlambda_3 1.544 2.603 1.8 GB 5.2 GB 58.7 MB/s 74.0 MB/s
ethlambda_4 0.775 1.613 1.2 GB 3.0 GB 93.0 MB/s 138.5 MB/s
ethlambda_5 0.946 1.877 1.2 GB 2.5 GB 90.6 MB/s 133.1 MB/s
ethlambda_6 1.331 2.235 1.5 GB 2.7 GB 68.7 MB/s 145.9 MB/s
gean_0 3.101 5.361 4.6 GB 7.9 GB 108.2 MB/s 79.4 MB/s
gean_1 0.451 1.133 1.0 GB 1.4 GB 59.5 MB/s 60.0 MB/s
gean_10 0.599 0.988 1.1 GB 1.5 GB 103.8 MB/s 95.7 MB/s
gean_11 0.651 1.065 1.1 GB 1.5 GB 108.3 MB/s 97.2 MB/s
gean_12 0.548 0.908 1.1 GB 1.5 GB 108.7 MB/s 78.8 MB/s
gean_13 0.662 1.143 1001.0 MB 1.4 GB 89.3 MB/s 90.3 MB/s
gean_14 0.661 1.069 1.1 GB 1.5 GB 103.8 MB/s 95.7 MB/s
gean_15 0.697 1.308 1.1 GB 1.5 GB 108.3 MB/s 97.2 MB/s
gean_2 0.699 1.251 1.1 GB 1.6 GB 103.8 MB/s 95.8 MB/s
gean_3 0.679 1.156 1.1 GB 1.5 GB 108.3 MB/s 97.0 MB/s
gean_4 0.529 0.894 1.1 GB 1.5 GB 108.6 MB/s 78.9 MB/s
gean_5 0.578 0.989 1023.3 MB 1.4 GB 89.5 MB/s 90.3 MB/s
gean_6 0.643 1.080 1.1 GB 1.4 GB 103.9 MB/s 95.8 MB/s
gean_7 0.607 1.019 1.1 GB 1.5 GB 108.2 MB/s 97.1 MB/s
gean_8 0.505 0.839 1.0 GB 1.6 GB 108.4 MB/s 78.8 MB/s
gean_9 0.630 1.034 1.0 GB 1.5 GB 89.5 MB/s 90.4 MB/s
nlean_0 4.403 6.157 3.4 GB 4.1 GB 75.6 MB/s 66.7 MB/s
nlean_1 1.250 1.765 3.3 GB 5.6 GB 39.8 MB/s 36.1 MB/s
nlean_10 1.389 1.676 3.3 GB 3.6 GB 109.1 MB/s 58.8 MB/s
nlean_11 1.110 1.814 4.3 GB 6.1 GB 130.3 MB/s 48.4 MB/s
nlean_12 0.381 0.615 3.5 GB 5.1 GB 75.8 MB/s 66.9 MB/s
nlean_13 1.287 1.804 3.4 GB 4.9 GB 59.7 MB/s 54.1 MB/s
nlean_14 1.394 1.702 3.8 GB 4.3 GB 108.8 MB/s 58.9 MB/s
nlean_15 1.020 1.802 2.6 GB 3.3 GB 130.3 MB/s 48.4 MB/s
nlean_2 1.405 1.654 3.3 GB 3.9 GB 108.9 MB/s 58.8 MB/s
nlean_3 1.086 1.477 2.2 GB 3.0 GB 130.4 MB/s 48.6 MB/s
nlean_4 0.449 0.749 2.7 GB 3.7 GB 75.6 MB/s 66.7 MB/s
nlean_5 1.088 1.679 3.3 GB 4.3 GB 59.5 MB/s 54.1 MB/s
nlean_6 1.374 1.648 2.7 GB 3.4 GB 108.5 MB/s 58.7 MB/s
nlean_7 1.228 1.883 2.7 GB 3.3 GB 130.3 MB/s 48.4 MB/s
nlean_8 0.402 0.533 2.5 GB 3.6 GB 75.6 MB/s 66.7 MB/s
nlean_9 1.377 1.947 3.1 GB 4.7 GB 59.5 MB/s 54.1 MB/s
zeam_0 0.999 2.705 3.0 GB 3.6 GB 13.9 MB/s 14.4 MB/s
zeam_1 0.248 1.321 3.6 GB 4.1 GB 13.2 MB/s 12.4 MB/s
zeam_10 0.344 1.128 2.6 GB 3.1 GB 21.4 MB/s 26.8 MB/s
zeam_11 0.373 1.280 2.8 GB 3.6 GB 22.4 MB/s 24.0 MB/s
zeam_12 - - 2.9 MB 4.4 MB - -
zeam_14 - - 2.1 MB 2.1 MB - -
zeam_15 - - 1.6 MB 1.6 MB - -
zeam_2 0.364 1.231 2.8 GB 3.4 GB 21.4 MB/s 26.8 MB/s
zeam_3 0.326 1.240 2.9 GB 3.5 GB 19.3 MB/s 20.6 MB/s
zeam_4 0.261 0.984 2.3 GB 2.7 GB 13.9 MB/s 14.4 MB/s
zeam_5 0.269 1.077 2.3 GB 2.8 GB 18.8 MB/s 17.8 MB/s
zeam_6 0.340 1.088 2.3 GB 2.8 GB 21.4 MB/s 26.8 MB/s
zeam_7 0.285 1.049 2.3 GB 2.8 GB 19.2 MB/s 20.6 MB/s
zeam_8 0.304 0.982 2.3 GB 2.7 GB 16.2 MB/s 16.7 MB/s
zeam_9 0.309 1.199 2.5 GB 3.2 GB 18.8 MB/s 17.8 MB/s
Show code
print(f"Devnet: {devnet_id}")
if devnet_info:
    print(f"Duration: {devnet_info['duration_hours']:.1f} hours")
print(f"Containers analyzed: {cpu_df['container'].nunique() if not cpu_df.empty else 0}")
Devnet: pqdevnet-20260513T1731Z
Duration: 1.0 hours
Containers analyzed: 55