开发者

Where is the default max locked memory value coming from?

So on one system, I have values that are pretty wide open:

$ ulimit -a | grep mem
max locked memory       (kbytes, -l) 40000
max memory size         (kbytes, -m) unlimited
virtual memory          (kbytes, -v) unlimited

Another system has much more limiting values, but I can't for the life of me find out where the 32MB upper limit (it is 32MB despite the mislabling) is being set:开发者_运维百科

# ulimit -a | grep mem
max locked memory       (kbytes, -l) 32
max memory size         (kbytes, -m) unlimited
virtual memory          (kbytes, -v) unlimited

The second system is a RHEL 5.5 box. I am looking to increase this limit for at least one user- I need a bigger APC mmap memory allocation, but I can't go above 30 MB without running into the above limit, and I would rather not hack the provided apache init script. Where should I be trying to override the system default value so I can map a bigger segment of memory? Doing it in limits.conf for the apache user doesn't do a whole lot; probably because the init script doesn't do anything through PAM.


If the user granularity setting you tried isn't working, you should make sure that's you've correctly matched which user is hitting the limit.

You should also be able to add a line like this to limits.conf:

* hard memlock 40000

That'll change the default setting for all users.

From the limits.conf manpage:

The syntax of the lines is as follows:

<domain> <type> <item> <value>

The fields listed above should be filled as follows:

<domain>

[snip]
·   the wildcard *, for default entry.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜