* Query on ulimit
@ 2000-04-21 14:15 Mark_H_Johnson
0 siblings, 0 replies; only message in thread
From: Mark_H_Johnson @ 2000-04-21 14:15 UTC (permalink / raw)
To: linux-mm
The behavior of resource limits (e.g., "ulimit" in bash) is somewhat
confusing - I think I understand what's happening behind the scenes & I'd
like to confirm what I've found and ask a few questions.
You can use ulimit in bash [or its companion call setrlimit] to view or set
resource limits. For memory related limits, the command ulimit -dsmv on
Linux 2.2.10 shows something like...
data seg size (kbytes) unlimited
max memory size (kbytes) unlimited
stack size (kbytes) 8192
virtual memory (kbytes) unlimited
Attempting to set the virtual memory limit "ulimit -v 48192" always fails,
even with root privilege. The error message appears to be misleading - it
is:
ulimit: cannot raise limit: Invalid argument
>From what I can tell, the "Invalid argument" is correct, the reason "cannot
raise limit" is incorrect - its that the virtual memory limit is read only
[RIGHT?].
Setting the data seg limit "ulimit -d 40000" succeeds. And the settings now
change to...
data seg size (kbytes) 40000
max memory size (kbytes) unlimited
stack size (kbytes) 8192
virtual memory (kbytes) 48192
So, to do what I wanted with setting -v, I should use -d instead [RIGHT?].
The best I can tell, setting "ulimit -m 8192" succeeds and you can view the
result, but is not effective at limiting physical memory usage [RIGHT?].
Are there plans for implementing the physical memory limit? If so, when can
I expect it to be done?
In reading various system administrative guides, I can set the hard & soft
limits with the startup files for each shell (e.g., .bashrc or .profile).
However, that requires some "cooperation" from the users since there are a
few ways to avoid execution of those files (e.g., bash -norc -noprofile).
Is there some way to set hard and soft resource limits on a global or per
user basis w/o modifying either the code in the kernel or login?
Thanks.
--Mark H Johnson
<mailto:Mark_H_Johnson@raytheon.com>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2000-04-21 14:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-04-21 14:15 Query on ulimit Mark_H_Johnson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox