k8s.io/perf-tests/clusterloader2@v0.0.0-20240304094227-64bdb12da87e/testing/batch/config.yaml (about)

     1  {{$MODE := DefaultParam .MODE "Indexed"}}
     2  {{$NODES_PER_NAMESPACE := MinInt .Nodes (DefaultParam .NODES_PER_NAMESPACE 100)}}
     3  {{$PODS_PER_NODE := DefaultParam .PODS_PER_NODE 30}}
     4  {{$LOAD_TEST_THROUGHPUT := DefaultParam .CL2_LOAD_TEST_THROUGHPUT 10}}
     5  
     6  {{$totalPods := MultiplyInt $PODS_PER_NODE .Nodes}}
     7  {{$namespaces := DivideInt .Nodes $NODES_PER_NAMESPACE}}
     8  {{$podsPerNamespace := DivideInt $totalPods $namespaces}}
     9  
    10  # small_job: 1/2 of namespace pods should be in small Jobs.
    11  {{$smallJobSize := 5}}
    12  {{$smallJobsPerNamespace := DivideInt $podsPerNamespace (MultiplyInt 2 $smallJobSize)}}
    13  # medium_job: 1/4 of namespace pods should be in medium Jobs.
    14  {{$mediumJobSize := 20}}
    15  {{$mediumJobsPerNamespace := DivideInt $podsPerNamespace (MultiplyInt 4 $mediumJobSize)}}
    16  # Large_job: 1/4 of namespace pods should be in large Jobs.
    17  {{$largeJobSize := 400}}
    18  {{$largeJobsPerNamespace := DivideInt $podsPerNamespace (MultiplyInt 4 $largeJobSize)}}
    19  
    20  {{$jobRunningTime := DefaultParam .CL2_JOB_RUNNING_TIME "30s"}}
    21  
    22  name: batch
    23  
    24  namespace:
    25    number: {{$namespaces}}
    26  
    27  tuningSets:
    28  - name: UniformQPS
    29    qpsLoad:
    30      qps: {{$LOAD_TEST_THROUGHPUT}}
    31  
    32  steps:
    33  - name: Start measurements
    34    measurements:
    35    - Identifier: WaitForFinishedJobs
    36      Method: WaitForFinishedJobs
    37      Params:
    38        action: start
    39        labelSelector: group = test-job
    40    - Identifier: JobLifecycleLatency
    41      Method: JobLifecycleLatency
    42      Params:
    43        action: start
    44        labelSelector: group = test-job      
    45  - name: Create {{$MODE}} jobs
    46    phases:
    47    - namespaceRange:
    48        min: 1
    49        max: {{$namespaces}}
    50      replicasPerNamespace: {{$smallJobsPerNamespace}}
    51      tuningSet: UniformQPS
    52      objectBundle:
    53      - basename: small
    54        objectTemplatePath: "job.yaml"
    55        templateFillMap:
    56          Replicas: {{$smallJobSize}}
    57          Mode: {{$MODE}}
    58          Sleep: {{$jobRunningTime}}
    59    - namespaceRange:
    60        min: 1
    61        max: {{$namespaces}}
    62      replicasPerNamespace: {{$mediumJobsPerNamespace}}
    63      tuningSet: UniformQPS
    64      objectBundle:
    65      - basename: medium
    66        objectTemplatePath: "job.yaml"
    67        templateFillMap:
    68          Replicas: {{$mediumJobSize}}
    69          Mode: {{$MODE}}
    70          Sleep: {{$jobRunningTime}}
    71    - namespaceRange:
    72        min: 1
    73        max: {{$namespaces}}
    74      replicasPerNamespace: {{$largeJobsPerNamespace}}
    75      tuningSet: UniformQPS
    76      objectBundle:
    77      - basename: large
    78        objectTemplatePath: "job.yaml"
    79        templateFillMap:
    80          Replicas: {{$largeJobSize}}
    81          Mode: {{$MODE}}
    82          Sleep: {{$jobRunningTime}}        
    83  - name: Wait for {{$MODE}} jobs to finish
    84    measurements:
    85    - Identifier: JobLifecycleLatency
    86      Method: JobLifecycleLatency
    87      Params:
    88        action: gather
    89        timeout: 10m  
    90    - Identifier: WaitForFinishedJobs
    91      Method: WaitForFinishedJobs
    92      Params:
    93        action: gather
    94        timeout: 10m