apheleia-project / jbs-build-issues

0 stars 0 forks source link

Memory Increment #8

Closed rnc closed 5 months ago

rnc commented 6 months ago

When building micrometer (after applying the fix in #7) I am seeing OOMKilled in the pods.

Assuming I'm looking at the correct yaml I see:

  containers:
    - resources:
        limits:
          cpu: 300m
          memory: 1Gi
        requests:
          cpu: 300m
          memory: 1Gi
      terminationMessagePath: /tekton/termination
      name: step-build

for both 51aa01903a6cdeb5e503c189c1ad98e9-build-0-build-pod and 51aa01903a6cdeb5e503c189c1ad98e9-build-1-build-pod (while 51aa01903a6cdeb5e503c189c1ad98e9-build-2-build-pod has 2GB).

@stuartwdouglas Shouldn't there be an increment between the first two builds?

rnc commented 6 months ago

Is it

    limits.defaultBuildRequestMemory, err = resource.ParseQuantity(settingOrDefault(jbsConfig.Spec.BuildSettings.BuildRequestMemory, "1024Mi"))

that defaults the initial memory to 1024?

And the section commencing if !doRetry && attempt.Recipe.AdditionalMemory < 2048 { that controls the memory increment? Which, from looking at that would seem to match what I'm seeing above. Perhaps the MemoryIncrement should be 2048 ... but I believe @stuartwdouglas changed it in https://github.com/redhat-appstudio/jvm-build-service/commit/3f93679da0e906a44ee9c2040110114a74de0640 ?