Skip to content

scripts: make Nyx VM memory size configurable - #169

Merged
morehouse merged 1 commit into
morehouse:masterfrom
Chand-ra:vm_image
Aug 4, 2026
Merged

scripts: make Nyx VM memory size configurable#169
morehouse merged 1 commit into
morehouse:masterfrom
Chand-ra:vm_image

Conversation

@Chand-ra

Copy link
Copy Markdown

The memory allocation for Nyx VM instances is hardcoded to 4096 MB during the packer configuration generation step.

Introduce the VM_SIZE environment variable, allowing users to dynamically scale the VM memory down for resource-constrained deployments such as parallel fuzzing trials.

Retain the default 4096 MB fallback if the variable is unset and echo the chosen size to stdout for better setup observability.

@erickcestari erickcestari left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Maybe we could also reduce the default value. I haven't tested other values, but a lower default should make it easier to run more fuzzing jobs in parallel.

I have a dedicated server with 62 GiB of RAM, and it can run at most 15 fuzzing instances simultaneously.

@Chand-ra

Chand-ra commented Jul 28, 2026

Copy link
Copy Markdown
Author

LGTM! Maybe we could also reduce the default value. I haven't tested other values, but a lower default should make it easier to run more fuzzing jobs in parallel.

I have a dedicated server with 62 GiB of RAM, and it can run at most 15 fuzzing instances simultaneously.

Agreed. I've ran a lot of trials with 2048 as the image size and haven't ever had any problems with it, but I remember @NishantBansal2003 telling me once that it caused some issues with his setup for Eclair or CLN.

I personally prefer that as the default value and can vouch for it working fine, but let us see what others have to say.

@NishantBansal2003 NishantBansal2003 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Agreed. I've ran a lot of trials with 2048 as the image size and haven't ever had any problems with it, but I remember @NishantBansal2003 telling me once that it caused some issues with his setup for Eclair or CLN.

I had issues with the nested virtualization setup, though the machine specs were not quite good, so I didn’t expect good results. On my dedicated machine, I lowered the VM size to 2048 and tried running the CLN campaign, and I haven’t faced any issues though

Comment thread scripts/setup-nyx.sh Outdated
Comment thread scripts/setup-nyx.sh
The memory allocation for Nyx VM instances is hardcoded to 4096 MB
during the packer configuration generation step.

Introduce the `NYX_MEM_MB` environment variable, allowing users to
dynamically scale the VM memory down for resource-constrained
deployments such as parallel fuzzing trials.

Use the default as 2048 MB fallback if the variable is unset and
`echo` the chosen size to stdout for better setup observability.
@Chand-ra

Copy link
Copy Markdown
Author

Since no one seems to have a problem with it, I have changed the default to 2048 MB.

@morehouse morehouse left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested the lower 2GB memory limit by fuzzing the IR scenario against all targets for 1h. No issues encountered.

@morehouse
morehouse merged commit 085ed95 into morehouse:master Aug 4, 2026
5 checks passed
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.

4 participants