Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

teh-cmc
Copy link
Member

@teh-cmc teh-cmc commented Jul 10, 2025

It does what you think it does... but with a twist! It can also compute state at the transport-layer, which is very handy as it allows us to measure things that are very important for Redap, e.g. how much on-disk data is schema vs. data.

$ pixi run rerun-release rrd stats /droid/ILIAD/*.rrd 

Overview
----------
num_entity_paths = 60
num_chunks = 341 794
num_chunks_without_components = 0 (0.000%)
num_rows = 15 295 744
num_rows_min = 1
num_rows_max = 1 563
num_rows_avg = 45.297
num_static = 133 835
num_indexes_min = 0
num_indexes_max = 3
num_indexes_avg = 1.287
num_components_min = 1
num_components_max = 7
num_components_avg = 2.738

Num chunks per entity
---------------------
/__properties/episode: 2 059
/__properties/recording: 4 118
/__properties/robot: 2 059
/__properties/user: 2 059
/action/gripper_position: 4 118
/action/jointPositions: 4 118
/camera/ext1: 8 236
/camera/ext1/embedding: 2 059
/camera/ext2: 8 236
/camera/ext2/embedding: 2 059
/camera/wrist: 8 236
/camera/wrist/embedding: 2 059
/language_instruction: 4 118
/observation/gripper_position: 4 118
/observation/jointPositions: 4 118
/panda_link0/panda_link0_sc: 4 118
/panda_link0/panda_link1: 8 236
/panda_link0/panda_link1/panda_link1_sc: 4 118
/panda_link0/panda_link1/panda_link2: 8 236
/panda_link0/panda_link1/panda_link2/panda_link2_sc: 4 118
/panda_link0/panda_link1/panda_link2/panda_link3: 8 236
/panda_link0/panda_link1/panda_link2/panda_link3/panda_link3_sc: 4 118
/panda_link0/panda_link1/panda_link2/panda_link3/panda_link4: 8 236
/panda_link0/panda_link1/panda_link2/panda_link3/panda_link4/panda_link4_sc: 4 118
/panda_link0/panda_link1/panda_link2/panda_link3/panda_link4/panda_link5: 8 236
/panda_link0/panda_link1/panda_link2/panda_link3/panda_link4/panda_link5/panda_link5_sc: 4 118
/panda_link0/panda_link1/panda_link2/panda_link3/panda_link4/panda_link5/panda_link6: 8 236
/panda_link0/panda_link1/panda_link2/panda_link3/panda_link4/panda_link5/panda_link6/panda_link6_sc: 4 118
/panda_link0/panda_link1/panda_link2/panda_link3/panda_link4/panda_link5/panda_link6/panda_link7: 8 236
/panda_link0/panda_link1/panda_link2/panda_link3/panda_link4/panda_link5/panda_link6/panda_link7/panda_link7_sc: 4 118
/panda_link0/panda_link1/panda_link2/panda_link3/panda_link4/panda_link5/panda_link6/panda_link7/panda_link8: 4 118
/panda_link0/panda_link1/panda_link2/panda_link3/panda_link4/panda_link5/panda_link6/panda_link7/panda_link8/robotiq_85_base_link: 4 118
/panda_link0/panda_link1/panda_link2/panda_link3/panda_link4/panda_link5/panda_link6/panda_link7/panda_link8/robotiq_85_base_link/left_inner_knuckle: 8 236
/panda_link0/panda_link1/panda_link2/panda_link3/panda_link4/panda_link5/panda_link6/panda_link7/panda_link8/robotiq_85_base_link/left_inner_knuckle/left_inner_finger: 8 236
/panda_link0/panda_link1/panda_link2/panda_link3/panda_link4/panda_link5/panda_link6/panda_link7/panda_link8/robotiq_85_base_link/left_inner_knuckle/left_inner_finger/visual_0: 8 236
/panda_link0/panda_link1/panda_link2/panda_link3/panda_link4/panda_link5/panda_link6/panda_link7/panda_link8/robotiq_85_base_link/left_inner_knuckle/visual_0: 8 236
/panda_link0/panda_link1/panda_link2/panda_link3/panda_link4/panda_link5/panda_link6/panda_link7/panda_link8/robotiq_85_base_link/left_outer_knuckle: 8 236
/panda_link0/panda_link1/panda_link2/panda_link3/panda_link4/panda_link5/panda_link6/panda_link7/panda_link8/robotiq_85_base_link/left_outer_knuckle/left_outer_finger: 4 118
/panda_link0/panda_link1/panda_link2/panda_link3/panda_link4/panda_link5/panda_link6/panda_link7/panda_link8/robotiq_85_base_link/left_outer_knuckle/left_outer_finger/visual_0: 8 236
/panda_link0/panda_link1/panda_link2/panda_link3/panda_link4/panda_link5/panda_link6/panda_link7/panda_link8/robotiq_85_base_link/left_outer_knuckle/visual_0: 8 236
/panda_link0/panda_link1/panda_link2/panda_link3/panda_link4/panda_link5/panda_link6/panda_link7/panda_link8/robotiq_85_base_link/right_inner_knuckle: 8 236
/panda_link0/panda_link1/panda_link2/panda_link3/panda_link4/panda_link5/panda_link6/panda_link7/panda_link8/robotiq_85_base_link/right_inner_knuckle/right_inner_finger: 8 236
/panda_link0/panda_link1/panda_link2/panda_link3/panda_link4/panda_link5/panda_link6/panda_link7/panda_link8/robotiq_85_base_link/right_inner_knuckle/right_inner_finger/visual_0: 8 236
/panda_link0/panda_link1/panda_link2/panda_link3/panda_link4/panda_link5/panda_link6/panda_link7/panda_link8/robotiq_85_base_link/right_inner_knuckle/visual_0: 8 236
/panda_link0/panda_link1/panda_link2/panda_link3/panda_link4/panda_link5/panda_link6/panda_link7/panda_link8/robotiq_85_base_link/right_outer_knuckle: 8 236
/panda_link0/panda_link1/panda_link2/panda_link3/panda_link4/panda_link5/panda_link6/panda_link7/panda_link8/robotiq_85_base_link/right_outer_knuckle/right_outer_finger: 4 118
/panda_link0/panda_link1/panda_link2/panda_link3/panda_link4/panda_link5/panda_link6/panda_link7/panda_link8/robotiq_85_base_link/right_outer_knuckle/right_outer_finger/visual_0: 8 236
/panda_link0/panda_link1/panda_link2/panda_link3/panda_link4/panda_link5/panda_link6/panda_link7/panda_link8/robotiq_85_base_link/right_outer_knuckle/visual_0: 8 236
/panda_link0/panda_link1/panda_link2/panda_link3/panda_link4/panda_link5/panda_link6/panda_link7/panda_link8/robotiq_85_base_link/visual_0: 8 236
/panda_link0/panda_link1/panda_link2/panda_link3/panda_link4/panda_link5/panda_link6/panda_link7/visual_0: 4 118
/panda_link0/panda_link1/panda_link2/panda_link3/panda_link4/panda_link5/panda_link6/visual_0: 4 118
/panda_link0/panda_link1/panda_link2/panda_link3/panda_link4/panda_link5/visual_0: 4 118
/panda_link0/panda_link1/panda_link2/panda_link3/panda_link4/visual_0: 4 118
/panda_link0/panda_link1/panda_link2/panda_link3/visual_0: 4 118
/panda_link0/panda_link1/panda_link2/visual_0: 4 118
/panda_link0/panda_link1/visual_0: 4 118
/panda_link0/visual_0: 4 118
/thumbnail/camera/ext1: 4 118
/thumbnail/camera/ext2: 4 118
/thumbnail/camera/wrist: 4 118

Num chunks per index
--------------------
log_tick: 115 304
log_time: 115 304
real_time: 203 841

Num chunks per component
------------------------
AssetVideo:blob: 6 177
AssetVideo:media_type: 6 177
EncodedImage:blob: 6 177
EncodedImage:media_type: 6 177
Mesh3D:albedo_texture_buffer: 12 354
Mesh3D:albedo_texture_format: 12 354
Mesh3D:triangle_indices: 35 003
Mesh3D:vertex_colors: 22 649
Mesh3D:vertex_normals: 35 003
Mesh3D:vertex_positions: 35 003
Mesh3D:vertex_texcoords: 12 354
RecordingProperties:start_time: 2 059
Scalars:scalars: 8 236
TextDocument:text: 2 059
Transform3D:axis_length: 70 006
Transform3D:mat3x3: 96 773
Transform3D:quaternion: 70 006
Transform3D:relation: 70 006
Transform3D:rotation_axis_angle: 70 006
Transform3D:scale: 70 006
Transform3D:translation: 84 419
VideoFrameReference:timestamp: 6 177
building: 2 059
embeddings: 6 177
id: 2 059
lab: 2 059
name: 2 059
rerun.components.AssetVideoIndicator: 6 177
rerun.components.EncodedImageIndicator: 6 177
rerun.components.Mesh3DIndicator: 35 003
rerun.components.RecordingPropertiesIndicator: 2 059
rerun.components.ScalarsIndicator: 8 236
rerun.components.TextDocumentIndicator: 2 059
rerun.components.Transform3DIndicator: 96 773
rerun.components.VideoFrameReferenceIndicator: 6 177
scene_id: 2 059
serial: 2 059
success: 2 059
trajectory_length: 2 059

Size (schema + data, compressed)
--------------------------------
ipc_size_bytes_total = 86.9 GiB
ipc_size_bytes_min = 1.4 KiB
ipc_size_bytes_max = 51.3 MiB
ipc_size_bytes_avg = 270 KiB
ipc_size_bytes_p50 = 2.8 KiB
ipc_size_bytes_p90 = 167 KiB
ipc_size_bytes_p95 = 1.5 MiB
ipc_size_bytes_p99 = 6.9 MiB
ipc_size_bytes_p999 = 17.6 MiB

Size (schema + data, uncompressed)
----------------------------------
ipc_size_bytes_total = 86.9 GiB
ipc_size_bytes_min = 1.4 KiB
ipc_size_bytes_max = 51.3 MiB
ipc_size_bytes_avg = 270 KiB
ipc_size_bytes_p50 = 2.8 KiB
ipc_size_bytes_p90 = 167 KiB
ipc_size_bytes_p95 = 1.5 MiB
ipc_size_bytes_p99 = 6.9 MiB
ipc_size_bytes_p999 = 17.6 MiB

Size (schema only, uncompressed)
--------------------------------
ipc_size_bytes_total = 687 MiB
ipc_size_bytes_min = 888 B
ipc_size_bytes_max = 4.4 KiB
ipc_size_bytes_avg = 2.1 KiB
ipc_size_bytes_p50 = 1.6 KiB
ipc_size_bytes_p90 = 4.3 KiB
ipc_size_bytes_p95 = 4.4 KiB
ipc_size_bytes_p99 = 4.4 KiB
ipc_size_bytes_p999 = 4.4 KiB

Size (data only, uncompressed)
------------------------------
ipc_size_bytes_total = 86.2 GiB
ipc_size_bytes_min = 528 B
ipc_size_bytes_max = 51.3 MiB
ipc_size_bytes_avg = 268 KiB
ipc_size_bytes_p50 = 1.1 KiB
ipc_size_bytes_p90 = 165 KiB
ipc_size_bytes_p95 = 1.5 MiB
ipc_size_bytes_p99 = 6.9 MiB
ipc_size_bytes_p999 = 17.6 MiB

@teh-cmc teh-cmc added 🧑‍💻 dev experience developer experience (excluding CI) 📉 performance Optimization, memory use, etc include in changelog 🪵 Log & send APIs Affects the user-facing API for all languages labels Jul 10, 2025
Copy link

github-actions bot commented Jul 10, 2025

Web viewer built successfully. If applicable, you should also test it:

  • I have tested the web viewer
Result Commit Link Manifest
bfe5355 https://rerun.io/viewer/pr/10593 +nightly +main

Note: This comment is updated whenever you push a commit.

Copy link
Member

@Wumpf Wumpf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks super useful!
code lgtm, seemed all very sane


match res {
Ok(msg) => {
num_chunks += 1;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's technically arbitrary messages an not chunks as not every message is a chunk. Not that it makes much difference in practice. Shouldn't that go only in the Ok(Some()) below? Since that's only used for rate printing it would be more accurate to just call it num_msg_processed and print as much

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

woops

uncompressed.as_slice()
}

huh => anyhow::bail!("unknown Compression: {huh}"),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

huh :D

let schema = decoded.batch.schema();

let entity_path = {
let entity_path = schema.metadata().get("rerun:entity_path");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we have access to constants for all these metadata names here? It's not like we never rename those and you dont'have any tests in here so the tool might silently break :/

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've purposefully written this as if I was an external user building their own little independent data crunching tool. Part of the value of Sorbet is that it's supposed to give me a stable ABI that I can target: I think it's more than time to put that promise to the test, especially now that we are starting to build datasets that cannot possibly be re-regenerated from scratch.

) {
let path_to_input_rrds = paths
.iter()
.filter(|s| !s.is_empty()) // Avoid a problem with `pixi run check-backwards-compatibility`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... it passes in empty quoted paths?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no idea, this is very old code

@teh-cmc teh-cmc merged commit 1490789 into main Jul 11, 2025
39 of 40 checks passed
@teh-cmc teh-cmc deleted the cmc/rrd_stats branch July 11, 2025 10:07
teh-cmc added a commit that referenced this pull request Jul 11, 2025
Title.

In particular this:
* Fixes a nasty `O(n**2)` that slipped in, bringing back performance to
sub-linear levels.
* Introduction compaction passes in the CLI, which is super important to
get the most out of compaction in offline scenarios.

```sh
$ pixi run rerun-release rrd compact problematic.rrd -o compacted.rrd --max-rows 999999999 --max-bytes 1048576 --num-pass 50

# [...]

[2025-07-10T17:44:58Z INFO  rerun::commands::rrd::merge_compact] processed 1289999 messages so far, current speed is 19312.92 msg/s
[2025-07-10T17:44:58Z INFO  rerun::commands::rrd::merge_compact] processed 1299999 messages so far, current speed is 19985.97 msg/s
[2025-07-10T17:44:59Z INFO  rerun::commands::rrd::merge_compact] processed 1309999 messages so far, current speed is 19466.20 msg/s
[2025-07-10T17:44:59Z INFO  rerun::commands::rrd::merge_compact] processed 1319999 messages so far, current speed is 18687.46 msg/s
[2025-07-10T17:45:00Z INFO  rerun::commands::rrd::merge_compact] processed 1329999 messages so far, current speed is 17226.69 msg/s
[2025-07-10T17:45:00Z INFO  rerun::commands::rrd::merge_compact] processed 1339999 messages so far, current speed is 18906.00 msg/s
[2025-07-10T17:45:01Z INFO  rerun::commands::rrd::merge_compact] processed 1349999 messages so far, current speed is 17622.72 msg/s
[2025-07-10T17:45:01Z INFO  rerun::commands::rrd::merge_compact] processed 1359999 messages so far, current speed is 18320.93 msg/s
[2025-07-10T17:45:02Z INFO  rerun::commands::rrd::merge_compact] processed 1369999 messages so far, current speed is 19278.27 msg/s
[2025-07-10T17:45:03Z INFO  rerun::commands::rrd::merge_compact] processed 1379999 messages so far, current speed is 19101.29 msg/s
[2025-07-10T17:45:03Z INFO  rerun::commands::rrd::merge_compact] processed 1389999 messages so far, current speed is 20092.77 msg/s
[2025-07-10T17:45:04Z INFO  rerun::commands::rrd::merge_compact] processed 1399999 messages so far, current speed is 19879.84 msg/s
[2025-07-10T17:45:04Z INFO  rerun::commands::rrd::merge_compact] processed 1409999 messages so far, current speed is 19367.66 msg/s
[2025-07-10T17:45:05Z INFO  rerun::commands::rrd::merge_compact] processed 1419999 messages so far, current speed is 19952.79 msg/s
[2025-07-10T17:45:05Z INFO  rerun::commands::rrd::merge_compact] processed 1429999 messages so far, current speed is 20056.93 msg/s
[2025-07-10T17:45:06Z INFO  rerun::commands::rrd::merge_compact] processed 1439999 messages so far, current speed is 20823.57 msg/s
[2025-07-10T17:45:06Z INFO  rerun::commands::rrd::merge_compact] running extra compaction pass… pass=0
[2025-07-10T17:45:13Z INFO  rerun::commands::rrd::merge_compact] extra compaction pass completed pass=0 num_chunks_before=361505 num_chunks_after=184543 num_chunks_reduction="-48.951%" time=6.730054646s
[2025-07-10T17:45:13Z INFO  rerun::commands::rrd::merge_compact] running extra compaction pass… pass=1
[2025-07-10T17:45:16Z INFO  rerun::commands::rrd::merge_compact] extra compaction pass completed pass=1 num_chunks_before=184543 num_chunks_after=96366 num_chunks_reduction="-47.781%" time=3.892597363s
[2025-07-10T17:45:16Z INFO  rerun::commands::rrd::merge_compact] running extra compaction pass… pass=2
[2025-07-10T17:45:18Z INFO  rerun::commands::rrd::merge_compact] extra compaction pass completed pass=2 num_chunks_before=96366 num_chunks_after=54254 num_chunks_reduction="-43.700%" time=1.549344247s
[2025-07-10T17:45:18Z INFO  rerun::commands::rrd::merge_compact] running extra compaction pass… pass=3
[2025-07-10T17:45:19Z INFO  rerun::commands::rrd::merge_compact] extra compaction pass completed pass=3 num_chunks_before=54254 num_chunks_after=33331 num_chunks_reduction="-38.565%" time=762.644953ms
[2025-07-10T17:45:19Z INFO  rerun::commands::rrd::merge_compact] running extra compaction pass… pass=4
[2025-07-10T17:45:19Z INFO  rerun::commands::rrd::merge_compact] extra compaction pass completed pass=4 num_chunks_before=33331 num_chunks_after=22876 num_chunks_reduction="-31.367%" time=486.387978ms
[2025-07-10T17:45:19Z INFO  rerun::commands::rrd::merge_compact] running extra compaction pass… pass=5
[2025-07-10T17:45:20Z INFO  rerun::commands::rrd::merge_compact] extra compaction pass completed pass=5 num_chunks_before=22876 num_chunks_after=17652 num_chunks_reduction="-22.836%" time=313.659082ms
[2025-07-10T17:45:20Z INFO  rerun::commands::rrd::merge_compact] running extra compaction pass… pass=6
[2025-07-10T17:45:20Z INFO  rerun::commands::rrd::merge_compact] extra compaction pass completed pass=6 num_chunks_before=17652 num_chunks_after=15042 num_chunks_reduction="-14.786%" time=232.602897ms
[2025-07-10T17:45:20Z INFO  rerun::commands::rrd::merge_compact] running extra compaction pass… pass=7
[2025-07-10T17:45:20Z INFO  rerun::commands::rrd::merge_compact] extra compaction pass completed pass=7 num_chunks_before=15042 num_chunks_after=13739 num_chunks_reduction="-8.662%" time=192.348912ms
[2025-07-10T17:45:20Z INFO  rerun::commands::rrd::merge_compact] running extra compaction pass… pass=8
[2025-07-10T17:45:20Z INFO  rerun::commands::rrd::merge_compact] extra compaction pass completed pass=8 num_chunks_before=13739 num_chunks_after=13088 num_chunks_reduction="-4.738%" time=163.27111ms
[2025-07-10T17:45:20Z INFO  rerun::commands::rrd::merge_compact] running extra compaction pass… pass=9
[2025-07-10T17:45:20Z INFO  rerun::commands::rrd::merge_compact] extra compaction pass completed pass=9 num_chunks_before=13088 num_chunks_after=12822 num_chunks_reduction="-2.032%" time=124.721993ms
[2025-07-10T17:45:20Z INFO  rerun::commands::rrd::merge_compact] running extra compaction pass… pass=10
[2025-07-10T17:45:20Z INFO  rerun::commands::rrd::merge_compact] extra compaction pass completed pass=10 num_chunks_before=12822 num_chunks_after=12686 num_chunks_reduction="-1.061%" time=136.477701ms
[2025-07-10T17:45:20Z INFO  rerun::commands::rrd::merge_compact] running extra compaction pass… pass=11
[2025-07-10T17:45:21Z INFO  rerun::commands::rrd::merge_compact] extra compaction pass completed pass=11 num_chunks_before=12686 num_chunks_after=12635 num_chunks_reduction="-0.402%" time=140.33912ms
[2025-07-10T17:45:21Z INFO  rerun::commands::rrd::merge_compact] running extra compaction pass… pass=12
[2025-07-10T17:45:21Z INFO  rerun::commands::rrd::merge_compact] extra compaction pass completed pass=12 num_chunks_before=12635 num_chunks_after=12634 num_chunks_reduction="-0.008%" time=87.742732ms
[2025-07-10T17:45:21Z INFO  rerun::commands::rrd::merge_compact] running extra compaction pass… pass=13
[2025-07-10T17:45:21Z INFO  rerun::commands::rrd::merge_compact] extra compaction pass completed pass=13 num_chunks_before=12634 num_chunks_after=12634 num_chunks_reduction="-0.000%" time=85.48635ms
[2025-07-10T17:45:21Z INFO  rerun::commands::rrd::merge_compact] cannot possibly improve further, stopping early pass=13 time=85.50556ms
[2025-07-10T17:45:22Z INFO  rerun::commands::rrd::merge_compact] preparing output…
[2025-07-10T17:45:22Z INFO  rerun::commands::rrd::merge_compact] encoding…
[2025-07-10T17:45:28Z INFO  rerun::commands::rrd::merge_compact] merge/compaction finished srcs=["problematic.rrd"] time=94.480722097s num_chunks_before=1446008 num_chunks_after=12634 num_chunks_reduction="-99.126%" srcs_size_bytes=9.2 GiB dst_size_bytes=7.3 GiB size_reduction="-20.822%"
```

---


* DNM: requires #10593
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧑‍💻 dev experience developer experience (excluding CI) include in changelog 🪵 Log & send APIs Affects the user-facing API for all languages 📉 performance Optimization, memory use, etc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants