Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-23368

Use masterPriority=0 for scripts to speed up script launch

    XMLWordPrintable

    Details

    • Story Points:
      1
    • Sprint:
      TSSW Sprint - Feb 17 - Mar 2
    • Team:
      Telescope and Site

      Description

      As explained in DM-22382 it would speed up script launching significantly if we launch scripts with a lower masterPriority than some other existing SAL component. The obvious choice is to use a value lower than the masterPriority of the ScriptQueue itself.

      Unfortunately, it appears that master priority cannot be set programmatically. However, it suffices to set the value when the Domain Participant is created. So I propose the following:

      • When the ScriptQueue starts up it reads the OpenSplice configuration file pointed to by OSPL_URI.
      • If it finds "masterPriority=<number>" then it writes a copy of the file to a temporary directory with masterPriority=0 and changes OSPL_URI to point to the copy.
      • Thus we only have to maintain a single copy of the configuration file and any scripts that are launched will use masterPriority=0.

      Note: it turns out that the following bit of configuration is not relevant or useful for speeding up script startup (ADLINK reported this on a recent ticket and I have confirmed it with the speed test I sent to ADLink). Apparently it only affects a more persistent form of durability than we use:

      <Persistent>
          <StoreDirectory>/home/saluser/dds_cache/</StoreDirectory>
          <StoreMode>XML</StoreMode>
      </Persistent>
      

        Attachments

          Issue Links

            Activity

            Hide
            rowen Russell Owen added a comment -
            Show
            rowen Russell Owen added a comment - Pull request: https://github.com/lsst-ts/ts_scriptqueue/pull/42
            Hide
            rowen Russell Owen added a comment - - edited

            ADLink offered a much simpler way of setting master priority. However it requires some support in the OPSL configuration file that we use (ospl.xml) so I filed DM-23462. If Dave Mills agrees to that then I'll change this code so that BaseScript sets OSPL_MASTER_PRORITY="0" (or whatever environment variable he prefers to use, but I hope it'll be that one) and get rid of all the other code I wrote on the ticket branch.

            Meanwhile I propose to leave this hanging until we get agreement fromDave about DM-23462.

            Show
            rowen Russell Owen added a comment - - edited ADLink offered a much simpler way of setting master priority. However it requires some support in the OPSL configuration file that we use (ospl.xml) so I filed DM-23462 . If Dave Mills agrees to that then I'll change this code so that BaseScript sets OSPL_MASTER_PRORITY="0" (or whatever environment variable he prefers to use, but I hope it'll be that one) and get rid of all the other code I wrote on the ticket branch. Meanwhile I propose to leave this hanging until we get agreement fromDave about DM-23462 .
            Hide
            rowen Russell Owen added a comment - - edited

            Dave Mills has agreed to implement DM-23462 so I have redone this work. It is now a very simple change in ts_salobj only.

            Pull request: https://github.com/lsst-ts/ts_salobj/pull/87

            No changes are needed to ts_scriptqueue so I will withdraw that pull request.

            Show
            rowen Russell Owen added a comment - - edited Dave Mills has agreed to implement DM-23462 so I have redone this work. It is now a very simple change in ts_salobj only. Pull request: https://github.com/lsst-ts/ts_salobj/pull/87 No changes are needed to ts_scriptqueue so I will withdraw that pull request.
            Hide
            tribeiro Tiago Ribeiro added a comment -

            DM-23462 is still in progress... 

            Show
            tribeiro Tiago Ribeiro added a comment - DM-23462 is still in progress... 
            Hide
            tribeiro Tiago Ribeiro added a comment -

            Code reviewed I GitHub. 

            Show
            tribeiro Tiago Ribeiro added a comment - Code reviewed I GitHub. 
            Hide
            rowen Russell Owen added a comment -

            Merged to develop and master and released as ts_salobj v5.5.0

            Show
            rowen Russell Owen added a comment - Merged to develop and master and released as ts_salobj v5.5.0

              People

              Assignee:
              rowen Russell Owen
              Reporter:
              rowen Russell Owen
              Reviewers:
              Tiago Ribeiro
              Watchers:
              Dave Mills, Russell Owen, Tiago Ribeiro
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Jenkins

                  No builds found.