From: Mark_H_Johnson@Raytheon.com
To: linux-mm@kvack.org
Subject: Query on ulimit
Date: Fri, 21 Apr 2000 09:15:40 -0500 [thread overview]
Message-ID: <OFB4641C99.2DC226BF-ON862568C8.004B95BB@hso.link.com> (raw)
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/
reply other threads:[~2000-04-21 14:16 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=OFB4641C99.2DC226BF-ON862568C8.004B95BB@hso.link.com \
--to=mark_h_johnson@raytheon.com \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox