Skip to content

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

Merged
Bodigrim merged 1 commit intohaskell:masterfrom
sergv:optimise-large-chunk-test
May 31, 2025
Merged

Don’t reuse huge string in test to save 4 GB RAM at runtime#79
Bodigrim merged 1 commit intohaskell:masterfrom
sergv:optimise-large-chunk-test

Conversation

@sergv
Copy link
Copy Markdown
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