<html><head><meta http-equiv="content-type" content="text/html; charset=us-ascii"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">What happened to the threading for this topic, all the messages are separate from the rest of the conversation?<br><div><br><blockquote type="cite"><div>On Feb 6, 2023, at 4:27 PM, Klaas de Waal <klaas.de.waal@gmail.com> wrote:</div><br class="Apple-interchange-newline"><div><meta charset="UTF-8"><div dir="ltr" style="caret-color: rgb(0, 0, 0); font-family: Palatino-Roman; font-size: 14px; font-style: 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; -webkit-text-stroke-width: 0px; text-decoration: none;"><br class="Apple-interchange-newline"><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 6 Feb 2023 at 14:08, Paul Harrison <<a href="mailto:mythtv@mythqml.net">mythtv@mythqml.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;">On 06/02/2023 11:17, Jan Ceuleers wrote:<br><br>> On 05/02/2023 23:13, Klaas de Waal wrote:<br>>> I think ideally you have to have WakeUpThreshold >= global pre-roll +<br>>> 120. So with your 250 seconds pre-roll I would try something like<br>>> 370 or<br>>> 400 for WakeUpThreshold. That should give you about 120 seconds between<br>>> events if I understand the problem properly.<br>>><br>>> Yes, I share your understanding of the logic but the HandleWakeSlave is<br>>> not called early enough.<br>>> My logs show most of the time only two REC_PENDING events, one on 60<br>>> seconds and one on 30 seconds.<br>>> I think I found where this comes from but I as this is the scheduler I<br>>> need to be very careful....<br>> I have changed the WakeUpThreshold to 600 (just to be on the safe side),<br>> and I still only get two REC_PENDING events (at 60 and 29 seconds), same<br>> as Klaas reports.<br>><br>> Cheers, Jan<br><br><br>OK thanks for testing.<br><br><br>The problem must be further up the code in the main scheduler loop which<span class="Apple-converted-space"> </span><br>is not calling HandleWakeSlave early or often enough for the code that<span class="Apple-converted-space"> </span><br>sends the REC_PENDING events to work properly. When it's working<span class="Apple-converted-space"> </span><br>properly it should be sending events at approximately 120, 90, 60 and 30<span class="Apple-converted-space"> </span><br>seconds before recording starts.<br><br></blockquote><div>There is the constant kSleepCheck = 300 and this is the maximum number of</div><div>seconds to wait between scheduler runs.</div><div>See commit <span style="color: rgb(36, 41, 47); font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: 12px; text-align: right; white-space: nowrap;">81dffd5ab6becb75f9e004ffe771519d23a58d87</span></div><div><span class="gmail-commit-author gmail-user-mention" title="Lawrence Rust" style="box-sizing: border-box; color: rgb(36, 41, 47); white-space: nowrap; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 14px;">Lawrence Rust</span><span style="color: rgb(36, 41, 47); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 14px; white-space: nowrap;"> authored and </span><span class="gmail-commit-author gmail-user-mention" title="Paul Harrison" style="box-sizing: border-box; color: rgb(36, 41, 47); white-space: nowrap; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 14px;">Paul Harrison</span><span style="color: rgb(36, 41, 47); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 14px; white-space: nowrap;"> committed </span><span datetime="2014-07-15T10:32:13Z" class="gmail-no-wrap" title="Jul 15, 2014, 12:32 PM GMT+2" style="box-sizing: border-box; white-space: nowrap; color: rgb(36, 41, 47); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 14px;">on Jul 15, 2014</span><span style="color: rgb(36, 41, 47); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 14px; white-space: nowrap;"> </span><span style="color: rgb(36, 41, 47); font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: 12px; text-align: right; white-space: nowrap;"><br></span></div><div><span style="color: rgb(36, 41, 47); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 14px; white-space: nowrap;">where this was changed from a hardcoded 300 to the constant.</span></div><div>When kSleepCheck is changed to 30 seconds then there is always one REC_PENDING<br></div><div>in the first time window, from 120 to 90 seconds.</div><div>Paul, do you think that it is a problem for the scheduler to wake up every 30 seconds?</div><div><br></div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;"><br>Klaas I wonder if we should be setting the default for WakeUpThresold<span class="Apple-converted-space"> </span><br>to pre-roll + 120 instead of 5 minutes if that setting is not present in<span class="Apple-converted-space"> </span><br>the DB?<br></blockquote><div> </div><div>I think that this is a good idea because if we do not do this then there is a constraint</div><div>on the RecordPreRoll value that is both unwanted and difficult to explain to the casual user.</div><div>And there is no GUI option to change the WakeUpThreshold as far as I know.</div><div>In the slightly longer run we may consider separating WakeUpThreshold and REC_PENDING events;</div><div>the WakeUpThreshold is about starting slave backends and that is not necessarily related to REC_PENDING events.</div><div><br></div><div>Klaas.</div><div><br></div></div></div><span style="caret-color: rgb(0, 0, 0); font-family: Palatino-Roman; font-size: 14px; font-style: 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; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;">_______________________________________________</span><br style="caret-color: rgb(0, 0, 0); font-family: Palatino-Roman; font-size: 14px; font-style: 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; -webkit-text-stroke-width: 0px; text-decoration: none;"><span style="caret-color: rgb(0, 0, 0); font-family: Palatino-Roman; font-size: 14px; font-style: 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; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;">mythtv-users mailing list</span><br style="caret-color: rgb(0, 0, 0); font-family: Palatino-Roman; font-size: 14px; font-style: 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; -webkit-text-stroke-width: 0px; text-decoration: none;"><a href="mailto:mythtv-users@mythtv.org" style="font-family: Palatino-Roman; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;">mythtv-users@mythtv.org</a><br style="caret-color: rgb(0, 0, 0); font-family: Palatino-Roman; font-size: 14px; font-style: 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; -webkit-text-stroke-width: 0px; text-decoration: none;"><a href="http://lists.mythtv.org/mailman/listinfo/mythtv-users" style="font-family: Palatino-Roman; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;">http://lists.mythtv.org/mailman/listinfo/mythtv-users</a><br style="caret-color: rgb(0, 0, 0); font-family: Palatino-Roman; font-size: 14px; font-style: 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; -webkit-text-stroke-width: 0px; text-decoration: none;"><a href="http://wiki.mythtv.org/Mailing_List_etiquette" style="font-family: Palatino-Roman; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;">http://wiki.mythtv.org/Mailing_List_etiquette</a><br style="caret-color: rgb(0, 0, 0); font-family: Palatino-Roman; font-size: 14px; font-style: 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; -webkit-text-stroke-width: 0px; text-decoration: none;"><span style="caret-color: rgb(0, 0, 0); font-family: Palatino-Roman; font-size: 14px; font-style: 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; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;">MythTV Forums:<span class="Apple-converted-space"> </span></span><a href="https://forum.mythtv.org/" style="font-family: Palatino-Roman; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;">https://forum.mythtv.org</a></div></blockquote></div><br></body></html>