[Datasource Configuration] - Connection Pool (DataSource) is slow
by vlc vlc
vlc vlc [http://community.jboss.org/people/vlc] created the discussion
"Connection Pool (DataSource) is slow"
To view the discussion, visit: http://community.jboss.org/message/626762#626762
--------------------------------------------------------------
Hi Community,
I am using the following MySQL DataSource XML:
| | <jndi-name>MySQLDB</jndi-name> |
| | <xa-datasource-property name="URL">jdbc:mysql://127.0.0.1:3306/db</xa-datasource-property> |
| | <xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class> |
| | <user-name>username</user-name> |
| | <password>password</password> |
| | <!-- <track-connection-by-tx>true</track-connection-by-tx> --> |
| | <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name> |
| | <valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLValidConnectionChecker</valid-connection-checker-class-name> |
| | <min-pool-size>10</min-pool-size> |
| | <max-pool-size>100</max-pool-size> |
| | <idle-timeout-minutes>15</idle-timeout-minutes> |
| | <blocking-timeout-millis>500</blocking-timeout-millis> |
| | <track-statements>true</track-statements> |
I am doing something like this:
0. create at application startup DataSource (InitialContext, lookup())
1. execute at each request java.sql.Connection = ds.getConnection();
2. do queries (PreparedStatement-s, ResultSet-s)
3. close PreparedStatement-s, ResultSet-s, Connection object
TEST: I execute 100 or 1000 requests requiring connection to the Database.
The problem is DataSource.getConnection() takes very often 500 ms ~ 600 ms.
At every get connection a new WrappedConnection object is returned (but I expect to reuse some already created connections)
"show processlist" in MySQL show always 10 connections, jmx-console shows the pool is working with information like: created, in-use, destroyed connections.
Please give me some answars:
1. Why getConnection() function is so slow?
2. Why diferrent WrappedConnection objects are create at each getConnection() call?
3. The pool is between 10~100. Why does not exceed 10 connections even I execute 100 or 1000 parallel requests.
Thank you for your interest.
Cristi,
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/626762#626762]
Start a new discussion in Datasource Configuration at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 3 months
[JBoss Cache] - What is the purpose of event queue for data eviction ?
by Vignesh Prabhu
Vignesh Prabhu [http://community.jboss.org/people/vigneshprabhu] created the discussion
"What is the purpose of event queue for data eviction ?"
To view the discussion, visit: http://community.jboss.org/message/626837#626837
--------------------------------------------------------------
Hi,
We use the following jboss cache eviction configuration where in event queue size is 200000 and the wake up interval is 5 seconds for the eviction cleanup timer task. We use LRU as our cleanup policy. The cache region where data recides is /aaa/bbbb and max nodes there is 25,000
What we are trying to achieve is keep adding nodes and data below /aaa/bbbb and we want to keep a max of 25000 newest elements in cache i.e. LRU nodes need to be discarded.
We add and remove data from multiple threads and we keep getting spammed with this warning message
2011-09-11 18:21:08,446|WARN|pool-flow.seda.servicemix-cxf-se-thread-541|RegionImpl|org.jboss.cache.RegionImpl 245|putNodeEvent(): eviction node event queue size is at 98% threshold value of capacity: 200000 Region: /aaa/bbbb You will need to reduce the wakeUpIntervalSeconds parameter.
Since cleanup interval is 5 seconds and we are not expecting more then 500 elements being inserted per second i.e. 2500 elements need to be discarded every 5 secs once the limit of 25000 elements is reached.
What is the purpose of event queue for data eviction ? Any help in this regard would be helpful to us.
Thanks,
Vignesh
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/626837#626837]
Start a new discussion in JBoss Cache at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 3 months
Returned mail: Data format error
by MAILER-DAEMON
Your mail 192.168.1.133:52432->209.132.182.34:25 contains contaminated file _From__MAILER_DAEMON___postmaster_lists.jboss.org___Date_16_Sep_2011_10:30:57__Subj_Returned_mail:_Data_format_error_/tuwfbko.zip/tuwfbko.exe with virus Email-Worm.Win32.Mydoom.m, so it is dropped.
13 years, 3 months