I have a linux user with soft virtual memory limit (ulimit -v) set to aroud 5GB.
Having this in mind I try to do:
get all user processes with ps -u -o pid --no-heading;
for each pid, open file in /proc/pid/status;
get VmSize parameter and sum them up over all pids.
After doing so, my sum of VmSizes is 22 GB, which is not something to expect.
My question is: Is my assumption about ulimit -v >= sum of VmSizes correct? If not, what does soft limit actually mean? Is it possible to get over soft limit for specific user and still be okay with it?
Btw, ulimit -v -H is set to unlimited of it makes any difference.