<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body style='font-size: 9pt; font-family: Verdana,Geneva,sans-serif'>
<p>For machines with low memory, I would like to detect how much ram remains available before starting indexing a mail, so I can commit everything on disk before the ram is exhausted (and break the process)</p>
<p>I tried to put a "fake" allocation to test if it fails, (so it can fail separately, and I can "if ram remaining is above X") but the is really not clean</p>
<p><br /></p>
<div id="signature"></div>
<p><br /></p>
<p id="reply-intro">On 2020-11-04 06:28, Aki Tuomi wrote:</p>
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"><br />
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">On 04/11/2020 05:19 Joan Moreau <<a href="mailto:jom@grosjo.net">jom@grosjo.net</a>> wrote:<br /><br /><br />Hello<br />I am looking for help around memory management<br />1 - How to get the current value of "vsz_limit" from inside a plugin (namely <a href="https://github.com/grosjo/fts-xapian/" target="_blank" rel="noopener noreferrer">https://github.com/grosjo/fts-xapian/</a> ) , especially for indexer-worker<br />2 - Is there a macro or function in dovecot to get the remaining free memory from this vsz value ?<br />Thank you<br /><br /><br /></blockquote>
<br />Hi Joan,<br /><br />I don't think there is a feasible way to access this setting as of now. Is there a reason you need this? We usually recommend setting vsz_limit=0 for indexer-worker.<br /><br />Aki<br /><br /></div>
</blockquote>
</body></html>