You are viewing a plain text version of this content. The canonical link for it is here.
Posted to olio-commits@incubator.apache.org by sh...@apache.org on 2009/09/21 22:07:56 UTC
svn commit: r817439 - in /incubator/olio/workload/java/trunk:
deploy/benchmark.xml deploy/config.xhtml deploy/run.xml
src/org/apache/olio/workload/harness/OlioBenchmark.java
Author: shanti
Date: Mon Sep 21 22:07:55 2009
New Revision: 817439
URL: http://svn.apache.org/viewvc?rev=817439&view=rev
Log:
Fix for OLIO-113. The configuration uses the GlassFishService which is in faban samples.
Modified:
incubator/olio/workload/java/trunk/deploy/benchmark.xml
incubator/olio/workload/java/trunk/deploy/config.xhtml
incubator/olio/workload/java/trunk/deploy/run.xml
incubator/olio/workload/java/trunk/src/org/apache/olio/workload/harness/OlioBenchmark.java
Modified: incubator/olio/workload/java/trunk/deploy/benchmark.xml
URL: http://svn.apache.org/viewvc/incubator/olio/workload/java/trunk/deploy/benchmark.xml?rev=817439&r1=817438&r2=817439&view=diff
==============================================================================
--- incubator/olio/workload/java/trunk/deploy/benchmark.xml (original)
+++ incubator/olio/workload/java/trunk/deploy/benchmark.xml Mon Sep 21 22:07:55 2009
@@ -3,7 +3,7 @@
<!-- Note: Most of these fields are not needed for a benchmark
implemented using the Faban driver framework. -->
<name>Java Olio Workload</name>
- <version>0.1</version>
+ <version>0.2</version>
<config-form>config.xhtml</config-form>
<config-file-name>run.xml</config-file-name>
<benchmark-class>org.apache.olio.workload.harness.OlioBenchmark</benchmark-class>
Modified: incubator/olio/workload/java/trunk/deploy/config.xhtml
URL: http://svn.apache.org/viewvc/incubator/olio/workload/java/trunk/deploy/config.xhtml?rev=817439&r1=817438&r2=817439&view=diff
==============================================================================
--- incubator/olio/workload/java/trunk/deploy/config.xhtml (original)
+++ incubator/olio/workload/java/trunk/deploy/config.xhtml Mon Sep 21 22:07:55 2009
@@ -11,7 +11,7 @@
<xforms:model id="benchmark-model">
<xforms:instance id="benchmark-instance" src="{benchmark.template}"/>
<xforms:submission xforms:action="schedule-run.jsp" xforms:replace="all" id="submission-debug" xforms:method="post"/>
- <xforms:bind id="bind-web20" xforms:nodeset="/web20">
+ <xforms:bind id="bind-olio" xforms:nodeset="/olio">
<xforms:bind id="bind-jvmConfig" xforms:nodeset="fh:jvmConfig">
<xforms:bind id="bind-javaHome" xforms:nodeset="fh:javaHome"/>
<xforms:bind id="bind-jvmOptions" xforms:nodeset="fh:jvmOptions"/>
@@ -35,7 +35,7 @@
<xforms:bind id="bind-simultaneous" xforms:nodeset="fd:simultaneous"/>
<xforms:bind id="bind-parallel" xforms:nodeset="fd:parallel"/>
</xforms:bind>
- <xforms:bind id="bind-webServer" xforms:nodeset="fd:driverConfig[@name='JavaUIDriver']">
+ <xforms:bind id="bind-webServer" xforms:nodeset="fd:driverConfig[@name='UIDriver']">
<xforms:bind id="bind-driver-agents" xforms:nodeset="fd:agents" xforms:type="positiveInteger"/>
<xforms:bind id="bind-driver-statsInterval" xforms:nodeset="fd:stats/fd:interval" xforms:type="positiveInteger"/>
<xforms:bind id="bind-driver-properties" xforms:nodeset="fd:properties">
@@ -52,14 +52,16 @@
</xforms:bind>
<!-- addition here -->
<xforms:bind id="bind-webServer-type" xforms:nodeset="type"/>
- <xforms:bind id="bind-webServer-binPath" xforms:nodeset="hostBinPath"/>
- <xforms:bind id="bind-webServer-logPath" xforms:nodeset="hostLogPath"/>
- <xforms:bind id="bind-webServer-confPath" xforms:nodeset="hostConfPath"/>
- <xforms:bind id="bind-webServer-phpIniPath" xforms:nodeset="phpIniPath"/>
- <xforms:bind id="bind-webServer-manualStart" xforms:nodeset="manualStart"/>
+ <xforms:bind id='bind-webServer-service' xforms:nodeset='fh:service'>
+ <xforms:bind id='bind-webServer-restart' xforms:nodeset='fh:restart' xforms:type="boolean"/>
+ <xforms:bind id='bind-webServer-service-config' xforms:nodeset='fh:config' >
+ <xforms:bind id='bind-webServer-cmdPath' xforms:nodeset='cmdPath'/>
+ <xforms:bind id='bind-webServer-logsDir' xforms:nodeset='logsDir'/>
+ <xforms:bind id='bind-webServer-configDir' xforms:nodeset='configDir'/>
+ </xforms:bind>
+ </xforms:bind>
</xforms:bind>
-
<xforms:bind id="bind-dbServer" xforms:nodeset="dbServer">
<xforms:bind id="bind-dbServer-hostConfig" xforms:nodeset="fa:hostConfig">
<xforms:bind id="bind-dbServer-host" xforms:nodeset="fa:host"/>
@@ -69,12 +71,15 @@
<xforms:bind id="bind-dbDriver" xforms:nodeset="dbDriver"/>
<xforms:bind id="bind-connectURL" xforms:nodeset="connectURL"/>
<xforms:bind id="bind-reloadDB" xforms:nodeset="reloadDB" xforms:type="boolean"/>
- <xforms:bind id="bind-autoCommit" xforms:nodeset="autoCommit" xforms:type="boolean"/>
<xforms:bind id="bind-load-scale" xforms:nodeset="scale" xforms:type="positiveInteger"/>
- <!-- addition here -->
- <xforms:bind id="bind-db-homePath" xforms:nodeset="dbHomePath" />
- <xforms:bind id="bind-db-confPath" xforms:nodeset="dbConfPath" />
+ <xforms:bind id='bind-dbServer-service' xforms:nodeset='fh:service'>
+ <xforms:bind id='bind-dbServer-service-config' xforms:nodeset='fh:config'>
+ <xforms:bind id='bind-db-serverHome' xforms:nodeset='serverHome'/>
+ <xforms:bind id="bind-db-confPath" xforms:nodeset="confPath" />
+ </xforms:bind>
+ </xforms:bind>
</xforms:bind>
+
<xforms:bind id="bind-dataStorage" xforms:nodeset="dataStorage">
<xforms:bind id="bind-dataStorage-hostConfig" xforms:nodeset="fa:hostConfig">
<xforms:bind id="bind-dataStorage-host" xforms:nodeset="fa:host"/>
@@ -84,23 +89,20 @@
<xforms:bind id="bind-reloadMedia" xforms:nodeset="reloadMedia" xforms:type="boolean"/>
<xforms:bind id="bind-mediaDir" xforms:nodeset="mediaDir"/>
</xforms:bind>
-<!-- change here -->
+
<xforms:bind id="bind-cacheServers" xforms:nodeset="cacheServers">
<xforms:bind id="bind-cacheServers-hostConfig" xforms:nodeset="fa:hostConfig">
<xforms:bind id="bind-cacheServers-hostPorts" xforms:nodeset="fa:hostPorts"/>
<xforms:bind id="bind-cacheServers-tools" xforms:nodeset="fh:tools"/>
<xforms:bind id="bind-cacheServers-userCommands" xforms:nodeset="fh:userCommands"/>
</xforms:bind>
- <xforms:bind id="bind-cache-binPath" xforms:nodeset="cacheBinPath"/>
- </xforms:bind>
- <!-- Shanti - comenting for now, as not used
- <xforms:bind id="bind-otherServers" xforms:nodeset="otherServers">
- <xforms:bind id="bind-otherServers-hostConfig" xforms:nodeset="fa:hostConfig">
- <xforms:bind id="bind-otherServers-host" xforms:nodeset="fa:host"/>
- <xforms:bind id="bind-otherServers-tools" xforms:nodeset="fh:tools"/>
+ <xforms:bind id='bind-cacheServers-service' xforms:nodeset='fh:service' >
+ <xforms:bind id='bind-cacheServers-service-config' xforms:nodeset='fh:config' >
+ <xforms:bind id="bind-cache-cmdPath" xforms:nodeset="cmdPath"/>
+ <xforms:bind id='bind-cache-serverMemSize' xforms:nodeset='serverMemSize' xforms:type="positiveInteger"/>
+ </xforms:bind>
</xforms:bind>
</xforms:bind>
- -->
</xforms:bind>
</xforms:model>
<xforms:model id="benchmark-labels">
@@ -114,7 +116,6 @@
<description>Description</description>
<scale>Concurrent Users</scale>
<loadScale>Loaded for Concurrent Users</loadScale>
- <autoCommit>AutoCommit</autoCommit>
<runControl>Run Control</runControl>
<unit>Unit</unit>
<time>Time (sec)</time>
@@ -139,14 +140,12 @@
<reloadDB>Reload Database</reloadDB>
<reloadMedia>Reload Images</reloadMedia>
<dbHomePath>Path for Database Home</dbHomePath>
- <webserverType>Web Server</webserverType>
+ <webserverType>Application Server</webserverType>
<webserverBinPath>Webserver bin Directory</webserverBinPath>
<webserverLogPath>Webserver logs Directory</webserverLogPath>
- <webserverConfPath>Webserver config files Directory</webserverConfPath>
+ <serverConfPath>Server Config Direcotry</serverConfPath>
<mediaDir>Media Directory</mediaDir>
- <phpIniPath>php.ini Directory</phpIniPath>
- <dbConfPath>DB config file Directory</dbConfPath>
- <otherServers>Cache, Storage, or Other Servers</otherServers>
+ <dbConfPath>DB config file</dbConfPath>
<agents>Agents</agents>
<statsInterval>Stats Collection Interval</statsInterval>
<serverConfig>Server Information</serverConfig>
@@ -156,7 +155,8 @@
<hostPorts>Host:Port Pairs</hostPorts>
<port>Port</port>
<cacheHostPorts>Memcached Hosts:Ports</cacheHostPorts>
- <cacheBinPath>Memcached bin Directory</cacheBinPath>
+ <cacheCmdPath>Path to Memcached command</cacheCmdPath>
+ <serverMemSize>Server Memory Size</serverMemSize>
<pathConfig>URL Path Configurations</pathConfig>
<java>Java</java>
<php>PHP</php>
@@ -170,6 +170,7 @@
<true>true</true>
<manualStart>Manual Start</manualStart>
<cancel>Cancel</cancel>
+ <restart>Restart Server? </restart>
</labels>
</xforms:instance>
</xforms:model>
@@ -315,67 +316,48 @@
<xforms:hint>The server host names or IP addresses and ports in the form host:port, space separated</xforms:hint>
<xforms:help>Enter the server host names or IP addresses and ports in the form host:port, space separated</xforms:help>
</xforms:input>
+ <xforms:input id="input-webServer-tools" xforms:bind="bind-webServer-tools">
+ <xforms:label xforms:model="benchmark-labels" xforms:ref="/labels/tools"/>
+ <xforms:hint>Enter tool commands to collect statistics, separated by semi-colon</xforms:hint>
+ <xforms:help>Enter tool commands to collect statistics, separated by semi-colon</xforms:help>
+ </xforms:input>
+ <xforms:input id="input-webServer-userCommands" xforms:bind="bind-webServer-userCommands">
+ <xforms:label xforms:model="benchmark-labels" xforms:ref="/labels/userCommands"/>
+ <xforms:hint>Enter any extra command or script to execute</xforms:hint>
+ <xforms:help>Enter any extra command or script to execute</xforms:help>
+ </xforms:input>
<xforms:select1 id="select1-webServer-type" xforms:bind="bind-webServer-type">
<xforms:label xforms:model="benchmark-labels" xforms:ref="/labels/webserverType"/>
<xforms:choices>
- <xforms:item>
- <xforms:label xforms:model="benchmark-labels" xforms:ref="/labels/apache"/>
- <xforms:value>apache</xforms:value>
- </xforms:item>
- <xforms:item>
- <xforms:label xforms:model="benchmark-labels" xforms:ref="/labels/lighttpd"/>
- <xforms:value>lighttpd</xforms:value>
- </xforms:item>
- <xforms:item>
+ <xforms:item>
<xforms:label xforms:model="benchmark-labels" xforms:ref="/labels/glassfish"/>
<xforms:value>glassfish</xforms:value>
</xforms:item>
<xforms:item>
- <xforms:label xforms:model="benchmark-labels" xforms:ref="/labels/glassfish"/>
- <xforms:value>tomcat</xforms:value>
+ <xforms:label xforms:model="benchmark-labels" xforms:ref="/labels/weblogic"/>
+ <xforms:value>weblogic</xforms:value>
</xforms:item>
- <xforms:hint>Choose the web server type.</xforms:hint>
- <xforms:help>Choose the web server type.</xforms:help>
+ <xforms:hint>Choose the application server</xforms:hint>
+ <xforms:help>Choose the application server</xforms:help>
</xforms:choices>
</xforms:select1>
- <xforms:input id="input-webServer-binPath" xforms:bind="bind-webServer-binPath">
+ <xforms:input id="input-webServer-cmdPath" xforms:bind="bind-webServer-cmdPath">
<xforms:label xforms:model="benchmark-labels" xforms:ref="/labels/webserverBinPath"/>
<xforms:hint>Enter the path to the webserver bin directory</xforms:hint>
<xforms:help>Enter the path to the webserver bin directory</xforms:help>
</xforms:input>
- <xforms:input id="input-webServer-logPath" xforms:bind="bind-webServer-logPath">
+ <xforms:input id="input-webServer-logPath" xforms:bind="bind-webServer-logsDir">
<xforms:label xforms:model="benchmark-labels" xforms:ref="/labels/webserverLogPath"/>
<xforms:hint>Enter the path to the webserver logs directory</xforms:hint>
<xforms:help>Enter the path to the webserver logs directory</xforms:help>
</xforms:input>
- <xforms:input id="input-webServer-confPath" xforms:bind="bind-webServer-confPath">
- <xforms:label xforms:model="benchmark-labels" xforms:ref="/labels/webserverConfPath"/>
- <xforms:hint>Enter the path to the webserver config files directory</xforms:hint>
- <xforms:help>Enter the path to the webserver config files directory</xforms:help>
- </xforms:input>
- <xforms:input id="input-webServer-phpIniPath" xforms:bind="bind-webServer-phpIniPath">
- <xforms:label xforms:model="benchmark-labels" xforms:ref="/labels/phpIniPath"/>
- <xforms:hint>Enter the path to the directory containing php.ini</xforms:hint>
- <xforms:help>Enter the path to the directory containing php.ini</xforms:help>
+ <xforms:input id="input-webServer-configDir" xforms:bind="bind-webServer-configDir">
+ <xforms:label xforms:model="benchmark-labels" xforms:ref="/labels/serverConfPath"/>
+ <xforms:hint>Enter the app server config directory</xforms:hint>
+ <xforms:help>Enter the app server config directory</xforms:help>
</xforms:input>
-
- <xforms:select1 id="select1-serverType" xforms:bind="bind-driver-serverType">
- <xforms:label xforms:model="benchmark-labels" xforms:ref="/labels/serverType"/>
- <xforms:choices>
- <xforms:item>
- <xforms:label xforms:model="benchmark-labels" xforms:ref="/labels/java"/>
- <xforms:value>jsp</xforms:value>
- </xforms:item>
- <xforms:item>
- <xforms:label xforms:model="benchmark-labels" xforms:ref="/labels/php"/>
- <xforms:value>php</xforms:value>
- </xforms:item>
- <xforms:hint>Choose the server architecture type.</xforms:hint>
- <xforms:help>Choose the server architecture type.</xforms:help>
- </xforms:choices>
- </xforms:select1>
- <xforms:select1 id="select1-manualStart" xforms:bind="bind-webServer-manualStart">
- <xforms:label xforms:model="benchmark-labels" xforms:ref="/labels/manualStart"/>
+ <xforms:select1 id="select1-restart" xforms:bind="bind-webServer-restart">
+ <xforms:label xforms:model="benchmark-labels" xforms:ref="/labels/restart"/>
<xforms:choices>
<xforms:item>
<xforms:label xforms:model="benchmark-labels" xforms:ref="/labels/false"/>
@@ -385,20 +367,10 @@
<xforms:label xforms:model="benchmark-labels" xforms:ref="/labels/true"/>
<xforms:value>true</xforms:value>
</xforms:item>
- <xforms:hint>Manual Override of Glassfish start/stop</xforms:hint>
- <xforms:help>Manual Override of Glassfish start/stop</xforms:help>
+ <xforms:hint>Restart the app server before run starts ?</xforms:hint>
+ <xforms:help>Restart the application server before the run starts ?</xforms:help>
</xforms:choices>
</xforms:select1>
- <xforms:input id="input-webServer-tools" xforms:bind="bind-webServer-tools">
- <xforms:label xforms:model="benchmark-labels" xforms:ref="/labels/tools"/>
- <xforms:hint>Enter tool commands to collect statistics, separated by semi-colon</xforms:hint>
- <xforms:help>Enter tool commands to collect statistics, separated by semi-colon</xforms:help>
- </xforms:input>
- <xforms:input id="input-webServer-userCommands" xforms:bind="bind-webServer-userCommands">
- <xforms:label xforms:model="benchmark-labels" xforms:ref="/labels/userCommands"/>
- <xforms:hint>Enter any extra command or script to execute</xforms:hint>
- <xforms:help>Enter any extra command or script to execute</xforms:help>
- </xforms:input>
</xforms:group>
</xforms:case>
<xforms:case id="case-servers">
@@ -434,21 +406,6 @@
<xforms:help>Yes to reload the database, otherwise database not reloaded.</xforms:help>
</xforms:choices>
</xforms:select1>
- <xforms:select1 id="select1-autoCommit" xforms:bind="bind-autoCommit">
- <xforms:label xforms:model="benchmark-labels" xforms:ref="/labels/autoCommit"/>
- <xforms:choices>
- <xforms:item>
- <xforms:label xforms:model="benchmark-labels" xforms:ref="/labels/yes"/>
- <xforms:value>true</xforms:value>
- </xforms:item>
- <xforms:item>
- <xforms:label xforms:model="benchmark-labels" xforms:ref="/labels/no"/>
- <xforms:value>false</xforms:value>
- </xforms:item>
- <xforms:hint>Yes if the database autocommits, otherwise loader commits.</xforms:hint>
- <xforms:help>Yes if the database autocommits, otherwise loader commits.</xforms:help>
- </xforms:choices>
- </xforms:select1>
<xforms:input id="input-load-scale" xforms:bind="bind-load-scale">
<xforms:label xforms:model="benchmark-labels" xforms:ref="/labels/loadScale"/>
<xforms:hint>Enter the number of concurrent users data is loaded for</xforms:hint>
@@ -464,15 +421,15 @@
<xforms:hint>Enter any extra command or script to execute</xforms:hint>
<xforms:help>Enter any extra command or script to execute</xforms:help>
</xforms:input>
- <xforms:input id="input-db-homePath" xforms:bind="bind-db-homePath">
+ <xforms:input id="input-db-homePath" xforms:bind="bind-db-serverHome">
<xforms:label xforms:model="benchmark-labels" xforms:ref="/labels/dbHomePath"/>
<xforms:hint>Enter the path to $DATABASE_HOME</xforms:hint>
<xforms:help>Enter the path to $DATABASE_HOME</xforms:help>
</xforms:input>
<xforms:input id="input-db-confPath" xforms:bind="bind-db-confPath">
<xforms:label xforms:model="benchmark-labels" xforms:ref="/labels/dbConfPath"/>
- <xforms:hint>Enter DB conf file directory</xforms:hint>
- <xforms:help>Enter DB conf file directory (e.g /etc)</xforms:help>
+ <xforms:hint>Enter the path to the DB config file </xforms:hint>
+ <xforms:help>Enter the path to the DB config file</xforms:help>
</xforms:input>
</xforms:group>
<xforms:group id="group-dataStorage">
@@ -530,10 +487,15 @@
<xforms:hint>Enter any extra command or script to execute</xforms:hint>
<xforms:help>Enter any extra command or script to execute</xforms:help>
</xforms:input>
- <xforms:input id="input-cacheServers-binPath" xforms:bind="bind-cache-binPath">
- <xforms:label xforms:model="benchmark-labels" xforms:ref="/labels/cacheBinPath"/>
- <xforms:hint>Enter the path to the cache server bin directory</xforms:hint>
- <xforms:help>Enter the path to the cache server bin directory</xforms:help>
+ <xforms:input id="input-cacheServers-binPath" xforms:bind="bind-cache-cmdPath">
+ <xforms:label xforms:model="benchmark-labels" xforms:ref="/labels/cacheCmdPath"/>
+ <xforms:hint>Enter path to the memcached command</xforms:hint>
+ <xforms:help>Enter path to the memcached command</xforms:help>
+ </xforms:input>
+ <xforms:input id="input-cacheServers-serverMemSize" xforms:bind="bind-cache-serverMemSize">
+ <xforms:label xforms:model="benchmark-labels" xforms:ref="/labels/serverMemSize"/>
+ <xforms:hint>Enter max. size of memcached cache (in MB)</xforms:hint>
+ <xforms:help>Enter max. size of memcached cache (in MB)</xforms:help>
</xforms:input>
</xforms:group>
<!-- Shanti - commenting for now, as not used
Modified: incubator/olio/workload/java/trunk/deploy/run.xml
URL: http://svn.apache.org/viewvc/incubator/olio/workload/java/trunk/deploy/run.xml?rev=817439&r1=817438&r2=817439&view=diff
==============================================================================
--- incubator/olio/workload/java/trunk/deploy/run.xml (original)
+++ incubator/olio/workload/java/trunk/deploy/run.xml Mon Sep 21 22:07:55 2009
@@ -1,22 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
-<web20>
+<olio>
<jvmConfig xmlns="http://faban.sunsource.net/ns/fabanharness">
- <javaHome>/Library/Java/Home</javaHome>
+ <javaHome>/usr/java</javaHome>
<jvmOptions>-Xmx1g -Xms256m -XX:+DisableExplicitGC</jvmOptions>
</jvmConfig>
- <fa:runConfig definition="org.apache.olio.workload.driver.JavaUIDriver" xmlns="http://faban.sunsource.net/ns/fabandriver" xmlns:fa="http://faban.sunsource.net/ns/faban" xmlns:fh="http://faban.sunsource.net/ns/fabanharness">
- <fh:description>Run with successful login, addPerson and addEvent transaction.</fh:description>
-
+ <fa:runConfig definition="org.apache.olio.workload.driver.UIDriver" xmlns="http://faban.sunsource.net/ns/fabandriver" xmlns:fa="http://faban.sunsource.net/ns/faban" xmlns:fh="http://faban.sunsource.net/ns/fabanharness">
+
+ <fh:description>Test run</fh:description>
<fa:hostConfig>
- <fa:host>129.150.13.15</fa:host>
+ <fa:host>driverHost</fa:host>
<fh:enabled>true</fh:enabled>
<fh:cpus>0</fh:cpus>
<fh:tools>vmstat 10</fh:tools>
<fh:userCommands/>
</fa:hostConfig>
- <fa:scale>100</fa:scale>
+ <fa:scale>50</fa:scale>
<fa:runControl>
<fa:rampUp>10</fa:rampUp>
@@ -28,7 +28,7 @@
<audit>false</audit>
<threadStart>
- <delay>1000</delay>
+ <delay>10</delay>
<simultaneous>false</simultaneous>
<parallel>false</parallel>
</threadStart>
@@ -43,7 +43,7 @@
</runtimeStats>
- <driverConfig name="JavaUIDriver">
+ <driverConfig name="UIDriver">
<agents>1</agents>
<stats>
<interval>10</interval>
@@ -55,39 +55,50 @@
</driverConfig>
</fa:runConfig>
- <coolstackHome>/opt/coolstack</coolstackHome>
-
<webServer>
<fa:hostConfig xmlns="http://faban.sunsource.net/ns/fabanharness" xmlns:fa="http://faban.sunsource.net/ns/faban">
<fa:hostPorts>myHost:8080</fa:hostPorts>
<enabled>true</enabled>
<cpus>0</cpus>
- <tools>vmstat 10; mpstat 10; netsum -a -i 10; vmstat 10</tools>
+ <tools>vmstat 10; mpstat 10; nicstat 10</tools>
<userCommands/>
</fa:hostConfig>
<type>glassfish</type>
- <hostBinPath>/Applications/NetBeans/glassfish-v2ur2/bin</hostBinPath>
- <hostLogPath>/Applications/NetBeans/glassfish-v2ur2/domains/domain1/logs</hostLogPath>
- <hostConfPath>/Applications/NetBeans/glassfish-v2ur2/domains/domain1/config</hostConfPath>
- <phpIniPath></phpIniPath>
- <manualStart>false</manualStart>
+ <fh:service xmlns:fh="http://faban.sunsource.net/ns/fabanharness">
+ <fh:name>GlassfishService</fh:name>
+ <fh:tools>NONE</fh:tools>
+ <fh:restart>true</fh:restart>
+ <fh:config>
+ <cmdPath>/opt/glassfish/bin</cmdPath>
+ <logsDir>/opt/glassfish/domains/domain1/logs</logsDir>
+ <configDir>/opt/glassfish/domains/domain1/config</configDir>
+ </fh:config>
+ </fh:service>
</webServer>
<dbServer>
<fa:hostConfig xmlns="http://faban.sunsource.net/ns/fabanharness" xmlns:fa="http://faban.sunsource.net/ns/faban">
- <fa:host>myDBHost</fa:host>
+ <fa:host>dbHost</fa:host>
<enabled>true</enabled>
<cpus>0</cpus>
- <tools>vmstat 10; mpstat 10; netsum -a -i 10</tools>
+ <tools>vmstat 10; mpstat 10; nicstat 10; iostat -xn 10</tools>
<userCommands/>
</fa:hostConfig>
<dbDriver>com.mysql.jdbc.Driver</dbDriver>
- <!--connectURL>jdbc:mysql://taxes-ge0/web20load?user=web20&password=web20&relaxAutoCommit=true&sessionVariables=FOREIGN_KEY_CHECKS=0</connectURL-->
- <connectURL>jdbc:mysql://myDBHost/bpwebapp?user=web20&password=web20&relaxAutoCommit=true&sessionVariables=FOREIGN_KEY_CHECKS=0</connectURL>
- <autoCommit>true</autoCommit>
+ <connectURL>jdbc:mysql://dbHost/bpwebapp?user=olio&password=olio&relaxAutoCommit=true&sessionVariables=FOREIGN_KEY_CHECKS=0</connectURL>
<reloadDB>true</reloadDB>
- <scale>1000</scale>
- <dbHomePath>/opt/coolstack/mysql_32bit</dbHomePath>
- <dbConfPath>/etc</dbConfPath>
+ <autoCommit>true</autoCommit>
+ <scale>50</scale>
+ <fh:service xmlns:fh="http://faban.sunsource.net/ns/fabanharness">
+ <fh:name>MySQLService</fh:name>
+ <fh:tools>Mysqlstats</fh:tools>
+ <fh:restart>false</fh:restart>
+ <fh:config>
+ <serverHome>/export/home/mysql</serverHome>
+ <user>olio</user>
+ <password>olio</password>
+ <confPath>/etc/my.cnf</confPath>
+ </fh:config>
+ </fh:service>
</dbServer>
<dataStorage>
<fa:hostConfig xmlns:fa="http://faban.sunsource.net/ns/faban"
@@ -99,28 +110,24 @@
<userCommands></userCommands>
</fa:hostConfig>
<reloadMedia>false</reloadMedia>
- <mediaDir>/path/to/myfilestore</mediaDir>
+ <mediaDir>/export/home/filestore</mediaDir>
</dataStorage>
<cacheServers>
<fa:hostConfig xmlns="http://faban.sunsource.net/ns/fabanharness" xmlns:fa="http://faban.sunsource.net/ns/faban">
- <fa:hostPorts></fa:hostPorts>
+ <fa:hostPorts>cacheHost:11211</fa:hostPorts>
<enabled>true</enabled>
<cpus>0</cpus>
- <tools></tools>
+ <tools>NONE</tools>
<userCommands/>
</fa:hostConfig>
- <cacheBinPath>/opt/coolstack/bin</cacheBinPath>
+ <fh:service xmlns:fh="http://faban.sunsource.net/ns/fabanharness">
+ <fh:name>MemcachedService</fh:name>
+ <fh:tools>MemcacheStats -i 10</fh:tools>
+ <fh:restart>true</fh:restart>
+ <fh:config>
+ <cmdPath>/usr/lib/memcached</cmdPath>
+ <serverMemSize>256</serverMemSize>
+ </fh:config>
+ </fh:service>
</cacheServers>
- <!-- Not used
- <otherServers>
- <fa:hostConfig xmlns="http://faban.sunsource.net/ns/fabanharness" xmlns:fa="http://faban.sunsource.net/ns/faban">
- <fa:host></fa:host>
- <enabled>true</enabled>
- <cpus>0</cpus>
- <tools></tools>
- <userCommands/>
- </fa:hostConfig>
- <serverList></serverList>
- </otherServers>
- -->
-</web20>
+</olio>
Modified: incubator/olio/workload/java/trunk/src/org/apache/olio/workload/harness/OlioBenchmark.java
URL: http://svn.apache.org/viewvc/incubator/olio/workload/java/trunk/src/org/apache/olio/workload/harness/OlioBenchmark.java?rev=817439&r1=817438&r2=817439&view=diff
==============================================================================
--- incubator/olio/workload/java/trunk/src/org/apache/olio/workload/harness/OlioBenchmark.java (original)
+++ incubator/olio/workload/java/trunk/src/org/apache/olio/workload/harness/OlioBenchmark.java Mon Sep 21 22:07:55 2009
@@ -1,39 +1,29 @@
-
-/* The contents of this file are subject to the terms
- * of the Common Development and Distribution License
- * (the License). You may not use this file except in
- * compliance with the License.
- *
- * You can obtain a copy of the License at
- * http://www.sun.com/cddl/cddl.html or
- * install_dir/legal/LICENSE
- * See the License for the specific language governing
- * permission and limitations under the License.
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * When distributing Covered Code, include this CDDL
- * Header Notice in each file and include the License file
- * at install_dir/legal/LICENSE.
- * If applicable, add the following below the CDDL Header,
- * with the fields enclosed by brackets [] replaced by
- * your own identifying information:
- * "Portions Copyrighted [year] [name of copyright owner]"
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * $Id: OlioBenchmark.java,v 1.20 2007/10/11 22:16:27 akara Exp $
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*
- * Copyright 2005 Sun Microsystems Inc. All Rights Reserved
*/
package org.apache.olio.workload.harness;
import com.sun.faban.common.Command;
import com.sun.faban.common.CommandHandle;
-import com.sun.faban.common.NameValuePair;
-import com.sun.faban.harness.DefaultFabanBenchmark;
-import com.sun.faban.harness.RunContext;
-import com.sun.faban.harness.engine.*;
+import com.sun.faban.harness.DefaultFabanBenchmark2;
-import java.io.File;
+import com.sun.faban.harness.PreRun;
import java.util.ArrayList;
-import java.util.List;
import java.util.logging.Logger;
import static com.sun.faban.harness.RunContext.*;
@@ -47,17 +37,11 @@
*
* @author Akara Sucharitakul and Kim LiChong
*/
-public class OlioBenchmark extends DefaultFabanBenchmark {
+public class OlioBenchmark extends DefaultFabanBenchmark2 {
static Logger logger = Logger.getLogger(
OlioBenchmark.class.getName());
int totalRunningTimeInSecs = 0;
- private List<NameValuePair<Integer>> memcacheServers;
- private String webServerBinPath, webServerLogPath, webServerConfPath;
- private String webServerPidPath, phpIniPath, cacheBinPath, dbConfPath;
- private boolean doGFmanualStart;
- WebServerService webServerService;
- MemcachedService memcachedService = MemcachedService.getHandle();
/**
* This method is called to configure the specific benchmark run
@@ -66,60 +50,10 @@
*
* @throws Exception If configuration was not successful
*/
- public void configure() throws Exception {
+ @PreRun public void prerun() throws Exception {
params = getParamRepository();
- //Obtaining configuration parameters
- String webserverType = params.getParameter("webServer/type");
-
- webServerBinPath = params.getParameter("webServer/hostBinPath");
- webServerLogPath = params.getParameter("webServer/hostLogPath");
- webServerConfPath = params.getParameter("webServer/hostConfPath");
- doGFmanualStart = Boolean.parseBoolean(params.getParameter("webServer/manualStart"));
- webServerPidPath = params.getParameter("webServer/hostPidPath");
- phpIniPath = params.getParameter("webServer/phpIniPath");
- cacheBinPath = params.getParameter("cacheServers/cacheBinPath");
- dbConfPath = params.getParameter("dbServer/dbConfPath");
- String dbhost = params.getParameter("dbServer/fa:hostConfig/fa:host");
- String[] webhosts = params.getParameter(
- "webServer/fa:hostConfig/fa:host").split(" ");
-
- if ("apache".equals(webserverType)) {
- webServerService = ApacheHttpdService.getHandle();
- for (String webhost : webhosts) {
- RunContext.getFile(webhost, webServerConfPath +
- File.separator + "httpd.conf", RunContext.getOutDir() +
- "httpd.conf." + getHostName(webhost));
- }
- } else if ("lighttpd".equals(webserverType)) {
- webServerService = LighttpdService.getHandle();
- for (String webhost : webhosts) {
- RunContext.getFile(webhost, webServerConfPath +
- File.separator + "lighttpd.conf",
- RunContext.getOutDir() + "lighttpd.conf." +
- getHostName(webhost));
- }
- } else if ("glassfish".equals(webserverType)) {
-
- webServerService = GlassfishService.getHandle();
- for (String webhost : webhosts) {
- RunContext.getFile(webhost, webServerConfPath +
- File.separator + "domain.xml",
- RunContext.getOutDir() + "domain.xml." +
- getHostName(webhost));
- }
- }
- if (phpIniPath != null && phpIniPath.length() > 0)
- for (String webhost : webhosts) {
- RunContext.getFile(webhost, phpIniPath + "/php.ini",
- RunContext.getOutDir() + "php.ini." +
- getHostName(webhost));
- }
-
- RunContext.getFile(dbhost, dbConfPath + "/my.cnf",
- RunContext.getOutDir() + "my.cnf." + getHostName(dbhost));
-
// Reloading database and media as necessary.
boolean reloadDB = Boolean.parseBoolean(
params.getParameter("dbServer/reloadDB"));
@@ -173,42 +107,6 @@
if (mediaHandle != null)
mediaHandle.waitFor();
- //start the memcache servers
- memcacheServers =
- params.getHostPorts("cacheServers/fa:hostConfig/fa:hostPorts");
-
- // Assign the default port.
- for (NameValuePair<Integer> hostPort : memcacheServers) {
- if (hostPort.value == null)
- hostPort.value = 11211;
- }
-
- int index = 0;
- String memServers[] = new String[memcacheServers.size()];
- int ports[] = new int[memcacheServers.size()];
- for (NameValuePair<Integer> thisCacheServer : memcacheServers) {
- memServers[index] = thisCacheServer.name;
- ports[index++] = thisCacheServer.value;
- }
-
- //no need to restart memcached at this point
- /*
- memcachedService.setup(memServers, ports, "-u mysql -m 256",
- cacheBinPath);
- if (!memcachedService.restartServers())
- throw (new Exception("Memcached server(s) restart failed"));
- */
-
- // Now start the web servers
- if(!doGFmanualStart){
- if (webServerService != null) {
- webServerService.setup(webhosts, webServerBinPath, webServerLogPath,
- webServerConfPath, webServerPidPath);
- if ( !webServerService.restartServers())
- throw (new Exception("Webserver(s) restart failed"));
- }
- }
-
//calculate total running time, including rampUp, steadyState,
// and rampDown
String rampUp = params.getParameter(
@@ -220,51 +118,5 @@
this.totalRunningTimeInSecs = Integer.parseInt(rampUp) +
Integer.parseInt(steadyState) + Integer.parseInt(rampDown);
- /*
- logger.info("Excuting jps command");
- Command jps = new Command("jps", "|", "grep","PELaunch","|", "awk","|", "'{print $1}'");
- CommandHandle jpsHandle = null;
- jps.setStreamHandling(Command.STDOUT, Command.CAPTURE);
- jpsHandle = exec(webhosts[0],jps);
- String output = jpsHandle.fetchOutput(Command.STDOUT).toString();
- logger.info("output from java command is " + output);
- */
-
- super.configure();
- }
-
- /* override DefaultBenchmark's end method to collect apache log file
- * via the OlioBenchmark harness class
- */
- public void end () throws Exception {
- //grab the system time on the Faban master machine
-
- super.end();
- //stop the memcached servers
- logger.info("Stopping Memcached servers");
- memcachedService.stopServers();
-
- if (webServerService != null) {
- // xfer logs
- logger.info("Transferring webserver error logs");
- webServerService.xferLogs(totalRunningTimeInSecs);
-
- // stop web servers
-
- if(!doGFmanualStart){
- logger.info("Stopping web servers");
- webServerService.stopServers();
- }
- }
- }
-
- /* Override DefaultBenchmark's kill method to stop the servers.
- */
- public void kill() throws Exception {
-
- memcachedService.stopServers();
- if (webServerService != null)
- webServerService.kill();
- super.kill();
}
}