Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport of Fix: Inaccurate Memory Resource Example into release/1.9.x #25027

Conversation

hc-github-team-nomad-core
Copy link
Contributor

Backport

This PR is auto-generated from #25023 to be assessed for backporting due to the inclusion of the label backport/1.9.x.

The below text is copied from the body of the original PR.


Description

Fix: Inaccurate Memory Resource Example

Nomad memory sizes are always in binary units (plenty of places with e.g. MemoryMB * 1024 * 1024 around the codebase). This snippet of documentation, however, is misleading, and implies that Nomad manages/tracks memory with decimal units.

Without going crazy changing "MB"->"MiB" everywhere, causing mass confusion and horrid edit wars, let's just change this one number! This is a subtle but effective way to signal to developers that we're using binary-based sizes.

(Even if this argument fails, this documentation is plain wrong: MemoryMB = 2000 will use ~2.1GB: 2000 binary megabytes, 1048576 bytes each.)

Testing & Reproduction steps

N/A

Links

Example of size computation in Docker driver, clearly computing mibibytes

Contributor Checklist

  • Changelog Entry If this PR changes user-facing behavior, please generate and add a
    changelog entry using the make cl command.
  • Testing Please add tests to cover any new functionality or to demonstrate bug fixes and
    ensure regressions will be caught.
  • Documentation If the change impacts user-facing functionality such as the CLI, API, UI,
    and job configuration, please update the Nomad website documentation to reflect this. Refer to
    the website README for docs guidelines. Please also consider whether the
    change requires notes within the upgrade guide.

Reviewer Checklist

  • Backport Labels Please add the correct backport labels as described by the internal
    backporting document.
  • Commit Type Ensure the correct merge method is selected which should be "squash and merge"
    in the majority of situations. The main exceptions are long-lived feature branches or merges where
    history should be preserved.
  • Enterprise PRs If this is an enterprise only PR, please add any required changelog entry
    within the public repository.

Overview of commits

@aimeeu aimeeu merged commit 2073819 into release/1.9.x Feb 4, 2025
9 checks passed
@aimeeu aimeeu deleted the backport/rewing-update-job-resource-docs-04feb2025/normally-wealthy-pig branch February 4, 2025 20:14
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.

3 participants