<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">2018-03-26 18:35 GMT+03:00 Jesper Louis Andersen <span dir="ltr"><<a href="mailto:jesper.louis.andersen@gmail.com" target="_blank">jesper.louis.andersen@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Pure guess: You are being CPU throttled in order to save power, or the virtual machine is throttling you.<br><br></div>Enable the erlang system monitor and start looking for long schedules. These are usually an indication that you are being throttled by something. Either a bad NIF which isn't dirty-scheduling the right way, or by the underlying system stalling you. Perhaps because your timer is on a separate core and async-fires to another core. In general, timers can be stalled by the system, so you have no guarantee that they will fire close after their trigger point. But if you have timers which are periodically behind schedule, I'd look into the virtual setup.<br></div></div></blockquote><div><br></div><div> Hm, it's occur from time to time, not for every test run, so looks lile you are right about "<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">being throttled by something".</span></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div></div>One simple test is to run outside virtualization to make sure it isn't causing the problems.</div></blockquote><div><br></div><div>Outside VM all tests passed, so I've just want to undestand why and where VM causing problems.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">But I'd enable the system monitor anyway since it is a good way to detect unruly underlying hardware/virtualization layers.<br></div></blockquote><div><br></div><div>When I run system_monitor, which metric should I use? Only
<strong style="color:rgb(26,26,26);font-family:sans-serif;font-size:16px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(254,254,254);text-decoration-style:initial;text-decoration-color:initial"><span class="gmail-code" style="font-family:mono,Courier,monospace;font-weight:normal;background-color:rgb(243,243,243)">long_schedule<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">?</span></span></strong></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"></div><br><div class="gmail_quote"><div><div class="h5"><div dir="ltr">On Mon, Mar 26, 2018 at 4:19 PM Alexander Petrovsky <<a href="mailto:askjuise@gmail.com" target="_blank">askjuise@gmail.com</a>> wrote:<br></div></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">Hi!<div><br></div><div><div>I'm usgin nksip library for working with sip protocol and in my virtual machine (windows -> virtualbox -> ubuntu) I'm observer very strange behaviour with erlang:start_timer [1]. Some time in common test, the timer fires with lacency with hundred milliseconds.</div><div><br></div><div>I've check, there is no messages in queue, msacc says there is no problem with schedulers and whole system is idle, erlang:monitor(time_offset, clock_service) show that time in virtual machine flows monotonically.<br></div><div><br></div><div>I wonder, how can I find out why erlang behaves strange sometimes?<br></div><div><br></div><div>Erlang version is:</div><div><br></div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">$ erl<br>Erlang/OTP 20 [erts-9.2] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:10] [kernel-poll:false]<br>Eshell V9.2 (abort with ^G)</blockquote></div><div><br></div><div><br></div><div>[1] <span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><a href="https://github.com/NetComposer/nksip/blob/d27e896bc959ebcf6e238ecc45a1ee3d76bc7399/src/nksip_call_lib.erl#L309" target="_blank">https://github.com/<wbr>NetComposer/nksip/blob/<wbr>d27e896bc959ebcf6e238ecc45a1ee<wbr>3d76bc7399/src/nksip_call_lib.<wbr>erl#L309</a></span>
</div><div><br></div>-- <br><div class="m_5803778805164144293m_-1124990307943158163gmail_signature"><div dir="ltr"><div><div dir="ltr">Петровский Александр / Alexander Petrovsky,<br><br>Skype: askjuise<br><div>Phone: <a href="tel:+7%20931%20987-79-91" value="+79319877991" target="_blank">+7 931 9877991</a><div><br></div></div></div></div></div></div>
</div></div></div></div>
______________________________<wbr>_________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/<wbr>listinfo/erlang-questions</a><br>
</blockquote></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr">Петровский Александр / Alexander Petrovsky,<br><br>Skype: askjuise<br><div>Phone: +7 931 9877991<div><br></div></div></div></div></div></div>
</div></div>