Welcome to the Linux Foundation Forum!

Exercise 4.2 Stress Test


I am running two node cluster on my MacMini which has 64GB RAM. For each node I have allocated 16GB and I tried allocating more memory. But so far I have not been able to hit the memory limit. What should I do? reallocate lower memory for VMs or keep tweaking parameters that I pass to hog.yaml?

Appreciate your thoughts.




  • serewicz
    serewicz Posts: 1,000


    Perhaps I am misunderstanding what you have written but it sounds like you are adding more memory instead of increasing the amount of memory that stress is consuming. If you think about the name of the application, stress, the point is to consume resources. In this step we increase the amount of stress on the node until it runs out of resources. The learning objective is to understand what happens to a container or a pod when it uses to much CPU or memory. Instead of adding memory, which would reduce the percentage of memory used you are increasing it? Return the node memory to what you had before, perhaps 8G, then change the parameters of hog to use more resources.


  • prama01886
    prama01886 Posts: 17

    My thinking was to get the pod to restart and I never managed to get a single restart.

    Configuration wise - CP node is now 8GB and 2VCPUs, Worker node is also 8GB and 2VCPUs.

    I have tried with the following args:
    - image: vish/stress
    imagePullPolicy: Always
    name: stress
    cpu: "1"
    memory: "10Gi"
    cpu: "0.5"
    memory: "500Mi"
    - -cpus
    - "2"
    - -mem-total
    - "950Mi"
    - -mem-alloc-size
    - "100Mi"
    - -mem-alloc-sleep
    - "1s"

    So trying to see different options to tweak so that I will be able to see the stress pod restart,

  • serewicz
    serewicz Posts: 1,000
    edited June 2021

    Increase CPU more than allotted. Then reset cpu to a lower amount and increase memory. Give the pod a minute or more to gradually increase usage. Edit the args, not the limits.


  • prama01886
    prama01886 Posts: 17

    Thank you this worked.


Upcoming Training