I observed that RSS’ release to OS behaves differently on different go versions. For example, RSS releases in 5 hours under go1.16 while releases very quickly under go1.18. I find the description in Go 1.18 Release Notes - The Go Programming Language “The runtime now returns memory to the operating system more efficiently and has been tuned to work more aggressively as a result.” But I don’t know which enhancement does it mean? I can see many issues and discussions on github about scavenger. Is there any explanation on the history of scavenger? What kind of behavior should we expect on each go version?
And based on this discussion https://github.com/golang/go/issues/36398#issuecomment-648753457, Should I expect different release delays of RSS if the cgroup configs like memory.soft_limit_in_bytes are different, even though with GODEBUG=madvdontneed=1?