[
https://issues.apache.org/jira/browse/DERBY-3130?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Knut Anders Hatlen updated DERBY-3130:
--------------------------------------
Attachment: srh.diff
The attached patch srh.diff implements 1+2a, which is not the optimal solution,
but it reduces the object size to 32 bytes. The patch is only for testing, and
not ready for commit. Here's the output from "jmap -histo:live" when running
SmallRecordsTest:
num #instances #bytes class name
--------------------------------------
1: 5879 4644664 [B
2: 136814 4378048
org.apache.derby.impl.store.raw.data.StoredRecordHeader
3: 22064 2226240 <constMethodKlass>
4: 22064 1769032 <methodKlass>
5: 3517 1457848 [I
6: 29809 1266424 <symbolKlass>
The memory consumed by StoredRecordHeader is reduced by ~2.2 MB.
> Reduce memory footprint of StoredRecordHeader
> ---------------------------------------------
>
> Key: DERBY-3130
> URL: https://issues.apache.org/jira/browse/DERBY-3130
> Project: Derby
> Issue Type: Improvement
> Components: Store
> Affects Versions: 10.4.0.0
> Reporter: Knut Anders Hatlen
> Priority: Minor
> Attachments: SmallRecordsTest.java, srh.diff
>
>
> Derby's page cache often has a memory footprint that is much larger than
> pageSize*pageCacheSize. One large contributor to the footprint is the array
> of StoredPageHeader objects in BasePage. The memory consumed by these objects
> can be as large as, and sometimes even larger than, the byte arrays
> containing the raw page data. (See for instance
> http://www.nabble.com/How-much-derby-need-memory--tf3307655.html.) Reducing
> the size of the StoredPageHeader objects could therefore reduce Derby's
> memory footprint significantly, especially if the page cache is large and
> contains many pages from tables with small records or from indices.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.