About this list Date view Thread view Subject view Author view Attachment view

From: Helmut Wollmersdorfer (helmut.wollmersdorfer_at_gmx.at)
Date: Wed 24 Aug 2005 - 00:55:17 BST


Hard to understand these poorly documented feature.

The flowerpage says:

Possible resources are
- cpu,
- fsize,
- data,
- stack,
- core,
- rss,
- nproc,
- nofile,
- memlock,
- as
- locks.

man bash[ulimit] says:
-a All current limits are reported
-c The maximum size of core files created
-d The maximum size of a process's data segment
-f The maximum size of files created by the shell
-l The maximum size that may be locked into memory
-m The maximum resident set size
-n The maximum number of open file descriptors (most systems
        do not allow this value to be set)
-p The pipe size in 512-byte blocks (this may not be set)
-s The maximum stack size
-t The maximum amount of cpu time in seconds
-u The maximum number of processes available to a single
        user
-v The maximum amount of virtual memory available to the
        shell
[...]
Values are in 1024-byte increments, except for -t,
which is in seconds, -p, which is in units of 512-byte blocks,
and -n and -u, which are unscaled values.

# cat /proc/virtual/27/limit
PROC: 6 9 -1 0
VM: 3703 6455 -1 0
VML: 0 0 -1 0
RSS: 1304 2320 -1 0
ANON: 165 308 -1 0
FILES: 87 97 -1 0
OFD: 37 41 -1 0
LOCKS: 2 2 -1 0
SOCK: 3 3 -1 0
MSGQ: 0 0 -1 0
SHM: 0 0 -1 0

O.k., let's try the puzzle:

config proc ulimit description
------ ---- ------- -----------
cpu -t
fsize ? -f ?
data ? -d ?
stack ? -s
core ? -c ?
rss RSS -m
nproc PROC -u
nofile FILES -n ?
memlock VML -l
as VM ? ?
locks LOCKS ? ?
? ? -p
? ANON ? ?
? OFD ? ?
? SOCK ? ?
? MSGQ ? ?
? SHM ? ?

Hmm ... if somebody exchanges the question marks by understandable
content, I promise to write docs.

The difference between /usr/sbin/vlimit and /proc/.../limit needs
explanation.

Next I would like to know the meaning of the 3rd and 5th column of
/proc/.../limit.

At least I would like to know, how I can restrict a vserver to e.g. 100
MB real memory. Or is this not possible under Linux? As I understand, I
can restrict VM (total virtual memory?), VML and RSS - hmm.

TIA

Helmut Wollmersdorfer

_______________________________________________
Vserver mailing list
Vserver_at_list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver


About this list Date view Thread view Subject view Author view Attachment view
[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Wed 24 Aug 2005 - 00:55:46 BST by hypermail 2.1.3