Skip to content

Improve bin packing concept page #50664

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

lmktfy
Copy link
Contributor

@lmktfy lmktfy commented Apr 24, 2025

Improve the concept explanation of bin packing

  • Use formulae per style guide
  • Add page structure so that formulae make sense
  • Tweak a heading to align with the concept approach (it's not a task page)

ℹ️ This was originally PR #49795; please also see the review history on that PR.

To make the idea work, this PR changes the styling for formulae on narrow viewports, so that they gain auto scroll bars.

Original vs preview

@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 24, 2025
Copy link

linux-foundation-easycla bot commented Apr 24, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

@k8s-ci-robot k8s-ci-robot added the area/web-development Issues or PRs related to the kubernetes.io's infrastructure, design, or build processes label Apr 24, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign nate-double-u for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added language/en Issues or PRs related to English language sig/docs Categorizes an issue or PR as relevant to SIG Docs. cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Apr 24, 2025
@lmktfy lmktfy force-pushed the 20250216_improve_bin_packing_concept branch from 85f0c1d to 7178587 Compare April 24, 2025 22:39
@lmktfy lmktfy marked this pull request as ready for review April 24, 2025 22:39
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Apr 24, 2025
@k8s-ci-robot k8s-ci-robot requested review from ahg-g and reylejano April 24, 2025 22:39
@lmktfy
Copy link
Contributor Author

lmktfy commented Apr 24, 2025

/hold

Previous PR was held.

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 24, 2025
Copy link

netlify bot commented Apr 24, 2025

Pull request preview available for checking

Built without sensitive environment variables

Name Link
🔨 Latest commit 85f0c1d
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-io-main-staging/deploys/680abd75bc41380008895d74
😎 Deploy Preview https://deploy-preview-50664--kubernetes-io-main-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Apr 24, 2025

Pull request preview available for checking

Built without sensitive environment variables

Name Link
🔨 Latest commit 7178587
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-io-main-staging/deploys/680abdb7304614000845770d
😎 Deploy Preview https://deploy-preview-50664--kubernetes-io-main-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@bsalamat bsalamat left a comment

Choose a reason for hiding this comment

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

Thank you for the PR! Just a couple of minor points.

@@ -15,7 +16,7 @@ scoring strategies that support the bin packing of resources: `MostAllocated` an

<!-- body -->

## Enabling bin packing using MostAllocated strategy
## Bin packing using MostAllocated strategy
Copy link
Member

Choose a reason for hiding this comment

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

Reflecting on an old problem (which I am partly to blame), "bin packing" is a misleading term here. This is really a "prefer MostAllocated" strategy. Kubernetes scheduler in its current form is not capable of doing actual bin packing, mainly because it schedules one pod at a time.
Now that we are refining these documents, should we remove "bin packing"?

```math
\begin{align}
{ \text{intel.com/foo} } &\Longrightarrow { resourceScoringFunction((2 + 1), 4)} \tag*{} \\
&= { 100 - ((4 - 3) \times { 100 \over 4 } )} \tag*{} \\
Copy link
Member

Choose a reason for hiding this comment

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

I would write this as:
&= { 100 - ({(4 - 3) \over 4} \times 100 )} \tag*{} \

mathematically the same, but a bit easier to comprehend. The same for the other equations below.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/web-development Issues or PRs related to the kubernetes.io's infrastructure, design, or build processes cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. language/en Issues or PRs related to English language sig/docs Categorizes an issue or PR as relevant to SIG Docs. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants