1. clock synchronization in FABRIC VMs in a slice

clock synchronization in FABRIC VMs in a slice

Home Forums FABRIC General Questions and Discussion clock synchronization in FABRIC VMs in a slice

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #7681

    hello,

    we are conducting experiments that measure times to track related activity in VMs configured in a network.  we are recording times in microseconds. when we checked the recorded times we noticed a shift in the timings that resulted in errors in our calculations. a check on chronyc showed +/-27 ms offset between VM clock and source clock. attached is the screenshot. Is there a way to improve the accuracy of our timing calculations?

    #7684
    Hussam Nasir
    Moderator

      Hello,

      What are you using for the time synchroization source  ?

       

      #7729

      we did not specify any source. when we checked for the sources using the command chronyc sources, it gave us the screen shot that we attached.

      do you recommend synchronizing to any specific source?

      thanks

      Nirmala

      #7731
      Hussam Nasir
      Moderator

        okay . So since nothing is being used, all you are doing is running NTP against the default timeservers that chrony picks up. So even if your second VM may be on the same rack, you will achive the accuracy that NTP provides.

        Network Time Protocol (NTP) can achieve accuracy <mark class=”QVRyCf”>within tens of milliseconds over the internet, and within one millisecond in local area networks (LANs) under ideal conditions</mark>. However, accuracy can be affected by several factors, including:
        • Network congestion and asymmetric routes: These can cause errors of 100 milliseconds or more.
        • Stratum: The higher the stratum number, the lower the accuracy. Stratum 0 devices, such as atomic and GPS clocks, are the most accurate, but they can’t be connected to via a network connection.
        • Physical distance: The further the synchronizing server is from the client, the lower the accuracy

        If you would like more achive more accurate measurements you can use PTP. We do have a notebook that you can use to setup PTP in your slice which would allow you to synchronize the system clocks on your VMs.

        Just make sure the sites you use have the PTP capability as not all FABRIC sites use PTP.

        This notbeook show how to setup PTP synchronization on your VMs. https://github.com/fabric-testbed/jupyter-examples/blob/main/fabric_examples/public_demos/KNIT7/Tutorial1_Precision_Time_Measurements_in_FABRIC/knit7_install_PTP.ipynb

        Once setup, all the system clocks on all the VMs in the slice should be in sync to the order of 10s of microseconds or better

        #7732
        Hussam Nasir
        Moderator

          I would also like to mention that we do not use chrony in our PTP setup. We instead use a utility called phc2sys . There are other utilities in the linuxptp package that let you ask for timestamps and report accuracy.

          If you like to use chrony for this purpose, let me know and i can provide you instructions to disable the phc2sys and use chrony with the PTP device as a syncronization source.

          #7733

          Hello Hussam, we will test out PTP in the slices that support it and also check out your notebook. we will get back when we are familiar with it

           

          thanks

           

          #7757
          Nirmala Shenoy
          Participant

            hello Hussam, I went through the tutorial. How to find out if a site supports PTP?

             

            thanks

            Nirmala

            #7758
            Hussam Nasir
            Moderator

              I have a anotehr notebook in the same foler that show creating a site. The notebooks picks random sites using a filter that asks for PTP capable only. Here’s the relevant line

              sites = fablib.get_random_sites(count=4,filter_function=lambda x:x['ptp_capable'] is True, avoid=(avoid_sites))
              
              
              https://github.com/fabric-testbed/jupyter-examples/blob/main/fabric_examples/public_demos/KNIT7/Tutorial1_Precision_Time_Measurements_in_FABRIC/knit7_create_topology.ipynb
              
              #7767
              Nirmala Shenoy
              Participant

                thanks Hussam, that worked. I was able to set up my slice and all the nodes are PTP enabled.

                I notice a few notebooks – under the section on precision_time_measurements. I will check them out.

                I am Ok with using phc2sys – will give it a try

                 

                thanks

                 

                 

              Viewing 9 posts - 1 through 9 (of 9 total)
              • You must be logged in to reply to this topic.