Difference between revisions of "Ulimits openvz"

From vpsget wiki
Jump to: navigation, search
 
Line 1: Line 1:
examples:
+
Resource limits is the concept where you regulate several resources consumed by a process on an UNIX operating systems.
  
 +
show ulimits:
 +
ulimit -a
 +
 +
Show soft limit:
 +
ulimit -Sa
 +
 +
Hard limits:
 +
ulimit -Ha
 +
 +
 +
Also limits stored in file  /etc/security/limits.conf
 +
 +
 +
examples used in openvz production:
  
 
1 case. (working fine tested)
 
1 case. (working fine tested)
Line 22: Line 36:
  
  
2 case. more unlimited but seems to be problematic sometimes
+
2 case. more unlimited but seems could be problematic sometimes
 
  # ulimit -a
 
  # ulimit -a
 
  core file size          (blocks, -c) 0
 
  core file size          (blocks, -c) 0
Line 42: Line 56:
  
 
"[[Category:Admin area]]"
 
"[[Category:Admin area]]"
 +
 +
To set ulimit specify it with param like:
 +
 +
ulimit -n 2048 # set open files limit
 +
 +
The limits will apply only for current shell. so you need to exit exact conf file if you like to apply limit globally/permanently

Latest revision as of 12:22, 17 June 2015

Resource limits is the concept where you regulate several resources consumed by a process on an UNIX operating systems.

show ulimits:

ulimit -a

Show soft limit:

ulimit -Sa

Hard limits:

ulimit -Ha


Also limits stored in file /etc/security/limits.conf


examples used in openvz production:

1 case. (working fine tested)

# ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 513923
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 10240
cpu time               (seconds, -t) unlimited
max user processes              (-u) 1024
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited


2 case. more unlimited but seems could be problematic sometimes

# ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) unlimited
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) unlimited
cpu time               (seconds, -t) unlimited
max user processes              (-u) 1024
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

""

To set ulimit specify it with param like:

ulimit -n 2048 # set open files limit

The limits will apply only for current shell. so you need to exit exact conf file if you like to apply limit globally/permanently