Aus SDQ-Wiki

This page contains information about the PCM2LQN transformation. The transformation combines the Palladio Component Model with the solvers for Layered Queueing Networks. Concepts of the transformation and a case study are documented in a Paper published at SIPEW2008.
For more details or questions contact Heiko Koziolek or Anne Koziolek.

PCM-to-LQN Transformation

For an overview on PCM Solvers / Simulations see Palladio Solvers and Simulation.

For Users

Running PCM2LQN

The following steps are required to run PCM2LQN:

  • Install the unstable distribution of the PCM (PCM Installation), which includes the PCMSolver RunDialog (the stable distribution does not yet include the PCM2LQN tool).
  • Download version 5.8-6 (for PCM 4.0 and later) of the LQNSolvers (http://www.sce.carleton.ca/rads/lqns/LQNSdownload/). To get access, you need to fill out the license agreement, see http://www.sce.carleton.ca/rads/lqns for details. After downloading, install the solvers according to the instructions. (For a user manual and extensive documentation of the solvers refer to http://www.sce.carleton.ca/rads/lqns/)
    • Note that LQNSolvers expects some xsd files in C:\Program Files\LQN Solvers (hard coded path), so make sure to install it there or copy the xsd files from the LQNSolvers directory there (especially important for non-english Windows installations)
    • Older PCM versions work with version 4.3 of the LQN solvers
    • Version 5.9.2 of the LQN Solver seems to work with the PCM, but not yet with PerOpteryx and the EMF tree editor because the XML schema of the result files has slightly changed. Contact the PerOpteryx team if you want to use this combination.
  • Make sure that the executables lqns (and lqn2xml for version 4.3) lie in the system path (not only in the user path, but system variable path). For the LQN simulation, also have lqsim in the path (optional, note that lqsim has caused problems with the PCM before),
  • You need a complete PCM instance (including resourcetype, resourceenvironment, repository, allocation, system, usagemodel) to run the LQN solvers.
  • Import the project of your PCM instance into your workspace
    • "File/Import.../General/Existing Projects Into Workspace"
  • Create a configuration to launch PCM2LQN
    • "Run/Open Run Dialog.../"
    • select "PCM Solver" on the left hand side of the dialog"
    • select "New" at the top of the dialog
    • select your input files in the "Models file" tab
    • select the LQNS solver in the "Solver" Tab
  • Press the "Run" button at the bottom of the dialog.

Common Error Messages

  • If LQNS reports "Model failed to converge after XYZ iterations":
    • Go back to the Launch Configuration.
    • Select the "Solver" tab.
    • Try lowering the "Convergence Value"
    • Try increasing the "Iteration Limit"
    • If this does not solve the problem, select the LQSIM solver from the combo-box on this tab, and thus run the simulation (does consume more time)
    • More info is given in the LQNS User Manual (http://www.sce.carleton.ca/rads/lqns/LQNSUserMan.pdf)
  • LQN return error code 10
    • This means that LQN takes one input parameters for two because of spaces in the path of the input file
    • Open eclipse.ini and add "-Duser.dir=<Path to eclipse directory>" (e.g. "-Duser.dir=c:\eclipse")
    • Restart eclipse
    • The files processed by LQN will now be created in the eclipse directory
  • If LQNS reports "Derived population of n.n for task "identifier" is not valid."
    • Try deactivating "Infinite Task Multiplicity" in the PCM2LQN solver configuration

Interpreting the Results

You can select three types of output: XML, Human readable, and HTML in the run configuration dialogue.

XML result files

You can open the result files produced by PCM2LQN in the Palladio LQN editor, as shown in this screenshot (click to enlarge). In this example, the results for the usage scenario is selected in the editor and the result values are shown in the properties sheet below (the service time is highlighted).


Human readable results

A text file is produced that can be opened with any text editor.

HTML results

A HTML table is produced and opened automatically in Eclipse.

For Developers

The code location for the PCM2LQN is https://github.com/PalladioSimulator/Palladio-Analyzer-Solver.

The actual transformation is in the plugin https://github.com/PalladioSimulator/Palladio-Analyzer-Solver/tree/master/bundles/org.palladiosimulator.solver.

The EMF metamodel for LQNs is defined in the plugin https://github.com/PalladioSimulator/Palladio-Analyzer-Solver/tree/master/bundles/org.palladiosimulator.solver.lqn and the EMF editor in the .edit and .editor plugins.

The code for lqns and lqsim is also publicly available at https://github.com/layeredqueuing/V5.

Development Instructions

Open Issues

  • The "multiplicity" attribute of all tasks is currently hard coded with a value of 100 to emulate an unlimited thread pool. This should be made configurable.
  • More testing is needed, especially for passive resource usage.

Steps done while implementing the Transformation

Downloaded and installed LQN Solver

Generating the LQN EMF models

The ecore file was created by importing the LQN xsd file as described by the "Generating an EMF Model using XML Schema (XSD)" Tutorial (Last updated: May 21, 2008)

Then, the following manual changes were made

  • renamed LqnCore to lqn in the root element (name and nsPrefix)
  • changed ns URI of this lqn element to "http://palladiosimulator.org/Solver/LQN/2.0" and the prefix to "org.palladiosimulator.solver"
  • in lqn.genmodel: renamed LqnCore root element to Lqn (property prefix, then file extension was changed automatically, too)
  • in lqn.genmodel, set base package of Lqn to org.palladiosimulator.solver
  • in lqn.genmodel, set file extension to .lqxo (as .lqn is interpreted as a textual file by lqns as default and .lqxo is the file extension used as default output by lqns)

Added manually

  • bottleneckStrength attribute in ecore file (with annotations for XML)

Problems when initially implementing the transformation

(not clear whether still up to date)

  • Problem: entry activity graphs not supported by this version of the lqns solver
    • It is impossible to specify activity graphs for entries, but only for tasks
    • Solution: use task activity graphs (as in acitvity-temp.lqn)
    • However, mapping is then not convenient. A single task is then needed for each RDSEFF.
  • Problem: using PCM GUIDs for naming LQN elements is problematic when converting the resulting XML-file back to the old file format (.lqn). This file format uses the string "-1" as delimiter or termination symbol. If a GUID contains a hyphen "-" as the beginning of "-1", the resulting .lqn file is not parsable anymore.
    • Don't ask how much time I spent to find this error.
    • Solution: fixed this by replacing all hyphens in PCM GUIDs by "x" before using them to name LQN elements.


  • "n.n Replies generated by Entry "identifier"": Check that all probabilistic branch transition probabilities within one branch sum up to 1. Even if n.n is 1.0, check for small mismatches, e.g. by 1E-4 off.

Debugging the MIS Case Study

  • Branches / Nested Branches / Buggy Task Activity Graphs
    • The MIS Case Study contained two branches (one in Webserver, one in Reporting Component). Curiously, this lead to some calls in the following control flow having zero ("0") execution "Service Time" in the LQNS output. I removed the second branch, this corrected the error. I suspect the Task Acitivity Graphs have not been tested extensively.
      • Similar thing occurred for the SPECjEnterprise 2010 model. After a (superfluous) branch, an internal action in the control flow was erroneously executed twice, thus leading to a doubled resource utilization.
      • TODO: Check all models with Branches
  • Open Arrival Rate Error
    • MIS Case Study has a closed workload and only synchronous calls. Nevertheless, executing LQNS with higher workloads lead to "Open Arrival Rate on Task XY being too high" error messages, whereas the synch calls/closed workload would imply no open arrivals.
    • The source for the error message are the "infinite server" scheduling disciplines used for the LQN tasks (not the processors!) in the model. The transformation uses them, because Palladio components by default have no thread pool and serve requests immediately.
    • I have created a workaround to deal with this problem: The mapping now sets the multiplicity attribute of all tasks to a value larger than the multiplicity of the reference tasks (i.e., the user population). Thereby, each task has an implicit, large thread pool and can serve the incoming requests immediately. Each task now has the FCFS scheduling discipline.