Local machine’s characteristics and KLA configuration
Below follows some considerations you must bear in mind to properly configure your analyses.
Java Virtual Machine
Every step is performed through the execution of a JVM process.
Java 8 (64 bits) or above —either JDK or JRE— is required.
By default, KLA comes with pre-configured default values:
max memory to use during every single step
max duration time (timeout) of every single step
These parameters are configured through KLA configuration mechanism, please do not modify KLA scripts to include JVM flags such as -Xmx, use the mechanisms Kiuwan provides.
Single and parallel execution of analyses
Every Kiuwan analysis executes sequentially, i.e. every step is executed sequentially and following the order specified above:
For every technology
Report generation, encryption and uploading to Kiuwan cloud
Every step is executed by a “new” JVM, and Kiuwan configuration applies to all of those JVM instances.
Therefore, those memory-cpu consuming steps may result in full use (near to 100%) of a CPU core.
By default, KLA comes pre-configured with the following memory default values (analyzer.properties):
If you notice that your local analysis ends with an Out of Memory (OOM) error, you need to increase the max memory allocated to the JVM (by default, 1Gb).
Below troubleshooting links can help you to identify OOM errors:
You can configure Kiuwan to increase memory limits either for the whole installation or per application.
- If you are using Kiuwan GUI, please visit https://www.kiuwan.com/docs/display/K5/Kiuwan+Local+Analyzer+GUI+-+Graphical+User+Interface#KiuwanLocalAnalyzerGUI-GraphicalUserInterface-AnalysisConfigurationtab
- If you uses CLI , please visit https://www.kiuwan.com/docs/display/K5/Kiuwan+Local+Analyzer+CLI+-+Command+Line+Interface#KiuwanLocalAnalyzerCLI-CommandLineInterface-Mostcommonlyconfiguredparameters
Although you were not getting an OOM, if you notice the process is performing a high activity of JVM garbage collection, this situation may indicate your analysis needs more memory and the performance is suffering due to gc activity. In theses cases, try to increase the max memory, most probably the analysis performance will be faster.
Max time (timeout) configuration
By default, every step of a local analysis is confgiured to a default max execution time (60 minutes) (analyzer.properties):
Default value (1 hour) is often enough for most of the analyses, but depending on several circumstances (code size, memory, ruleset, etc) could not be enough and a Timeout error occurs (https://www.kiuwan.com/docs/display/K5/Timeout+killed+the+subprocess ).
In this cases, increase the default value.
As you can imagine, timeout is closely related to available memory. A short value of max memory may produce timeouts due to garbage collection if the amount of memory required by the analysis is high.