Showing results 1 to 7 of 7

Thread: Another question about ArchiveFilter memory consumption

  1. #1

    Default Another question about ArchiveFilter memory consumption

    Hallo!

    I use 6.51SP0 Build7

    When I use ArchiveFilter.Query or ArchiveFilter.QueryBlock in no matter VBA or VSTA code, I noticed tendency of occupy all available memory on big amount of data.
    To be concrete - if Query result contains about 20.000 values, then system memory consumtion in the moment of request increases on 1.5 GB (with decrease to normal values after DeleteArchiveFilter call).
    We really afraid that if someone will request some large amount of values this will lead to system crash of runtime..

    1. Are such increases correct?
    2. How traces this situation in zenOn? What should happens if result has to much values to be hold in memory?
    3. Should we, for example, manually split reqest interval into pieces and Query their by turns?
    Last edited by stolyarov_as : 23rd April 2012 at 09:24

  2. #2
    martins Gast

    Default Re: Another question about ArchiveFilter memory consumption

    Quote Originally Posted by stolyarov_as View Post
    Hallo!

    I use 6.51SP0 Build7

    When I use ArchiveFilter.Query or ArchiveFilter.QueryBlock in no matter VBA or VSTA code, I noticed tendency of occupy all available memory on big amount of data.
    To be concrete - if Query result contains about 20.000 values, then system memory consumtion in the moment of request increases on 1.5 GB (with decrease to normal values after DeleteArchiveFilter call).
    We really afraid that if someone will request some large amount of values this will lead to system crash of runtime..

    1. Are such increases correct?
    A short look in the source code told me that the Query() in VBA/VSTA simply creates an object which stores the archive data, gets all the variables that match, runs through all archives and checks the states. That is probably the explanation for the increasing memory, as there is a whole bunch of information that is loaded into the memory.

    I have no experience with archiving in VBA/VSTA, so I can't really tell anything useful here, but to me it still seems okay - depending on the filter.


    Quote Originally Posted by stolyarov_as View Post
    2. How traces this situation in zenOn? What should happens if result has to much values to be hold in memory?
    As far as I know, there is an entry in the zenon6.ini at [ARCHIV] called SPEICHER - it limits the maximum amount of values for ETM, archiving, AML and CEL in kB. Honestly, I don't know if that also works in VBA/VSTA or if this only affects the runtime itself - but you could give it a try.
    Try to avoid too much values in the memory as this slows down the runtime and affects runtime operation.

    Quote Originally Posted by stolyarov_as View Post
    3. Should we, for example, manually split reqest interval into pieces and Query their by turns?
    If you can do that, that would be an elegant solution, yes.

    sorry that I can't help you more on that one, maybe somebody else will check this thread and tell you more

    best regards,
    Martin

  3. #3
    martins Gast

    Default Re: Another question about ArchiveFilter memory consumption

    hi,

    maybe this could help you: since 6.51, there is a new property in zenon:

    ReadOnlyVarsInFilter As Boolean
    Element von zenOn.ArchiveFilter
    Load only in the filter defined variables.

    It is located as a property in the zenOn.ArchiveFilter class.

    If this is set to TRUE, only the archive values of variables that are in this filter are being read. All other archive vars don't have a value then. This works with all Query Functions.

    Note that ApplyChanges() returns an error if this property is set to TRUE.

    I don't have sufficient knowledge in archiving, so I can't really help you there, but maybe you can try if it is helpful for you?

    Hope this helps,
    best regards,
    Martin

  4. #4
    Join Date
    25.05.2010
    Location
    Dallas, TX
    Posts
    7

    Default Re: Another question about ArchiveFilter memory consumption

    Martin,

    Is it possible to execute the ArchiveFilter.QueryBlock method asynchronously? For example, what would happen if I had perhaps three (or more) BackgroundWorker instances - each of which would construct an instance of ArchiveFilter and call the QueryBlock method?

    I may want to do something like stolyarov_as suggested, in order to request a large amount of data...

    Originally Posted by stolyarov_as
    3. Should we, for example, manually split reqest interval into pieces and Query their by turns?
    Thanks!

    Scott

  5. #5
    Join Date
    15.10.2009
    Posts
    28

    Default AW: Another question about ArchiveFilter memory consumption

    Hallo Martins,

    laut Hilfedatei muss der Eintrag [ARCHIV] in die Datei 'Project.ini' eingetragen werden. Was ist richtig zenon6.ini oder Project.ini?

  6. #6
    Join Date
    02.02.2012
    Posts
    15

    Default Re: AW: Another question about ArchiveFilter memory consumption

    Quote Originally Posted by stimpfig View Post
    Hallo Martins,

    laut Hilfedatei muss der Eintrag [ARCHIV] in die Datei 'Project.ini' eingetragen werden. Was ist richtig zenon6.ini oder Project.ini?
    Der Abschnitt [ARCHIVE] ist in der project.ini zu finden.

    Damit Änderungen in der project.ini permanent sind und nicht bei jedem Runtime-Dateien erzeugen überschrieben werden, muss die project.ini im Projektverzeichnis bearbeitet werden (C:\ProgramData\COPA-DATA\SQL2012\[GUID des Projekts]\FILES\zenOn\system). Dabei darf das Projekt nicht im Editor geladen sein!

    mfG martin_f

  7. #7
    Join Date
    30.05.2007
    Location
    Salzburg
    Posts
    881

    Default Re: Another question about ArchiveFilter memory consumption

    Tipp:
    Im Editor das Projekt markieren (im Projektbaum) und dann CTRL+ALT+E drücken
    -> dann wird der Windows Explorer geöffnet mit dem SQL-Pfad des Projekts

    gruß,
    herbert


Similar Threads

  1. InitInstance():Out of memory
    By scotttee in forum zenon Service Engine Supervisor
    Replies: 3
    Last Post: 4th April 2012, 23:58
  2. Memory Leak when using IArchiveFilter.Query()
    By stolyarov_as in forum VSTA
    Replies: 7
    Last Post: 13th September 2011, 13:02
  3. CEL Entries from memory or file
    By roberto1978 in forum zenon Service Engine Supervisor
    Replies: 2
    Last Post: 8th February 2010, 11:57
  4. ArchiveFilter.Raster
    By gz0000 in forum VBA
    Replies: 0
    Last Post: 13th October 2009, 07:13
  5. memory on windows CE
    By sebastiank in forum zenon Service Engine Operator
    Replies: 0
    Last Post: 19th September 2007, 08:05

Posting Rules

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •