NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Station Globals resource related question( how much it allocates / optimal size of it in system)

Hi, 

I have some questions StationGlobal’s oriented:

1. Does the variables of type StationGlobal allocate equals amount of memory without reference to type?

   For example: Number/String/Boolean/Object Reference allocates equals resources:Number=String=Boolean=Object Reference=’X’ bytes)

   Or Number=’X’ bytes, String=’Y’ bytes, Boolean=’Z’ bytes?

2. Does it make the difference if I have 10 or 100 or 1000 StationGlobals variables allocated in my system regards  - resources of my system and

    how the quantity of it influences(or not influences) to performance of system/Test execution?

 

Those questions are important, because we want to know how the quantity/type of StationGlobal’s lvariables influence to overall throughput/performance of

System (e.g. Test running).

Thank you & Best Regards

*I use LabVIEW 2018 & TestStand 2021 versions
0 Kudos
Message 1 of 9
(3,687 Views)

The amount of memory used depends on the number and type of variables just like you would expect. For example an array of 1000 numbers takes more memory than a single number, or a string holding a long value takes more memory than a string holding a short one.

However, unless you have absolutely enormous arrays of complex data structures, you are very unlikely to see any measurable performance difference.

Also, if you happen to build a system that uses more than the available amount of RAM such that it frequently swaps to disk, you can just add more RAM. The Windows task manager is an easy way to see if you are using more the amount of physical memory on your machine.

0 Kudos
Message 2 of 9
(3,681 Views)

Thanks,

Where i can find exact information about how many memory resources every from different types  uses ?

Thank you & Best Regards

*I use LabVIEW 2018 & TestStand 2021 versions
0 Kudos
Message 3 of 9
(3,651 Views)
The exact amount of memory used per data type is not documented because data objects have flags, type pointers, and other bits of implementation information that we might change at any time.
 
You can get a good estimate by allocating a lot of variables and seeing the effect. However, I suspect that for practical purposes, this information is not going to be relevant or useful to you.
0 Kudos
Message 4 of 9
(3,629 Views)

Strange thing...

So if I understood you corectly, the right/single way to check the influence of my allocated variables is to check the amount of memory from

windows task manager???

Thank you & Best Regards

*I use LabVIEW 2018 & TestStand 2021 versions
0 Kudos
Message 5 of 9
(3,612 Views)

Not so strange IMHO. You might be making a mental analogy to C data structures where nothing is abstracted and you know exactly what is happening to each byte.

However, TestStand variables are black box objects with a lot more functionality than plain C data structures. Like most such objects you create via almost any object oriented API, their exact memory usage is NOT documented.

One reason memory usage is not documented is that we need to be free to change the implementation if necessary, which would not be possible if we make guarantees about exact memory usage. Another reason it is not documented is because in most practical cases, it is not important, and we don't want to mislead people into worrying about it.

If you are allocating data structures of such vastness that it actually does matter, then the task manager is an appropriate and easy tool to use to view the approximate magnitude of memory used by the objects you create. This applies to most objects from most APIs, not just TestStand variables.

 

0 Kudos
Message 6 of 9
(3,598 Views)
Hi, James
 
Thank you for the answer!
1. Is it official information regards National Instruments?
2. Has the National Instruments software Tool like 'OptimizeIt' for Java, that can provide for me information how my instances/allocated
    objects got resources(memory)? 
Thank you & Best Regards

*I use LabVIEW 2018 & TestStand 2021 versions
0 Kudos
Message 7 of 9
(3,579 Views)

1.  Hmm. I don't understand. If you are asking if my response is an official response from NI, then I'd say that while no one has approved my response, I do work at NI on the TestStand product.

2. No, there is no such tool. I have not heard many (any?) other requests for one. There is a feature in TestStand 3.5, Configure>>Station Options>>Preferences>>Debug Options>>Report Object Leaks, that will tell you which TestStand objects (if any) that you have allocated but failed to release at the time the engine shuts down.

 

 

Message 8 of 9
(3,570 Views)
Thank you James for many of clarifications regards my question!
Thank you & Best Regards

*I use LabVIEW 2018 & TestStand 2021 versions
0 Kudos
Message 9 of 9
(3,554 Views)