running memcached in daemon mode vs locking down memory
Brad Fitzpatrick
brad at danga.com
Thu Jun 12 03:11:31 UTC 2008
Alan, somebody,
Want to look into this? (I'm told it was sent to the list, but was
eaten....)
On Tue, Jun 10, 2008 at 2:36 PM, Gary Zhu <Gzhu at ironplanet.com> wrote:
> Is there any reason to NOT lock down paged memory, when running memcached
> as daemon ?
>
>
>
> With current code, -d will effectively ignore –k.
>
>
>
> I re-arranged the current code as following:
>
> From:
>
> mlockall
>
> setuid
>
> daemon
>
> …child process…
>
> init
>
>
>
> To :
>
> daemon
>
> …child process …
>
> mlockall
>
> setuid
>
> init
>
>
>
> This made –d to work with –k.
>
>
>
> The reason is that forked child process does not inherit mlock. The
> modified code worked as expected on Solaris 10 and Linux 2.6.x .
>
>
>
> Let me know any downside of the change.
>
>
>
> - Gary
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.danga.com/pipermail/memcached/attachments/20080611/997b6b07/attachment.htm
More information about the memcached
mailing list