Skip to content

Commit

Permalink
add resource limit
Browse files Browse the repository at this point in the history
  • Loading branch information
barnabasbusa committed Dec 12, 2023
1 parent c294c5a commit 227f04d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/blobber/blobber_launcher.star
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ BLOBBER_USED_PORTS = {
),
}

# The min/max CPU/memory that blobbers can use
MIN_CPU = 10
MAX_CPU = 500
MIN_MEMORY = 10
MAX_MEMORY = 300

def launch(plan, service_name, node_keystore_files, beacon_http_url, extra_params):
blobber_service_name = "{0}".format(service_name)
Expand Down Expand Up @@ -64,4 +69,8 @@ def get_config(service_name, node_keystore_files, beacon_http_url, extra_params)
},
cmd=cmd,
private_ip_address_placeholder=PRIVATE_IP_ADDRESS_PLACEHOLDER,
min_cpu=MIN_CPU,
max_cpu=MAX_CPU,
min_memory=MIN_MEMORY,
max_memory=MAX_MEMORY,
)

0 comments on commit 227f04d

Please sign in to comment.