Bug 1378875 - [GSS](6.4.z) Too many threads for cleaning up infinispan transactions
Summary: [GSS](6.4.z) Too many threads for cleaning up infinispan transactions
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Infinispan
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: CR1
: EAP 6.4.13
Assignee: Petr Jurak
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 1378877 eap6413-payload 1389108
TreeView+ depends on / blocked
 
Reported: 2016-09-23 12:30 UTC by Tom Ross
Modified: 2020-03-11 15:15 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1378877 (view as bug list)
Environment:
Last Closed: 2017-02-03 16:44:19 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker ISPN-3702 0 Major Resolved Too many threads for cleaning up infinispan transactions 2018-04-20 08:07:37 UTC
Red Hat Issue Tracker JBEAP-6234 0 Major Verified [GSS] (7.1.0) Too many threads for cleaning up infinispan transactions 2018-04-20 08:07:37 UTC
Red Hat Issue Tracker JBEAP-7655 0 Major Verified [GSS] (7.0.z) ISPN-3702 - Too many threads for cleaning up infinispan transactions 2018-04-20 08:07:37 UTC

Description Tom Ross 2016-09-23 12:30:22 UTC
When using multiple transactional caches, we are seeing that each cache has a dedicated cleanup thread. While this is not an issue for small number of caches, when the number of caches is high as in our case (~100), we see around a 100 threads dedicated for cleanup like the following.
"TxCleanupService,
{default}_{XXX},user-mac-54275" daemon prio=5 tid=0x00007fa0f50d3800 nid=0x10f03 waiting on condition [0x00000001a5a5d000]
"TxCleanupService,{default}
_
{XXX},user-mac-54275" daemon prio=5 tid=0x00007fa0f507e800 nid=0x10e03 waiting on condition [0x00000001a595a000]
"TxCleanupService,{default}_{XXX}
,user-mac-54275" daemon prio=5 tid=0x00007fa0f507e000 nid=0x10d03 waiting on condition [0x00000001a5857000]
"TxCleanupService,
{default}
_
{XXX}
,user-mac-54275" daemon prio=5 tid=0x00007fa0f5817800 nid=0x10c03 waiting on condition [0x00000001a5754000]
...
Looking at the source code for 
https://github.com/infinispan/infinispan/blob/master/core/src/main/java/org/infinispan/transaction/TransactionTable.java#L126
if (!totalOrder) {
// Periodically run a task to cleanup the transaction table from completed transactions.
ThreadFactory tf = new ThreadFactory() {
@Override
public Thread newThread(Runnable r)
{ String address = rpcManager != null ? rpcManager.getTransport().getAddress().toString() : "local"; Thread th = new Thread(r, "TxCleanupService," + cacheName + "," + address); th.setDaemon(true); return th; }
};
executorService = Executors.newSingleThreadScheduledExecutor(tf);
This code can benefit from drawing the threads from a dedicated pool which is bounded.

Comment 1 JBoss JIRA Server 2016-09-29 22:21:26 UTC
Radoslav Husar <rhusar> updated the status of jira JBEAP-6234 to Resolved

Comment 5 Jiří Bílek 2017-01-11 12:24:12 UTC
Verified with EAP 6.4.13.CP.CR2

Comment 6 Petr Penicka 2017-02-03 16:44:19 UTC
Released with EAP 6.4.13 on Feb 02 2017.


Note You need to log in before you can comment on or make changes to this bug.