Personal tools

PCM2LQN

From Wissensbasis

Jump to: navigation, search

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 Martens.

PCM-to-LQN Transformation

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

Contents

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 the latest version of the LQNSolvers (http://www.sce.carleton.ca/rads/lqns/LQNSdownload/) and install them according to the instructions. (For a user manual and extensive documentation of the solvers refer to http://www.sce.carleton.ca/rads/lqns/)
    • For non-english Windows installations: 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.
  • Make sure that lqns, lqsim, and lqn2xml lie in the system path.
  • 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

Interpreting the Results



For Developers

Development Instructions

  • The transformation is part of the PCMSolver package: (SVN: code/PalladioCM.PCMSolver)
  • You can find the code implementing the transformation in the Palladio SVN at code\PalladioCM.PCMSolver\trunk\de.uka.ipd.sdq.pcmsolver\src\de\uka\ipd\sdq\pcmsolver\transformations\pcm2lqn\
  • A running example for PCM2LQN is available from: svn://LOGIN@141.3.52.13/code/Palladio.Examples/trunk/MIS2008-SIPEW

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
  • Generated Ecore-Model from "lqn.xsd" in LQN-Solver directory using this Tutorial
    • Error message: "The default value literal 0.5 must be a valid literal of the attribute's type"
    • Fixed by setting the underrelaxCoeff defaultValueLiteral="1"
  • Changed LqnCore.nsPrefix to "" in LqnCore.ecore
  • Generated code from the resulting genmodel.
  • Problem: generated class names do not match XML tag names
    • Example: the tag "lqn-model" becomes "LqnModelType"
    • Thus the lqns will not take these files as input.
    • Solution: fix the tag-names with Java code after saving the xmi file (not elegant, but working)
  • Problem: entry activity graphs not supported by this version of the lqns solver
    • It is impossible to specify acitivty 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.

Troubleshooting

  • "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

  • 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.
  • 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.
KIT – Universität des Landes Baden-Württemberg und nationales Forschungszentrum in der Helmholtz-Gemeinschaft