4 Replies Latest reply on Sep 20, 2016 3:57 PM by Bhikadiya

    PIServer.UpdateValues Method with Compression

    Bhikadiya

      Hi,

       

      We have application server writing to PI server using latest AF SDK. Below is the method we used,

       

      List<AFValue> updates = new List<AFValue>();

      var errors = vPIServer.UpdateValues(updates, OSIsoft.AF.Data.AFUpdateOption.Replace, OSIsoft.AF.Data.AFBufferOption.BufferIfPossible);

       

      We also configured PI Buffer Subsystem on application server, so that every values passing through buffer into PI.

       

      We found two issues,

      1. Writing to PI Server is slow

      2. No compression on tag data. Every (duplicate) values has been archiving. Note: We have correct compression setting at tag level.

       

      What changes, we have to make to a) Speed up the write operations & b) Use Tag Compression

       

      - Thanks . Muki

        • Re: PIServer.UpdateValues Method with Compression
          Kenji Hashimoto

          For  no compression issue, we have a known issue item.

          25937OSI8 - events from PI SDK and/or AFSDK updatevalue() and updatevalues() calls with mergetype dmReplaceDuplicate or …

          For the performance issue, do you know how slow is it? (For example, 100 values/ sec etc...)

          • Re: PIServer.UpdateValues Method with Compression
            Rick Davin

            Kenji has addressed the compression issue.  Let's look at performance.

             

            You say you are latest AF SDK.  As of Sept 19, 2016, that would be PI AF 2016 SP2 or AF SDK version 2.8.2.7626.  Is this correct?

             

            What version is your Data Archive aka PI Server?

             

            From your abbreviated example code, I am going to assume that you are updating multiple PIPoints in the one call using the PIServer.UpdateValues overload.  How many PIPoints are in a typical update call?  How many AFValues are in a typical call?  In a given call is it possible for any PIPoint to have more than one value?

             

            Regards,

            Rick

            1 of 1 people found this helpful
              • Re: PIServer.UpdateValues Method with Compression
                Bhikadiya

                Hi Kenji, Rick Thanks for your kind suggestion.

                 

                We are having latest PI/AF Servers (2016) and using latest SDK and PI Buffer Subsystem.

                 

                - No compression on tag data. Every (duplicate) values has been archiving. Note: We have correct compression setting at tag level.

                We will be disabling the Buffering option on Application Server without making any SDK code changes, I believe this will enable the compression for tag data, with the same function call : vPIServer.UpdateValues(updates, OSIsoft.AF.Data.AFUpdateOption.Replace, OSIsoft.AF.Data.AFBufferOption.BufferIfPossible);

                 

                - Writing to PI Server is slow

                what we are seeing is, writing through PI Buffer Subsystem, Buffer Queue becomes full and throughput is slow ~70,000 Events/Sec.The AFValues collection has multiple Tags and multiple Time-stamps.

                 

                Note: Both application Servers and PI/AF Servers are in the same Domain/Network. Now, Does disabling the buffer, may boost the throughput ?

                 

                Any thoughts ?

                 

                -- Muki.

                 

                 

              • Re: PIServer.UpdateValues Method with Compression
                Bhikadiya

                Hi Team, please see the update.

                 

                After disabling the Buffering between the Application Server and the PI Server,

                 

                a) We are seeing truly compressing happening on the Tag data

                b) SDK application server can now able to push ~ 8 million events to PI Server in Snapshot. Out of that, only ~220,000 events archived in the PI Server Archive (uses the compression setting)

                 

                Wow ! Truly amazed.

                 

                Thanks Kenji, Rick for your kind thoughts. It truly helps.

                 

                -- Muki.

                1 of 1 people found this helpful