-
30. Re: Infinispan on Jboss 510 - Low performance issue or missing conf?
asimoes Nov 11, 2011 10:33 AM (in response to galder.zamarreno)I know very well what is remote debug.
But I can not debug things i can not see!
I had already debugged my code and in a step by step, everything seem ok.
And in step by step i can not see where the time is spent!
I had already tried this:
/** <code>select o from TUsers o</code> */
public List<TUsers> getTUsersFindAll(int firstResult,int maxResults) {
long start = System.currentTimeMillis();
Query query = em.createNamedQuery("TUsers.findAll");
if (firstResult > 0) {
query = query.setFirstResult(firstResult);
}
if (maxResults > 0) {
query = query.setMaxResults(maxResults);
}
List result = query.getResultList();
System.out.println(System.currentTimeMillis() - start);
return result;
}
system out is zero or 1!
that was the first thing i done to find out where is the problem.
-
31. Re: Infinispan on Jboss 510 - Low performance issue or missing conf?
asimoes Nov 11, 2011 10:51 AM (in response to galder.zamarreno)the configuration file what you sent me have some different configurations...
my conf file have uncommented:
<property name="com.arjuna.ats.jta.recovery.XAResourceRecovery.JBMESSAGING1"
value="org.jboss.jms.server.recovery.MessagingXAResourceRecovery;java:/DefaultJMSProvider"/>
<property
name="com.arjuna.ats.arjuna.recovery.recoveryExtension1" value="com.arjuna.ats.internal.arjuna.recovery.AtomicActionRecoveryModule"/>
<property
name="com.arjuna.ats.arjuna.recovery.recoveryExtension3" value="com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule"/>
should i use yours?
-
32. Re: Infinispan on Jboss 510 - Low performance issue or missing conf?
galder.zamarreno Nov 14, 2011 3:24 AM (in response to asimoes)recoveryExtension1 and recoveryExtension3 should defo be commented.
I dunno where JBMESSAGING1 came from, maybe your own addition? it's not in the default cfg.
-
33. Re: Infinispan on Jboss 510 - Low performance issue or missing conf?
asimoes Nov 14, 2011 4:57 AM (in response to galder.zamarreno)JBMESSAGING1 comes from EAP. I compared the three files and EAP also have this one.
I will test the conf file that you send me.
-
34. Re: Infinispan on Jboss 510 - Low performance issue or missing conf?
asimoes Nov 14, 2011 11:19 AM (in response to asimoes)I tested with the file you sent me, but the results are the same...
As you understand, i can not spent all my time testing some configuration conbinations what, eventually will work...
Look at this fragment of code:
for (int j = 0; j < numbReq; j++) {
System.out.println("1 :" + System.currentTimeMillis());
List<TUsers> result = userFac.getTUsersFindAll(-1, -1);
System.out.println("2 :" + System.currentTimeMillis());
if (result == null || result.size()<1)
System.out.println("null result!!!");
}
This code runs in a Jboss thead.
userFac.getTUsersFindAll(-1, -1);
is:
userFac -> stateless LOCAL bean
public List<TUsers> getTUsersFindAll(int firstResult,int maxResults) {
System.out.println("1.a :" + System.currentTimeMillis());
long start = System.currentTimeMillis();
Query query = em.createNamedQuery("TUsers.findAll");
System.out.println("1.b :" + System.currentTimeMillis());
if (firstResult > 0) {
query = query.setFirstResult(firstResult);
}
if (maxResults > 0) {
query = query.setMaxResults(maxResults);
}
List result = query.getResultList();
//System.out.println(System.currentTimeMillis() - start);
System.out.println("1.c :" + System.currentTimeMillis());
return result;
}
I will show you the result of all system out:
16:06:12,671 INFO [STDOUT] 1 :1321286772671
16:06:12,681 INFO [STDOUT] 1.a :1321286772681
16:06:12,826 INFO [STDOUT] 1.b :1321286772826
16:06:12,873 INFO [STDOUT] Hibernate: select tusers0_.userid as userid0_, tusers0_.address as address0_, tusers0_.country as country0_, tusers0_.email as email0_, tusers0_.mobilenr as mobilenr0_, tusers0_.phonenr as phonenr0_, tusers0_.userdesc as userdesc0_, tusers0_.usrpass as usrpass0_ from t_users tusers0_
16:06:12,916 INFO [STDOUT] 1.c :1321286772916
16:06:12,980 INFO [STDOUT] 2 :1321286772980
16:06:22,680 INFO [STDOUT] 1 :1321286782680
16:06:22,680 INFO [STDOUT] 1.a :1321286782680
16:06:22,681 INFO [STDOUT] 1.b :1321286782681
16:06:22,703 INFO [STDOUT] 1.c :1321286782703
16:06:22,751 INFO [STDOUT] 2 :1321286782751
16:07:14,584 INFO [STDOUT] 1 :1321286834584
16:07:14,585 INFO [STDOUT] 1.a :1321286834585
16:07:14,585 INFO [STDOUT] 1.b :1321286834585
16:07:14,587 INFO [STDOUT] 1.c :1321286834587
16:07:14,639 INFO [STDOUT] 2 :1321286834639
lets look to the values!
First run:
1 -> 1.a = No delay, ok
1.a -> 1.b = First time, looks ok
sql query = ok
1.b -> 1.c = First time, looks ok
1.c -> 2 = can't understand!, Not ok
Second run:
1 -> 1.a = No delay, ok
1.a -> 1.b = No delay, ok
no sql query = ok
1.b -> 1.c = 2 ms, ok
1.c -> 2 = ~50 ms, NOT OK
Third run:
1 -> 1.a = No delay, ok
1.a -> 1.b = No delay, ok
no sql query = ok
1.b -> 1.c = 2 ms, ok
1.c -> 2 = ~50 ms, NOT OK
So, if i do not have this ~50 ms delay, that I do not understand what it is, i should have good performance.
I do not know what more can i send you to you understand this!
I do not have any more tools to debug this part of the ejb return.
I only see here two results:
1º I'm doing something wrong
2º This do not work on JBOSS 510
-
35. Re: Infinispan on Jboss 510 - Low performance issue or missing conf?
asimoes Nov 14, 2011 11:23 AM (in response to asimoes)More:
public List<TUsers> getTUsersFindAll(int firstResult,int maxResults) {
System.out.println("1.a :" + System.currentTimeMillis());
long start = System.currentTimeMillis();
Query query = em.createNamedQuery("TUsers.findAll");
System.out.println("1.b :" + System.currentTimeMillis());
if (firstResult > 0) {
query = query.setFirstResult(firstResult);
}
if (maxResults > 0) {
query = query.setMaxResults(maxResults);
}
List result = query.getResultList();
//System.out.println(System.currentTimeMillis() - start);
System.out.println("1.c :" + System.currentTimeMillis());
//return result;
return null;
}
16:21:30,050 INFO [STDOUT] 1 :1321287690050
16:21:30,051 INFO [STDOUT] 1.a :1321287690051
16:21:30,051 INFO [STDOUT] 1.b :1321287690051
16:21:30,053 INFO [STDOUT] 1.c :1321287690053
16:21:30,099 INFO [STDOUT] 2 :1321287690099
This code suffer with the same problem (~50 ms delay)
BUT
public List<TUsers> getTUsersFindAll(int firstResult,int maxResults) {
System.out.println("1.a :" + System.currentTimeMillis());
long start = System.currentTimeMillis();
Query query = em.createNamedQuery("TUsers.findAll");
System.out.println("1.b :" + System.currentTimeMillis());
if (firstResult > 0) {
query = query.setFirstResult(firstResult);
}
if (maxResults > 0) {
query = query.setMaxResults(maxResults);
}
//List result = query.getResultList();
//System.out.println(System.currentTimeMillis() - start);
System.out.println("1.c :" + System.currentTimeMillis());
//return result;
return null;
}
this one DO NOT have that problem!!!
16:23:05,139 INFO [STDOUT] 1 :1321287785139
16:23:05,140 INFO [STDOUT] 1.a :1321287785140
16:23:05,140 INFO [STDOUT] 1.b :1321287785140
16:23:05,140 INFO [STDOUT] 1.c :1321287785140
16:23:05,140 INFO [STDOUT] 2 :1321287785140