Quantcast
Channel: Active questions tagged linux-kernel - Stack Overflow
Viewing all articles
Browse latest Browse all 12339

Cgroup memory controller

$
0
0

I have done a simple experiment with both v1 and v2 cgroup memory controller on a 4.18 kernel that looks like this.

  1. I set the maximum memory limit accordingly. For v1 I write into the memory.limit_in_bytes and for v2 I write into the memory.max file.
  2. I move the current bash instance into it (i.e. $$) and start a loop that does only ls. The limit is set to 8M bytes.

    while [[ 1 ]]; do ls; done
    

After a while, the bash instance is terminated due to OOM. I do not understand why is this the case because the ls process will return the memory after it finishes so that it can be reused in the next iteration.

I am missing something?

Thanks,


Viewing all articles
Browse latest Browse all 12339

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>