You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Gregory Chanan (JIRA)" <ji...@apache.org> on 2014/03/04 00:35:30 UTC

[jira] [Comment Edited] (SOLR-5714) You should be able to use one pool of memory for multiple collection's HDFS block caches.

    [ https://issues.apache.org/jira/browse/SOLR-5714?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13918707#comment-13918707 ] 

Gregory Chanan edited comment on SOLR-5714 at 3/3/14 11:34 PM:
---------------------------------------------------------------

It's not clear this would cause any bugs, but the handling of creating the blockCache is unclear.

The assignment:
{code}        blockCache = createBlockCache(numberOfBlocksPerBank, blockSize, bankCount,directAllocation, slabSize, bufferSize, bufferCount);
{code}

has no effect because the (static) blockCache is actually set in createBlockCache, independent of whether this is static or not:
{code}blockCache = new BlockCache(metrics, directAllocation, totalMemory, slabSize, blockSize);
{code}

Probably should make the blockCache in createBlockCache a local variable to the function, not sharing a name with the static version.
Same here, it would be better to rename:
{code}
BlockCache blockCache = getBlockDirectoryCache
{code}

Edit: actually I think this could cause a bug.  What if one solrconfig.xml uses the global cache and another doesn't.  The one that doesn't can overwrite the first's cache.


was (Author: gchanan):
It's not clear this would cause any bugs, but the handling of creating the blockCache is unclear.

The assignment:
{code}        blockCache = createBlockCache(numberOfBlocksPerBank, blockSize, bankCount,directAllocation, slabSize, bufferSize, bufferCount);
{code}

has no effect because the (static) blockCache is actually set in createBlockCache, independent of whether this is static or not:
{code}blockCache = new BlockCache(metrics, directAllocation, totalMemory, slabSize, blockSize);
{code}

Probably should make the blockCache in createBlockCache a local variable to the function, not sharing a name with the static version.
Same here, it would be better to rename:
{code}
BlockCache blockCache = getBlockDirectoryCache
{code}

> You should be able to use one pool of memory for multiple collection's HDFS block caches.
> -----------------------------------------------------------------------------------------
>
>                 Key: SOLR-5714
>                 URL: https://issues.apache.org/jira/browse/SOLR-5714
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Mark Miller
>            Assignee: Mark Miller
>             Fix For: 4.8, 5.0
>
>         Attachments: SOLR-5714.patch, SOLR-5714.patch, SOLR-5714.patch
>
>
> Currently, you have to specify how much direct memory to allocate per SolrCore. This can be inefficient, and has some negative consequences - for instance, when replicating, many times two HDFS directories will exist for the same index briefly, which will double the RAM used for that SolrCore.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org