Bug 1212731 - wrong estimation of BufferFrontedFileStoreCache.maxMemoryBlocks
Summary: wrong estimation of BufferFrontedFileStoreCache.maxMemoryBlocks
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Data Virtualization 6
Classification: JBoss
Component: Teiid
Version: 6.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ER1
: 6.2.0
Assignee: Van Halbert
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-04-17 08:44 UTC by Hisanobu Okuda
Modified: 2019-05-20 11:44 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-02-10 08:57:29 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker TEIID-3443 0 Major Closed wrong estimation of BufferFrontedFileStoreCache.maxMemoryBlocks 2015-09-15 21:51:39 UTC

Description Hisanobu Okuda 2015-04-17 08:44:44 UTC
BufferFrontedFileStoreCache.maxMemoryBlocks is under-estimated. For example, when max-storage-object-size=8000000, maxMemoryBlocks
is 488 at the line #575 in org.teiid.common.buffer.impl.BufferFrontedFileStoreCache.initialize() (after that, it is decrimented some times, but it does not matter).

main[1] run

> 

Breakpoint hit: "thread=MSC service thread 1-3", org.teiid.common.buffer.impl.BufferFrontedFileStoreCache.initialize(), line=573 bci=163

573    		maxMemoryBlocks = Math.min(maxMemoryBlocks, maxStorageObjectSize>>LOG_BLOCK_SIZE + ((maxStorageObjectSize&BufferFrontedFileStoreCache.BLOCK_MASK)>0?1:0));

 

MSC service thread 1-3[1] next

> 

Step completed: "thread=MSC service thread 1-3", org.teiid.common.buffer.impl.BufferFrontedFileStoreCache.initialize(), line=575 bci=198

575    		cleaningThreshold = Math.min(maxMemoryBlocks<<4, blocks>>1);

 

MSC service thread 1-3[1] dump this

 this = {

    ...snip...

    maxStorageObjectSize: 8000000

    ...snip...

    maxMemoryBlocks: 488

An actual cache object size for maxMemoryBlocks: 488 is roughly:-

8192 * 488 = 3997696

It is less than half of maxStorageObjectSize. It sometimes causes TEIID30001.



Steps to reproduce:

1. set 8000000 to max-storage-object-size
2. attach a debugger to JDV and observe maxMemoryBlocks

Comment 2 JBoss JIRA Server 2015-04-17 11:52:46 UTC
Steven Hawkins <shawkins> updated the status of jira TEIID-3443 to Resolved

Comment 4 JBoss JIRA Server 2015-06-22 15:22:59 UTC
Steven Hawkins <shawkins> updated the status of jira TEIID-3443 to Closed


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