Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
JinZhou5042 committed Jan 24, 2025
1 parent 95c3e9e commit 81b1055
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions taskvine/src/manager/vine_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -2724,9 +2724,6 @@ struct rmsummary *vine_manager_choose_resources_for_task(struct vine_manager *q,
* thus the proportion is modified by the current overcommit
* multiplier */
limits->disk = MAX(1, MAX(limits->disk, floor(available_disk * max_proportion / q->resource_submit_multiplier)));
/* For disk, scale the estimated disk allocation by a [0, 1] number (by default 0.75) to intentionally reserve
* some space for data movement between the sandbox and cache (output files) and allow room for cache growth. */
limits->disk *= q->disk_proportion_available_to_task;
}
}

Expand Down Expand Up @@ -2774,6 +2771,12 @@ struct rmsummary *vine_manager_choose_resources_for_task(struct vine_manager *q,
limits->disk = available_disk;
}

if (q->proportional_resources) {
/* For disk, if using proportional allocation, scale the estimated disk allocation by a [0, 1] factor (by default 0.75) to intentionally
* reserve some space for data movement between the sandbox and cache, and allow extra room for potential cache growth. */
limits->disk *= q->disk_proportion_available_to_task;
}

/* never go below specified min resources. */
rmsummary_merge_max(limits, min);

Expand Down

0 comments on commit 81b1055

Please sign in to comment.