linux的一些系统限制

1. 关于POSIX机制的消息队列mq:

 This filesystem can be mounted (by the superuser) using the following commands:


           # mkdir /dev/mqueue
           # mount -t mqueue none /dev/mqueue


       The sticky bit is automatically enabled on the mount directory.
              *  Before Linux 2.6.28, the upper limit is INT_MAX.


              *  From Linux 2.6.28 to 3.4, the limit is 1,048,576.


              *  Since Linux 3.5, the limit is 16,777,216 (HARD_MSGSIZEMAX).


              The msgsize_max limit is ignored for privileged process (CAP_SYS_RESOURCE), but, since Linux 3.5, the HARD_MSGSIZEMAX ceiling is enforced for privileged
              processes.


       /proc/sys/fs/mqueue/queues_max
              This file can be used to view and change the system-wide limit on the number of message queues that can be created.  The default value for queues_max is
              256.  No ceiling is imposed on the queues_max limit; privileged processes (CAP_SYS_RESOURCE) can exceed the limit (but see BUGS).

(1)attr.mq_maxmsg 不能超过文件 /proc/sys/fs/mqueue/msg_max 中的数值,我的机器上面是10。

(2)attr.mq_msgsize不能超过 /proc/sys/fs/mqueue/msgsize_max 的数值。

(3)消息队列名称前面必须加上斜杆。

详细请参考:命令“man mq_overview”



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值