Skip to content

Commit

Permalink
document acceptance test a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
geigerj0 committed Mar 22, 2024
1 parent 459641b commit 7a1c758
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/acceptance/app/dynamic_policy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,12 +266,13 @@ var _ = Describe("AutoScaler dynamic policy", func() {
// and the CPU entitlements per share configured in ci/operations/set-cpu-entitlement-per-share.yaml.
// if any of these dependencies change, the test may need some adjustments as well.
//
// diego cell = 8 CPU 32GB RAM
// total shares = 1024 * 32[gb host ram] / 8[upper limit of app memory] = 4096
// CPU entitlement per share = 8[number host CPUs] * 100/ 4096[total shares] = 0,1953
// CPU entitlement = 4096[total shares] / (32[gb host ram] * 1024) * (1[app memory in GB] * 1024) * 0,1953 ~= 25%
// the following shows the calculations this test is based on:
// - diego cell = 8 CPU 32GB RAM
// - total shares = 1024 * 32[gb host ram] / 8[upper limit of app memory] = 4096
// - CPU entitlement per share = 8[number host CPUs] * 100/ 4096[total shares] = 0,1953
// - CPU entitlement = 4096[total shares] / (32[gb host ram] * 1024) * (1[app memory in GB] * 1024) * 0,1953 ~= 25%
//
// 1GB app memory results in a maximum cpu entitlement of 25%.
// in a nutshell: 1GB app memory results in a maximum cpu entitlement of 25%,
// this means that cpuutil will be 100% if app cpu is at 25%.

SetAppMemory(cfg, appName, "1GB")
Expand Down

0 comments on commit 7a1c758

Please sign in to comment.