You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Noble Paul (JIRA)" <ji...@apache.org> on 2015/02/16 19:47:13 UTC
[jira] [Comment Edited] (SOLR-7110) Optimize JavaBinCodec to
minimize string Object creation
[ https://issues.apache.org/jira/browse/SOLR-7110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14323125#comment-14323125 ]
Noble Paul edited comment on SOLR-7110 at 2/16/15 6:46 PM:
-----------------------------------------------------------
Here are the benchmark results
No: of objects in cache 10K, no:of strings created: 10million: no:of threads:10
{noformat}
==============LRU 10 THREADS===============
*************before test start***********
Used Memory:10
*************after LRU cache init***********
Used Memory:14
*************after cache test***********
Used Memory:16
time taken by LRUCACHE 709ms
*************after new string test***********
Used Memory:70MB
time taken by string creation 668ms
{noformat}
The takeaways are . As expected the time taken by both is negligible. It does not really matter. Memory usage is dramatically higher for string creation.
54MB vs 6MB = ~700% more memory used. This probably has a bigger impact on our GC pauses
was (Author: noble.paul):
Here are the benchmark results
No: of objects in cache 10K, no:of strings created: 10million: no:of threads:10
{noformat}
==============LRU 10 THREADS===============
*************before test start***********
Used Memory:10
*************after LRU cache init***********
Used Memory:14
*************after cache test***********
Used Memory:16
time taken by LRUCACHE 709ms
*************after new string test***********
Used Memory:70MB
time taken by string creation 668ms
{noformat}
The takeaways are . As expected the time taken by both is negligible. It does not really matter. Memory usage is dramatically higher for string creation.
54MB vs 6MB = ~700% more memory used. This probably has a bigger impact on our GC
> Optimize JavaBinCodec to minimize string Object creation
> --------------------------------------------------------
>
> Key: SOLR-7110
> URL: https://issues.apache.org/jira/browse/SOLR-7110
> Project: Solr
> Issue Type: Improvement
> Reporter: Noble Paul
> Assignee: Noble Paul
> Priority: Minor
> Attachments: SOLR-7110.patch
>
>
> In JavabinCodec we already optimize on strings creation , if they are repeated in the same payload. if we use a cache it is possible to avoid string creation across objects as well.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org