Contents 1. IntroductionWelcome to Optimization Performance Evaluation and Resource Allocator (OPERA) tool. OPERA helps you to design high performance distributed applications. Your application is composed of services. Services reside in containers; containers are hosted by computers or nodes which communicate through middlewares and networks. What you provide. You provide an XML document written in Performance Extensible Language (pxl) and the document will have the extension pxl. You can find the grammar of the pxl document in model.dtd, a Data Type Definition. It is assumed that you know:
What you get. After you solve the model, you will get a Result XML document with
The following sections show how to fill the XML input model.
2. ScenariosScenarios are triggered by user actions and denote traces through the application. Scenarios can be derived from Use Cases, from Class diagrams, as defined by UML, or by tracing the application using application profilers. The diagram below shows the UML class diagram of an web application that implements an Internet Auction and supports three scenarios:
Client calls the Proxy , the Proxy calls RPCRouter which calls the Data service through a session bean (EJBItemSession ) and one or more entity beans (EJBItem ).
To fill in the scenarios, you have to identify the ServicesFor each service you add service attributes:
ExampleBelow is an example of how to define two services: <Scenarios> <Services> <Service name="Browser" canMigrate="false" runsInContainer="Client"/> <Service name="RPCRouter" canMigrate="false" runsInContainer="WebContainer" /> ... </Services> ... </Scenarios> ScenarioFor each scenario, you define the attributes:
The
Each call makes use of CPU and DISK, as defined by the element
When writing the Example<Scenarios> <Services> ... </Services> <Scenario name="find" triggeredByService="Browser"> <Call caller="Browser" callee="RPCRouter" invocations="1" type ="s" bytesSent="514" bytesReceived="575"> <Demand CPUDemand="8" DiskDemand="2" /> </Call> <Call caller="RPCRouter" callee="EJBItemSession" invocations="1" type="s" bytesSent="514" bytesReceived="575"> <Demand CPUDemand="15" DiskDemand="1" /> </Call> <Call caller="EJBItemSession" callee="EJBItem" invocations="1" type="s" bytesSent="10" bytesReceived="10"> <Demand CPUDemand="9" DiskDemand="1" /> </Call> <Call caller="EJBItem" callee="Data" invocations="1" type="s" bytesSent="10" bytesReceived="10"> <Demand CPUDemand="13" DiskDemand="3" /> </Call> </Scenario> ... </Scenarios> 3. TopologyThe topology denotes the nodes and the network hosting the application, the clusters, the middleware . For the Auction application exemplified above, the topology might look like in the following diagram: there are two nodes, ClientNode and WebNode. On the WebNode there are 3 containers, WebServer, AppServer and DataServer. The first two containers belong to the same cluster, Web Cluster. The <Topology> <Node name="ClientNode" type="client" CPURatio="1" CPUMultiplicy="2" DiskRatio="1" DiskMultiplicity="2"/> <Node name="WebNode" type="server" CPURatio="1" CPUMultiplicity="4" DiskRatio="1" DiskMultiplicity="1"/> <Node name="DataHost" type="server" CPURatio="0.1" CPUMultiplicity="4" DiskRatio="1" DiskMultiplicity="1"/> <Cluster name="WebCluster"> <Container name="WebServer" runsOnNode="WebNode" server="true" multiplicity="50"/> <Container name="AppServer" runsOnNode="WebNode" server="true" multiplicity="50"/> </Cluster> <Middlware name="http" fixedOverheadSend="0" fixedOverheadReceive="0" overheadPerByteSent="0"/> <Network name="Internet" connectsNodes="ClientNode WebNode" latency="10" overheadPerByte="0.01" /> </Topology> The Node
Cluster
A Container
Network
Middleware
4. WorkloadsIn the Workloads section you define: kind attribute: Type specifies the kind of
workload the application is optimized for. Users element. Total number of users do you want your application to support. It can be any integer greater than 1. This number is used for finding the worst response time and highest utilization across all workload mixes. Workload mixes define the number of users for each scenario. You can define as many workload mixes as you need. Note that the workload mixes are independent of the Users element described above. The workload mixes can consider the system as a closed or open model. When the system is considered as open, then the openModel attribute should be set to “true”. When the system is modeled as a closed model, then the openModel attribute is set to “false”. The value of the openModel attribute has implications on the meaning of the Mix elements. Mix element defines the load of a given scenario by setting the load attribute. When the system is modeled as an open system ( openModel=”true”) then the load attributes define the arrival rate in that scenario. When the system is modeled as a closed system ( openModel=”false”) then the load attributes define the number of users in that scenario. In this latter case, the number of users is complemented by the Think Times element defined below. Think Times. Think times for each scenario. They denote the user idle time between two requests in milliseconds. These values are considered in tandem with the Users element defined above or with those Workload Mixes that refer to closed models. Example<Workloads kind="HL"> <Users>150</Users> <WorkloadMixes openModel=”false”> <Mix scenario="find" load="100"/> <Mix scenario="makeBid" load="23"/> <Mix scenario="createBid" load="27"/> </WorkloadMixes> <ThinkTimes> <ThinkTime scenario="find" time="3000"/> <ThinkTime scenario="makeBid" time="3000"/> <ThinkTime scenario="createBid" time="3000"/> </ThinkTimes> </Workloads> 5. RequirementsResponse time. Here, for each scenario, you specify a lower (minResponseTime) and an upper (maxResponseTime) value of the targeted response time. The values are real numbers, greater than zero. The tool will try to optimize the distribution of the services that can migrate so it reaches the lower value for each scenario. Example<Requirements> <ResponseTime scenario="find" minResponseTime="1000" maxResponseTime="100000"/> <ResponseTime scenario="makeBid" minResponseTime="400" maxResponseTime="100000"/> <ResponseTime scenario="createBid" minResponseTime="400" maxResponseTime="100000"/> </Requirements> 6. ResultsThe results are presented in an XML format and the name of the output file has “Result” appended at the name of the input XML file. In the results you have all Architectures that are better than your initial configuration with regard to the performance requirements. These configurations are found by APERA while trying to find the best architecture. Below is an example of results for a recommended architecture. Example<Architecture name="0" recommend="true"> ... <Service MaxUtilization="43.72830303256987" runsInContainer="WebServer" name="RPCRouter"/> <Service MaxUtilization="36.299644824470704" runsInContainer="AppServer" name="EJBItemSession"/> ... <Scenario name="find"> <MaxResponseTime value="2378.3878753673257"/> <MinSatisfaction value="0.9860768901478048"/> </Scenario> ... <Workload users="1"> <Scenario name="find" users="0.009999999776482582"> <ResponseTime> 88.90841516804296 </ResponseTime> <Throughput> 3.2479042660763243E-6 </Throughput> </Scenario> ... <Node name="WebHost"> <CPU> <Utilization>0.0175581708471691</Utilization> </CPU> <DISK> <Utilization>0.001656431211997085</Utilization> </DISK> </Node> </Workload> ... </Architecture> Service utilization. Replication and activation policies are closely related to the maximum service utilization. The utilization of a process is the sum of its services utilizations. In general, processes with maximum utilization near zero need only activated by request. Depending on the request arrival distribution, the activation policy should be shared server (in which one instance of the service is shared by all requests) or server per request (an instance of the service is activated for each request). The latter may be more appropriate if startup overheads are low relative to the resource demands needed to provide the service. Terminating a process permits the allocation of system resources to other low-frequency processes. In the example above, the MaximumUtilization of RPCRouter is 43.7. That means that, in average, WebServer should have 43.7 threads. A safe design is to set the number of threads to a higher level than that predicted by APERA. Following the same logic, the number of threads for the EJB container should be greater than the MaximumUtilization of the EJBItemSession service which is 36.2. Extreme metrics. These metrics give the worst case values for two metrics across all the workload mixes possible for the number of users defined by the Users element. If the total number of users is 100, their distribution across different scenarios can be arbitrary: for our sample, 98 might be doing scenario 0, 1 is doing scenario 1 and 1 user is doing the scenario 2. There are an extremely large number of combinations that users might be distributed across all scenarios. APERA will find the worst case scenario across all mixes. · MaxResponseTime gives the maximum response per scenario, across all workload mixes · MinSatisfaction is a measure between 0 and 1 that gives the degree in which the required response time for each scenario is fulfilled. 1 means that the response time of the scenario is less than or equal to the lower response time limit set in requirements. 0 means that the response time of that scenario is beyond the upper limit set in the requirements. The optimization algorithm tries to maximize the minimum satisfaction for all scenarios. Workload. For the workloads declared in the Workloads XML element in the pxl file, APERA predicts the response time (ResponseTime XML element) and throughput (Throughput XML element) for each scenario. Also, for each workload, the utilizations of the Hosts (CPU and Disk) are reported. |