<div dir="ltr">Alternatively you can set the per-process swappiness using cgroups. <a href="http://unix.stackexchange.com/questions/10214/per-process-swapiness-for-linux#10227">http://unix.stackexchange.com/questions/10214/per-process-swapiness-for-linux#10227</a></div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On 23 May 2014 08:39, Andrew Punch <span dir="ltr"><<a href="mailto:apunch@brandscreen.com" target="_blank">apunch@brandscreen.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Encrypt your swap partition then or disable it. A very minimal area of memory where any keys are stored or in the ssl library where encryption takes place should be non-swappable but keeping everything in memory means you're doing it wrong.<div>

<br></div><div>If you really must do it for yourself, I don't see why patching a single mlockall() into the right place is so onerous. Also you haven't provided the ability to do this on other platforms e.g. Windows.</div>

<div><br></div><div>I don't think this patch is worth pursuing. If you want to do it yourself, that's fine but I don't want this unnecessary complexity on any servers I run.</div></div>
</blockquote></div><br></div>

<br>
<div><font size="1">NOTICE</font></div><div><font size="1"><br></font></div><div><font size="1">This e-mail and any attachments are confidential and may contain copyright material of Brandscreen or third parties. If you are not the intended recipient of this email you should not read, print, re-transmit, store or act in reliance on this e-mail or any attachments, and should destroy all copies of them. Brandscreen does not guarantee the integrity of any emails or any attached files. The views or opinions expressed are the author's own and may not reflect the views or opinions of Brandscreen.</font></div><div style="font-size:1.3em"><br></div>