limits.conf file Changing Max Memory Option
This question might have been asked earlier however i did not find any supported answer. I understand that ulimit supports few options from which max memory size is one of them. How can i set the same options using /etc/security/limits.conf file?
I think setting up virtual memory option in limits.conf file isn't the same thing as max memory size.
Additionally, I know I can edit the user's .bashrc file to limit resources using ulimit, for example ulimit -m <mem in Kb> but that is where user can change these values at any time.
Which one of these in limits.conf is equivalent to ulimit -m
# - core - limits the core file size (KB)
# - data - max data size (KB)
# - fsize - maximum filesize (KB)
# - memlock - max locked-in-memory address space (KB)
# - nofile - max number of open files
# - rss - max resident set size (KB)
# - stack - max stack size (KB)
# - cpu - max CPU time (MIN)
# - nproc - max number of processes
# - as - address space limit
# - maxlogins - max number of logins for this user
# - maxsyslogins - max number of logins on the system
# - priority - the priority to run user process with
# - locks - max number of file locks the user can hold
# - sigpending - max number of pending signals
# - msgqueue - max memory used by POSIX message queues (bytes)
# - nice - max nice priority allowed to raise to
# - rtprio - max realtime priority 1 Answer
I'm going to assume that you're talking about bash's ulimit. From the manual:
-m
The maximum resident set size (many systems do not honor this limit).
Of the entries in your question, rss is also max resident set size.