You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by LuXugang <xu...@icloud.com.INVALID> on 2021/04/02 06:04:41 UTC

[Lucene] BYTE_BLOCK_SIZE in class ByteBlockPool

Hi, 

In class ByteBlockPool , per buffer's default maximum size was set 32KB(2 << 15),  is this such choice relevant with CPU L1 cache which cache size is 32KB?

If not so, could anyone give some tips?


Re: [Lucene] BYTE_BLOCK_SIZE in class ByteBlockPool

Posted by 陆徐刚 <xu...@eoitek.com>.
Thanks, Michael.

> 2021年4月2日 下午10:22,Michael McCandless <lucene@mikemccandless.com <ma...@mikemccandless.com>> 写道:
> 
> Hmm I don't think the original selection of this size was due to CPU L1 cache limits.  It was more a tradeoff of not wasting too much RAM for tiny indexing events (e.g. index one small document and then refresh) while still getting benefits of scale for the more common/important high indexing rate use-cases.
> 
> Maybe try changing it and see if things get faster/slower for your usage?
> 
> Mike McCandless
> 
> http://blog.mikemccandless.com <http://blog.mikemccandless.com/>
> 
> On Fri, Apr 2, 2021 at 2:05 AM LuXugang <xuganglu@icloud.com.invalid <ma...@icloud.com.invalid>> wrote:
> Hi, 
> 
> In class ByteBlockPool , per buffer's default maximum size was set 32KB(2 << 15),  is this such choice relevant with CPU L1 cache which cache size is 32KB?
> 
> If not so, could anyone give some tips?
> 
> <ByteBlockPool.png>


Re: [Lucene] BYTE_BLOCK_SIZE in class ByteBlockPool

Posted by Michael McCandless <lu...@mikemccandless.com>.
Hmm I don't think the original selection of this size was due to CPU L1
cache limits.  It was more a tradeoff of not wasting too much RAM for tiny
indexing events (e.g. index one small document and then refresh) while
still getting benefits of scale for the more common/important high indexing
rate use-cases.

Maybe try changing it and see if things get faster/slower for your usage?

Mike McCandless

http://blog.mikemccandless.com


On Fri, Apr 2, 2021 at 2:05 AM LuXugang <xu...@icloud.com.invalid> wrote:

> Hi,
>
> In class ByteBlockPool , per buffer's default maximum size was set 32KB(2
> << 15),  is this such choice relevant with CPU L1 cache which cache size is
> 32KB?
>
> If not so, could anyone give some tips?
>
>