From c1a93358b9d8591a45ae1b04e964f01691656e0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Rezvoy?= <4604520+crezvoy@users.noreply.github.com> Date: Fri, 6 Oct 2023 10:22:13 +0200 Subject: [PATCH] Document memory autotuning strategy --- .../schemas/oceanSparkApplicationSpec.yaml | 34 +++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/api/services/ocean/spark/schemas/oceanSparkApplicationSpec.yaml b/api/services/ocean/spark/schemas/oceanSparkApplicationSpec.yaml index 2d5bf7107..c63c66969 100644 --- a/api/services/ocean/spark/schemas/oceanSparkApplicationSpec.yaml +++ b/api/services/ocean/spark/schemas/oceanSparkApplicationSpec.yaml @@ -700,8 +700,9 @@ components: type: object memory: oneOf: - - $ref: '#/components/schemas/OOMRecoveryStrategy' - $ref: '#/components/schemas/StaticMemoryString' + - $ref: '#/components/schemas/OOMRecoveryStrategy' + - $ref: '#/components/schemas/MemoryAutotuningStrategy' memoryOverhead: title: Memoryoverhead type: string @@ -1226,7 +1227,7 @@ components: #example: [ '4096m', '16g' ] type: string OOMRecoveryStrategy: - description: Memory allocation strategy that automatically increments the memory when a previous app failed with a OOM + description: Memory allocation strategy that automatically increments the memory when a previous app failed with an OOM properties: strategy: type: string @@ -1243,6 +1244,35 @@ components: type: string required: - strategy + MemoryAutotuningStrategy: + description: Memory allocation strategy that automatically increments the + memory when a previous app failed with a OOM, and decreases it based on + past applications memory usage + properties: + strategy: + type: string + title: autotuning + enum: [autotuning] + description: Automatically increase memory if a previous app failed with an OOM error, and decrease it based on + past applications' memory usage + scalingFactor: + title: scalingFactor + description: Memory multiplier after an OOM failure. Optional, defaults to 2.0 + type: number + maxMemory: + title: maxMemory + description: Optional, maximum allocatable memory + type: string + historySize: + title: historySize + description: Number of past apps to take into account to compute the recommended memory, defaults to 6 + type: integer + marginRatio: + title: marginRatio + description: Additional safety margin on top of the recommended memory, defaults to 0.1 + type: number + required: + - strategy PersistentVolumeClaimVolumeSource: properties: