Add per-cpu and per-task boot disk IOPS and throughput options - #52
Open
eastagiletracker wants to merge 1 commit into
Open
Conversation
|
Important Review available on request
Reviews should be triggered manually for repositories with fewer than 10 stars. Select Trigger review above or comment ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR proposes adding per-CPU and per-task versions of the
boot_disk_iopsandboot_disk_throughputoptions (Fixes #8). We include this PR work along with a full history of your repo at https://eastagiletracker.com/projects/359. You can sign in with your GitHub ID to claim ownership of the project.What changed and why
Issue #8 notes that
boot_disk_iopsandboot_disk_throughputare absolute values, while many other parameters also have per-CPU and per-task forms.docs/config.rstdocumented that limitation directly: "this is an absolute value and is not scaled by the number of vCPUs or tasks". The practical effect is that one configuration cannot provision proportional disk performance across instance types of different sizes — a value that suits a 2-vCPU instance starves a 32-vCPU one, and a value sized for the large instance overprovisions every small one.Reproduced on
mainat 482c093:This adds
boot_disk_iops_per_cpu,boot_disk_iops_per_task,boot_disk_throughput_per_cpu, andboot_disk_throughput_per_tasktoRunConfig, with the matching command line options, following the shape of the existingboot_disk_per_cpuandboot_disk_per_tasksize options. The arithmetic lives in a newInstanceManager._get_boot_disk_provisioned_amount()alongside_get_boot_disk_size()and mirrors it: the amount is the maximum of the absolute value, the per-vCPU value times the number of vCPUs, and the per-task value timesvcpu // cpus_per_task, so the absolute option now acts as a floor. The result is rounded up, so a disk is never provisioned below what was asked for.GCPComputeInstanceManager.get_available_instance_types()resolves both amounts per instance type at the point where it already computes the boot disk size, so the scaled values flow through instance pricing, optimal instance type selection, andstart_instance()with no further changes.On backward compatibility: with no per-vCPU or per-task option set, each value collapses to
max(absolute_or_default, 0, 0), which is exactly the previous result. No existing option changes meaning and nothing is removed — the existing assertions that an unconstrained instance reports 3120 IOPS and 170 MB/s still hold unchanged.Verification, on Python 3.12:
The 11 added tests cover the new arithmetic (provider defaults, absolute only, per-CPU, per-task, the maximum of several at once, rounding up, and the throughput option names), the end-to-end result from
get_available_instance_types()for both fixture instance types, and config validation including rejection of negative values. To confirm they really do pin the new behavior, reverting onlysrc/cloud_tasks/instance_manager/gcp.pyto its current state onmainand re-running turns the two scaling tests red (assert 3120 == 4000) while the absolute-value and config tests stay green.Documentation is updated in
docs/config.rst,docs/cli.rst, anddocs/provider_gcp.rst.One merge note: #51 is open and also touches
common/config.py,cli.py, andinstance_manager/orchestrator.py, formax_memory_allowed_per_task. The edits here are in different parts of those files, but whichever lands second may want a small rebase.How this was managed
We imported this repository's issues and pull requests into a live agile board and tracked this work on it: issue #8 as a story on the project board, which holds 45 stories imported from here.
If you'd rather not receive contributions like this, reply
no-more-prson this pull request and we won't open any further ones on your repositories.Lawrence W. Sinclair
CEO / East Agile
linkedin.com/in/lwsinclair/
eastagile.com