I am trying to figure out how to limit memory usage of mongo daemon to 4G.
I thought to use limits.conf with memlock but I am not sure that's the right way to do it.
from limits.conf man page I've understood that ulimits are referred to users and not for processes, and also the definition of "memlock" is not clear to me:
memlock maximum locked-in-memory address space (KB)
How can I limit the process memory usage?