menu

Memory usage protocol as long-term measuring

Raw data description

On a linux based system, several status information data around the memory usage are stored in a file called "XXX_MemoryLogs.csv". XXX is filled with the timestamp at ToolScope startup. The file is placed in the directory "GarbageCollection" of the service area.

The data is given in the CSV-format. Due to the fact that it is meant to be opened by the German main development department, the format is hard coded to be easy importable in German Excel. For that, the column seperator is ";", the decimal seperator is "," . With this information you can import it in any software, which understands CSV.

Example for imported raw data:

Example for a fast graph from this raw data:

 

The coloums contain the following information:

 

Coloum Meaning
Hours Time since the ToolScope started in hours
RSS

Technically: value "VmRSS" from /proc/PID/status

Explained: sum of memory consumption of the main firmware application in memory and in swap space

Total

Technically: answer from Runtime.getRuntime().totalMemory() in Kilobyte

Explained: total heap size of the java heap (NOT: native heap)

Used

Technically: Difference between Runtime.getRuntime().totalMemory() and Runtime.getRuntime().freeMemory() in Kilobyte

Explained: used space on the java heap

DiffRSSToTotal

Difference between java heap size and the applications heap size

This is an indicator for the development of the heap outside the Java VM.

DiffRSSToUsed

Difference between used memory on the java heap and the applications heap size

This is an indicator for the development of the heap outside the Java VM.

 

Tweaking the memory measurements

The setting "DebugLevel(MemoryMonitoring)" configures the time steps between two memory measurements. The following values are planned:

  • 0 : do no memory measurement
  • 1: do one measurement per minute; this results in logging about 4KB/h. (Standard value)
  • 2: do one measurement per hour; this results in logging around 40 Bytes/h (not meaningful for current devices)
  • 3: do the measurements as fast as it it defined in "MinLogIntervalInMS(MemoryMonitoring)", which has a standard value of 100. This results in logging 1,5MB/h.

There is no logfile rotation. The logging continues, as long as the device is switched on. This means that a value of "3" needs special attention.

Doing garbage collection logs

The setting "EnableGargabeCollectionLog(FirmwareLauncher)" enables logs of the garbage collection. The log files are placed in the directory "GarbageCollection" of the service area.

Oracle documented those logs. The VM-option which generated those logs is "-Xloggc" . You can google that with "java Xloggc".