Skip to content

Reduce object-bits for test to avoid OOM - #3511

Merged
zhassan-aws merged 2 commits into
model-checking:mainfrom
zhassan-aws:modify-stub-test
Sep 9, 2024
Merged

Reduce object-bits for test to avoid OOM#3511
zhassan-aws merged 2 commits into
model-checking:mainfrom
zhassan-aws:modify-stub-test

Conversation

@zhassan-aws

Copy link
Copy Markdown
Contributor

Kani often runs out of memory on tests/expected/function-contract/history/stub.rs when running the regressions. In particular, quadruple_harness consumes over 9 GB of memory. This PR reduces the object bits for this test to 8 to avoid OOM issues. This brings down memory usage to ~125 MB.

Before:

$ /usr/bin/time -v kani -Zfunction-contracts stub.rs --harness quadruple_harness
Maximum resident set size (kbytes): 9136036

After:

$ /usr/bin/time -v kani -Zfunction-contracts stub.rs --harness quadruple_harness --enable-unstable --cbmc-args --object-bits 8
...
Maximum resident set size (kbytes): 125172

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.

@zhassan-aws
zhassan-aws requested a review from a team as a code ownerSeptember 9, 2024 19:00
@zhassan-aws
zhassan-aws added this pull request to the merge queueSep 9, 2024
Merged via the queue into model-checking:main with commit 5f6de6eSep 9, 2024
@zhassan-aws
zhassan-aws deleted the modify-stub-test branch September 9, 2024 20:58
@celinval

Copy link
Copy Markdown
Contributor

I wonder if we should tweak with the current default

@zhassan-aws

Copy link
Copy Markdown
ContributorAuthor

I tried tweaking the test, but eventually gave up. For example, switching from 32-bit integers to 16 or 8-bits does not decrease the memory usage much.

I'm open to suggestions.

@celinvalcelinval mentioned this pull request Oct 8, 2024
Sign up for freeto 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.

3 participants

@zhassan-aws@celinval@feliperodri