Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions jepsen/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ Vagrant.configure("2") do |config|

# VirtualBox (Intel) defaults
node.vm.provider "virtualbox" do |vb|
vb.memory = name == :ctrl ? 4096 : 2048
vb.memory = name == :ctrl ? 2048 : 1024
vb.cpus = 2
end

# UTM (Apple Silicon) defaults
node.vm.provider "utm" do |utm|
utm.memory = name == :ctrl ? 4096 : 2048
utm.memory = name == :ctrl ? 2048 : 1024
Comment on lines +22 to +28
Copy link
Contributor

Choose a reason for hiding this comment

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

high

Halving the memory allocation for both VirtualBox and UTM providers is a significant change that could impact the stability of the Jepsen test environment.

  • Control Node (2GB): The control node runs Jepsen (on a JVM) and compiles Go code. Both are memory-intensive operations, and 2GB might be insufficient, leading to Out-Of-Memory errors or slow performance.
  • Worker Nodes (1GB): The worker nodes run the elastickv service. 1GB of RAM might not be enough, depending on the service's memory footprint, especially under test load.

This change introduces a high risk of making the test environment unreliable.

For better maintainability and to avoid duplicating the memory values, consider defining them as variables at a higher scope. This would also make it easier for other developers to adjust them based on their system's resources.

Example:

# At the top of the Vagrantfile
CTRL_MEM = 2048
NODE_MEM = 1024

# ... then in the provider blocks
vb.memory = name == :ctrl ? CTRL_MEM : NODE_MEM
# and
utm.memory = name == :ctrl ? CTRL_MEM : NODE_MEM

Even better would be to allow overriding from environment variables:

CTRL_MEM = ENV.fetch('VAGRANT_CTRL_MEM', 2048)
NODE_MEM = ENV.fetch('VAGRANT_NODE_MEM', 1024)

utm.cpus = 2
end

Expand Down
Loading