<div dir="ltr">Hi David,<div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 20, 2017 at 5:00 PM, David T. Lewis <span dir="ltr"><<a href="mailto:lewis@mail.msen.com" target="_blank">lewis@mail.msen.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
On Mon, Mar 20, 2017 at 09:07:16PM +0100, Levente Uzonyi wrote:<br>
><br>
> IMO the best solution would be to add command line parameters to set the<br>
> priorities - both main and heartbeat using relative values, and keep the<br>
> current behavior if none was given. Ben's example would be 0 for both<br>
> parameters.<br>
> Then the error message on startup could just say to set one of the<br>
> parameters to run the VM (e.g. 0,0 or -1,0, etc).<br>
<br>
</span>A much simpler solution is to just comment out the "exit(errno)" at line 332 of<br>
sqUnixHearbeat.c. The resulting VM will work fine.<br></blockquote><div><br></div><div>Feel free!  Do it!  Just add a comment to the source.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">If the /etc/security/limits.d/squeak.<wbr>conf is not in place, then you will see<br>
the annoying but otherwise harmless warming:<br>
<br>
  pthread_setschedparam failed: Operation not permitted<br>
  This VM uses a thread heartbeat who requires a special configuration to work.<br>
  You need to allow it to run higher priority threads (real time), to allow clock to work properly<br>
  You need to add a conf file to /etc/security/limits.d, executing this:<br>
<br>
  sudo cat >/etc/security/limits.d/<wbr>squeak.conf <<END<br>
  *       hard    rtprio  2<br>
  *       soft    rtprio  2<br>
  END<br>
<br>
<br>
Ben's analysis may or may not be exactly right for all conditions of load, but<br>
directionally he is right on target. Clock jitter is of little or no interest<br>
to the general user, and the people who do care about it are fully capable of<br>
setting the necessary security configuration.<br>
<span class=""><br>
> AFAIK you can always decrease the priority of the threads on linux, so 0<br>
> and negative values should always work.<br>
><br>
<br>
</span>I think this is correct, so another resonable strategy would be to lower the<br>
priority of threads other than the heartbeat thread when the heartbeat priority<br>
cannot be raised. But if Ben's analysis is generally correct, then it may not<br>
even be worth the trouble of doing that.<br>
<br>
Dave<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><span style="font-size:small;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div>
</div></div>