6

Normally this can be accomplished by "ulimit -m" but on Linux (at least on Centos5) "man bash" says "-m The maximum resident set size (has no effect on Linux)".

So since "ulimit -m" has no effect on Linux is there another way to limit the resident set size per user?

Thanks in advance for any help.

HopelessN00b
  • 54,273

2 Answers2

2

Limiting the total vmem size (-v) is probably what you want.

pjc50
  • 1,740
1

ulimit -m never limited RSS per user.

In the past (Linux 2.4.x, x < 30), ulimit -m affected the RSS per process. And even then, it was advice to the memory manager, not a hard limit. (See the RLIMIT_RSS section of man setrlimit.)

Similarly, ulimit -v does not impose per user limits. It imposes per process limits.

If you want to impose per user limits on Linux, I recommend considering cgroups.

mpb
  • 283