Skip to end of metadata
Go to start of metadata

JBoss5 Configuration

Important

This configuration is recommended for servers that require more than 500 concurrent users. Using these settings for smaller setups might not show optimal results.

LAMS Configuration settings

It is better to do this changes in the source code before compiling or changing them directly in the jboss instance.

lams_build/conf/unix/jboss/service/mysql-ds.xml

<?xml version="1.0" encoding="UTF-8"?>

<!-- $Id: mysql-ds.xml,v 1.2 2005/03/10 02:26:34 cperfect Exp $ -->
<!--  Datasource config for MySQL using 3.0.9 available from:
http://www.mysql.com/downloads/api-jdbc-stable.html
-->

<datasources>
  <!-- lams-ds datasource for use by LAMS Core and Services -->
  <local-tx-datasource>
    <jndi-name>jdbc/lams-ds</jndi-name>
    <connection-url>jdbc:mysql://localhost:3306/@db.name@</connection-url>
    <driver-class>com.mysql.jdbc.Driver</driver-class>
    <!-- Tell MySQL Connector to use UTF-8 character encoding, -->
    <!-- and convert MySQL zero times to null -->
    <connection-property name="characterEncoding">utf8</connection-property>
    <connection-property name="zeroDateTimeBehavior">convertToNull</connection-property>
    <!-- Set transaction isolation level to match db -->
    <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
    <user-name>@db.username@</user-name>
    <password>@db.password@</password>
    <!-- Set minimum adn maximum size of pool -->
    <max-pool-size>900</max-pool-size>
    <min-pool-size>0</min-pool-size>
    <!-- Connections not used after 5 minutes will be closed and removed -->
    <idle-timeout-minutes>5</idle-timeout-minutes>
  </local-tx-datasource>
</datasources>

lams_common/src/java/org/lamsfoundation/lams/applicationContext.xml

...
        <bean id="hibernateProperties" class="org.springframework.beans.factory.config.PropertiesFactoryBean">
                <property name="properties">
                <props>
                        <prop key="hibernate.connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</prop>
...
                        <prop key="hibernate.c3p0.maxPoolSize">800</prop>
...

lams_build/conf/unix/jboss/jboss-service.xml

...
   <mbean code="org.jboss.util.threadpool.BasicThreadPool"
      name="jboss.system:service=ThreadPool">
      <attribute name="Name">JBoss System Threads</attribute>
      <attribute name="ThreadGroupName">System Threads</attribute>
      <!-- How long a thread will live without any tasks in MS -->
      <attribute name="KeepAliveTime">60000</attribute>
      <!-- The max number of threads in the pool -->
      <attribute name="MaximumPoolSize">1000</attribute>
      <!-- The max number of tasks before the queue is full -->
      <attribute name="MaximumQueueSize">2000</attribute>
...

lams_build/conf/unix/jboss/jbossweb/server.xml

...
      <Connector protocol="HTTP/1.1" port="8080" address="${jboss.bind.address}"  maxThreads="1000" strategy="ms"
                 maxHttpHeaderSize="8192" enableLookups="false" acceptCount="1000" disableUploadTimeout="true"
               connectionTimeout="20000" redirectPort="8443" />
...

Compilation

The compilation steps are exactly the same ones as Building LAMS. The only one introduce is an ant task in lams_build:

$ ant slim-jboss

This will remove all unnecessary jboss applications and libraries that are not required to use with LAMS. And that's it.

JBoss and Java Settings

Here are the JAVA_OPTS as set on the LAS server (set this on run.conf or Unix or run.bat for Windows).

   JAVA_OPTS="-Xmx1024m -XX:MaxPermSize=160m  -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -XX:SurvivorRatio=95 -XX:+UseParNewGC -XX:+UseConcMarkSweepGC"

This gives a maximum of 1.2 GB of RAM to the JVM. All tests were ran with this settings.

Test Harness Configuration

learnerTest1.properties

Note that XYZ is an integer number that means that number of concurrent learners you want to use for this test harness instance.

#------------------------------------------------------------------
# Set the number of learners to be created or updated for this test
# If it's not specified, 1 will be used
#------------------------------------------------------------------
NumberOfLearners = XYZ

...

#------------------------------------------------------------
# Set delays (in secounds) which are the amount of idle time between calls to the server
# Delay is used to emulate the time learners spent on thinking over how to answer the questions :-(
# delay = MinDelay*1000 + random.nextInt((MaxDelay-MinDelay+1)*1000)
# If not specified, 0 will be used for both.
#------------------------------------------------------------
MinDelay = 30
MaxDelay = 90

The MinDelay and MaxDelay are the number of seconds that a user will wait until do the next click. In this case the minimum wait is 30 and the max is 90. That means that each user will use a random number of seconds within these two limits. This numbers assume that it takes about 30 seconds for a learner to read a page and post a reply.

monitorTest1.properties

Not much to change in the monitor properties.. only the min and max delay.

#------------------------------------------------------------
# Set delays (in secounds) which are the amount of idle time between calls to the server
# Delay is used to emulate the time monitors spent on watching where the learners are stuck ;-)
# delay = MinDelay*1000 + random.nextInt((MaxDelay-MinDelay+1)*1000)
# If not specified, 0 will be used for both.
#------------------------------------------------------------
MinDelay = 40
MaxDelay = 80

authorTest1.properties

The LearningDesignFile is the learning design we will use for testing. For the JBoss5 testing, we will use 10 forums on a row. Each learner would post at least once in each before continue.

#-----------------------------------------------------------------
# This LearningDesignFile is uploaded to import a Learning Design
# It could be relative path or absolute path or any valid URL
#-----------------------------------------------------------------
LearningDesignFile = 10forums.zip

test.properties

The TargetServer is the IP or domain that the LAMS server we are testing

#---------------------------------------------------------
# if TargetServer is not specified, localhost will be used.
#---------------------------------------------------------
TargetServer.1=172.20.100.18
  • No labels