2.5. Running Freja in a Virtualized Environment

When doing its analysis, Freja will by default try to detect the processor architecture of the machine the analysis is run on and use that for the analysis. This ensures that the analysis results are accurate with respect to the number of cores, threads and cache levels, cache sizes, cache sharing between threads, and so on.

However, when running in a virtualized environment it may not be possible to find a consistent hardware model for the virtual machine. The virtual machine may, for example, only have three virtual processors even though the physical machine it is running on has two quad-core processors. The mapping from virtual processors that virtualized software sees to actual cores or threads in the physical hardware may also change from one moment to the next.

In these circumstances Freja may not be able to accurately identify the processor architecture. When this happens Freja will print a warning during the analysis and assume that each virtual processor is a separate single-core, single-threaded processor:

$ report -i sample.smp
Info: Failed to auto-detect processors, the number of threads differs
between packages, 1 vs 3. Assuming 4 single-core, single-threaded
Info: Processor auto-detection failure is often caused by running in
a virtualized environment. It is recommended that you manually
specify the processor model and number of processors you want to do
the analysis for.

A warning banner will also be included at the top of the generated report.

If this happens you should manually specify the processor model and number of processors you want to perform the analysis for. See Section 2.1.2, “Generating a Report from a Sample File” for how to set the processor model from the graphical user interface, or use the --cpu and --number-of-cpus options to the report command if you are using the command line tools, see Section, “Specifying the Processor Model”.