Soft restrictions and hard restrictions on resources

FROM: http://wenda.tianya.cn/question /6207f28ce3fcfc45

FROM: http://blog.csdn.net/victor1220/article/details/5338331

The hard limit refers to the absolute limit on resource nodes and data blocks, and users are not allowed to exceed this limit under any circumstances;

The soft limit means that the user can< strong>Within a certain time range (default is one week, set in the /usr/include/sys/fs/ufs_quota.h file) Amount exceeding the soft limit, in the hard limit Continue to apply for resources within the range of, and the system will give a warning message when the user logs in and the remaining time to continue to apply for resources. If the time limit is reached and the user’s hard disk usage still exceeds the soft limit, the system will not allow the user any more Apply for hard disk resources.

The system resource limits used by AIX users include two concepts — hard limits and soft limits.

hard limits自AIX 4.1版本开始引入。 The hard limits should be set by the AIX system administrator. Only members of the security group can increase this value, and the user can decrease this limit value, but its change will follow the user’s system The system exits and becomes invalid.使用下列命令可以查看hard limits的限定值:

    ulimit -Ha

soft limits 是AIX核心使用的限制进程对系统资源的使用的上限值。 This value can be changed by anyone, but cannot exceed the hard limits. It should be noted here that only members of the security group can make the changes permanent , and the changes made by ordinary users will become invalid after they log out of the system.使用以下命令可以查看soft limits的设置:

    ulimit -a

下面为系统的soft limits的默认值:
3.2 4.1-4.3
=============== ================
fsize = 2097151 fsize = 2097151
core = 2048 core = 2048
cpu = 3600 cpu = -1
data = 131072 data = 262144
rss = 65536 rss = 65536
stack = 8192 stack = 65536
nofiles = 2000* nofiles=2000 *

* 该值(nofiles)只能在AIX 4.3.1 或以后的版本中更改。

上述定义作为默认值存放在文件 /etc/security/limits 中,在新用户被加进系统后生效。 Changing the value defined in this file directly requires restarting the system for the change to take effect. The corresponding value should be “-1” to indicate that it is not subject to soft limits (unlimited).

下面我们将就各字段逐一进行介绍:

fsize 用户创建的文件大小限制。 This defined value (in units of 512 bytes) is the size of the largest file that the user can generate.
The size limit of the core file generated by core (in units of 512 bytes).
cpu The limit value (in seconds) of the available cpu for the user process. Ordinary users can only reduce this value, and root can increase this value. It should be noted here that the time the process uses the CPU depends on the AIX Kernel (core program) process scheduling calculation method, this value is only for reference here.
data The limit value of the process data segment size (in bytes).
The limit value (in bytes) of the stack segment size of the stack process.
The limit value (in bytes) of the resident memory segment of the rss process. The AIX core does not refer to this limitation.
The maximum number of open files in the nofiles process. This limit was fixed at 2000 in versions prior to AIX 4.3.1. This value can be increased to 32767 in AIX 4.3.1 and later versions.

下面介绍三种修改上述限定值的方法:

1. 编辑文件/etc/security/limits,直接修改各定义值。 This change will take effect after the system is restarted.

2. 使用命令ulimit修改默认值。例如:

    ulimit -f value
    ulimit -c
    ulimit -t
    ulimit -d
    ulimit -s
    ulimit -m
    ulimit -n

将修改fsize, core, cpu,data, stack, rss和nofiles的soft limit值。

3. 使用命令chuser修改某用户的限定值。例如:

    chuser fsize=
    chuser core=     chuser cpu=
    chuser data= < username>
    chuser limit=
    chuser rss=
    chuser nofiles=

将用户“username”的Change the soft limits to “value”.

    chuser hard_fsize=
    chuser hard_core=
    chuser hard_cpu=
    chuser hard_data=
chuser hard_limit=
chuser hard_rss=
chuser hard_nofiles=
Change the hard limits of the user “username” to The value “value”.

我做了如下修改:

vi /etc/security/limits default: fsize = 2097151 core = 2097151 cpu = -1 stack = 768 s = 65536 data = 262 536 s 65 536 rs = 65536 Restart the system. I really want to know how can it take effect immediately if the system is not started. Linux can make kernel parameters take effect immediately. I don’t know how to deal with AIX.

vi /etc/security/limits default: fsize = 2097151 core = 2097151 cpu = -1 data = 262144 rss = 65536 stack = 65536 nofiles = 2000 (modified and enlarged to 32768) Then restart the system. I really want to know how can it take effect immediately if the system is not started. Linux can make kernel parameters take effect immediately. I don’t know how to deal with AIX.

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 1856 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.