Skip to content

Don’t reuse huge string in test to save 4 GB RAM at runtime #79

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 31, 2025

Conversation

sergv
Copy link
Contributor

@sergv sergv commented May 31, 2025

Alleviate problem outlined in #78. With this patch +RTS -s shows:

  10,770,313,192 bytes allocated in the heap
     920,616,472 bytes copied during GC
   4,073,228,872 bytes maximum residency (11 sample(s))
     492,406,200 bytes maximum slop
            4922 MiB total memory in use (96 MiB lost due to fragmentation)

as opposed to baseline

  14,101,300,272 bytes allocated in the heap
     406,182,704 bytes copied during GC
   8,283,161,920 bytes maximum residency (7 sample(s))
     487,512,768 bytes maximum slop
            8975 MiB total memory in use (99 MiB lost due to fragmentation)

@sergv sergv force-pushed the optimise-large-chunk-test branch from 8c81af6 to 3fe3a3a Compare May 31, 2025 19:16
@sergv sergv force-pushed the optimise-large-chunk-test branch from 3fe3a3a to bdbafe0 Compare May 31, 2025 19:17
@sergv sergv changed the title Don’t reuse huge string to save 4 GB RAM at runtime Don’t reuse huge string in test to save 4 GB RAM at runtime May 31, 2025
@Bodigrim Bodigrim merged commit 6dbc77e into haskell:master May 31, 2025
33 checks passed
@sergv sergv deleted the optimise-large-chunk-test branch June 10, 2025 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Executing check compress large chunk test on 64-bit machines with modest RAM capacity is harmful
2 participants