#932 In-memory cache ?

Jim Langston Tue 29 Jun 2021

For the in-memory cache - I'm trying to determine the memory footprint haystack is occupying when fully cached. This is needed in order to size the appropriate hardware.

I have read in the README that in-memory cache is used and is built on startup and during stop/starts and under other circumstances needs to be rebuilt. None of this details any way of a) what size it can grow to , b) a good process for determining the current size.

Is there any way to determine those 2 questions ?

Jim

Brian Frank Tue 29 Jun 2021

Can you confirm - is your question about nhaystack?

Jim Langston Wed 30 Jun 2021

From the nHaystack documentation

1.1 The Cache The NHaystackService maintains an in-memory cache of all the Haystack records it finds in your Niagara Station. When you first add the NHaystackService to your station it needs to be enabled. This can be done from the Property Sheet of the NHaystackService. When the service initialises it builds the in-memory cache of the Haystack records it finds.

This process also happens when the station is started or restarted. If you examine the output from the Application Director of your station you will see a number of messages logged there advising of the status of the cache building process.

If at anytime whilst the station is running you make a change to any tags or site/equipment entities then it you must make sure you execute a cache rebuild. This can be done by finding the NHaystackService in your station and right-clicking on the service. From the context menu that appears select Actions->Rebuild Cache. If you do not do this then your changes will not appear in any queries to the NHaystackService from either internal or external clients.

Login or Signup to reply.