Hi Matt,

Thanks for posting these results :)

Matt Hogstrom wrote:

Gianny,

I applied your changes to fix the double execution. It looks like the modifications you made overall improved performance by about 10% (from 1445 to 1591). However, I still see the double execution of the SQL for the Quote bean. So we can still eek out some extra performance. The best number on the servers I tested has been about 2000 so we're almost there :)

When you say double execution, do you mean:

1. SELECT Q.symbol FROM QuoteEJB Q WHERE Q.symbol = ?;  followed by
2. SELECT Q.symbol, Q.low, Q.open1, Q.volume, Q.price, Q.high, Q.companyName, Q.change1 FROM QuoteEJB Q WHERE Q.symbol = ?

as reported under the *With TranQL Changes:* section?

If yes, then I am not sure how this can be fixed without caching. The first query maps to the findByPrimaryKey method. After its execution, the transactional cache is being flushed as all the methods of QuoteEJB have a CMT set to "Required" and PingServlet2EntityLocal does not demarcate tx. As a consequence, the transactional cache is now empty. The second query maps to a row-fault event when getDataBean is invoked. There is a row-fault because the transactional cache is empty.

With caching of CMP across transactions, the row-fault event does not happen: the cache is queried and a record is found.


Here are the stats from the testing I did tonight.

*Before TranQL Change:*
06/04/2006    22:02:25     IWL0060I Page throughput = *1445.272 /s*

This data is already in the JIRA.

*With TranQL Changes:*
06/04/2006    22:50:45     IWL0060I Page throughput = *1591.233 /s*

<snip>



*With TranQL CMP Caching Option:*
06/04/2006    23:01:09     IWL0060I Page throughput = *1988.110* /s

These are the queries that are being executed while caching is enabled. Note the difference between the queries. I'm not sure why this is.

The first query, 973 exec, is a row-fault query. The second query maps to findByPrimaryKey; it is the result of a transformation of "SELECT Q.symbol FROM QuoteEJB Q WHERE Q.symbol = ?" to fetch a group of fields at the same time than the primary key. In this case, the group to be prefetched is pretty simple: all the QuoteEJB CMP fields. However, the engine can fetch a graph of objects in a single pass.

Thanks,
Gianny


 Number of executions               = 973
 Number of compilations             = 1
 Total execution time (sec.ms)      = 0.052875
 Total user cpu time (sec.ms)       = 0.015625
 Total system cpu time (sec.ms)     = 0.015625
Statement text = SELECT Q.symbol, Q.low, Q.open1, Q.volume, Q.price, Q.high, Q.companyName, Q.change1 FROM QuoteEJB Q WHERE Q.symbol = ?

 Number of executions               = 221945
 Number of compilations             = 1
 Total execution time (sec.ms)      = 12.888160
 Total user cpu time (sec.ms)       = 9.843750
 Total system cpu time (sec.ms)     = 1.515625
Statement text = SELECT Q.symbol, Q.symbol, Q.low, Q.open1, Q.volume, Q.price, Q.high, Q.companyName, Q.change1 FROM QuoteEJB Q WHERE Q.symbol = ?

Matt




Reply via email to