-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: 10,000 Recorc Per Second (In EJB 3.0)
PostPosted: Thu Apr 19, 2007 10:30 am 
Beginner
Beginner

Joined: Tue Jan 17, 2006 6:16 am
Posts: 31
hi all,
i have some mission critical tasks into my project, is it possible to persist 10 000 record per seconds,

1. AS - JBoss Application Server 4.0.4GA
2. Database - Oracle 10G 10.2.0.1
3.EJB - 3.0 Framework
4.OS - SunOS 5.10
4.Server - Memory: 16G phys mem, 31G swap, 16 CPU,

i know that i need performace
here is my configurations about performance

1. JVM Config Into JBoss

Code:
JAVA_OPTS="-server -Xmx3168m -Xms2144m -Xmn1g -Xss256k -d64 -XX:PermSize=128m -XX:MaxPermSize=256m
   -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000
    -XX:ParallelGCThreads=20 -XX:+UseConcMarkSweepGC -XX:+UseParNewGC
    -XX:SurvivorRatio=8 -XX:TargetSurvivorRatio=90 -XX:MaxTenuringThreshold=31 -XX:+AggressiveOpts
    -verbose:gc -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -XX:+PrintTenuringDistribution


2. also i configure my database.xml file
Code:
<?xml version="1.0" encoding="UTF-8"?>
<datasources>
  <xa-datasource>
    <jndi-name>XAOracleDS</jndi-name>
    <track-connection-by-tx/>
    <isSameRM-override-value>false</isSameRM-override-value>
    <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
    <xa-datasource-property name="URL">jdbc:oracle:thin:@192.168.9.136:1521:STR</xa-datasource-property>
    <xa-datasource-property name="User">SRVPROV</xa-datasource-property>
    <xa-datasource-property name="Password">SRVPROV</xa-datasource-property>
    <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
    <min-pool-size>50</min-pool-size>
    <max-pool-size>200</max-pool-size>     
    <metadata>
         <type-mapping>Oracle9i</type-mapping>
      </metadata>
  </xa-datasource>
  <mbean code="org.jboss.resource.adapter.jdbc.vendor.OracleXAExceptionFormatter"
         name="jboss.jca:service=OracleXAExceptionFormatter">
    <depends optional-attribute-name="TransactionManagerService">jboss:service=TransactionManager</depends>
  </mbean>
</datasources>



3. Also i have one simple Stlateless Session Bean
Code:
@Stateless
@Remote(UsageFasade.class)
public class UsageFasadeBean implements UsageFasade {

   @PersistenceContext(unitName = "CustomerCareOracle")
   private EntityManager oracleManager;
   @TransactionAttribute(TransactionAttributeType.REQUIRED)
   public long createUsage(UsageObject usageObject, UserContext context)
         throws UserManagerException, CCareException {
      try {
         oracleManager
               .createNativeQuery("INSERT INTO USAGE "
                     + " (ID, SESSION_ID, SUBSCRIBER_ID, RECDATE, STARTDATE, APPLIEDVERSION_ID, CHARGINGPROFILE_ID, TOTALTIME, TOTALUNITS, IDENTIFIERTYPE_ID, IDENTIFIER, PARTNO, CALLTYPE_ID, USAGETYPE, APARTY, BPARTY, CPARTY, IMEI, SPECIFICCALLTYPE, APN, SOURCELOCATION, SMSCADDRESS, MSC_ID, ENDREASON, USAGEORIGIN, BILL_ID, CONTRACT_ID) "
                     + " VALUES(SEQ_USAGE_ID.NEXTVAL, NULL, NULL, SYSDATE, SYSDATE, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) ");                  
         return 1;
      } catch (Exception e) {

      }
   }
}


3. and into client side i have 200 Threads, each of them tried to call this method 50 times
my result is that i can persist 10000 record in 20 seconds, without hibernate, with hibernate i got worst result :(,

also i hear that it is good idea to use JDBC 3.0 driver for performance,
i download newest oracle jdbc jar file from oracle site
http://www.oracle.com/technology/softwa ... 10201.html

is this jar file JDBC 3.0 driver ?

is there any hibernate performance configuration?

is it any more performance tuning into JBoss or EJB with entity beans?

can anybody help me ? or is there any doc which can help me ?

Regards,
Paata,


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.