Skip to content

Increase the scale example from book runs away grabbing memory when input exceeds 2^10 #524

@jacg

Description

@jacg

I am trying to follow the examples in the Differential Dataflow book, and run into a problem in the Increase the scale section.

With CLI args up to 1024, the code completes in under a millisecond. As soon as the argument exceeds 1024, the program maxes out one CPU core and continues to grab memory until I kill it by hand. I have observed it grab as much as 15 Gigabytes.

Here is a flamegraph of stack samples when this happens:

flamegraph-1025

As there seems to be no complete sample of the code at that stage, and I have to derive it by applying the changes suggested in the text to earlier versions of the code, I cannot be sure that I haven't made a mistake. Nevertheless, the drastic step function change in behaviour seems unlikely to be caused by my misinterpreting the instructions.

I am using Rust 1.81.0, on Linux (NixOS).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions