Skip to content

Add support for --memory-limit= as a Client option on Linux#343

Draft
codedeliveryservice wants to merge 13 commits into
AndyGrant:masterfrom
codedeliveryservice:memory-limit
Draft

Add support for --memory-limit= as a Client option on Linux#343
codedeliveryservice wants to merge 13 commits into
AndyGrant:masterfrom
codedeliveryservice:memory-limit

Conversation

@codedeliveryservice

@codedeliveryservice codedeliveryservice commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Peak bench memory is measured as described in #337. To account for differences in hash size, each engine's default hash is fetched directly via uci and subtracted from its requested Hash=....

The option expects a value in MB (--memory-limit 8192).

Running 4x Benchmarks for master
Bench for master is 2946917
Speed for master is 1367822
Peak memory for master is 89.41 MB

Running 4x Benchmarks for master
Bench for master is 2946917
Speed for master is 1659443
Peak memory for master is 89.46 MB

Estimated memory required: 1487.00 MB

If the estimation exceeds the limit, an exception is thrown and the workload is blacklisted on the client side, so it won't be requested again, e.g.:

utils.OpenBenchInsufficientMemoryException: [Error] Insufficient memory to run this Workload (required: 1487.00 MB, limit: 1024.00 MB)

@AndyGrant

Copy link
Copy Markdown
Owner

Looks very solid. Might make some mostly cosmetic changes to the reporting, and to track in terms of kb (+var name). Going to wire this up with the bench_all, so I can hit some openbench frameworks with a slew of engines, and make sure everything goes as expected. Might need to slap something in there for Windows as well.

Make take me some time to get to however.

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.

2 participants