[
https://issues.apache.org/jira/browse/LUCENE-7778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15964590#comment-15964590
]
ASF GitHub Bot commented on LUCENE-7778:
----------------------------------------
GitHub user spmason opened a pull request:
https://github.com/apache/lucene-solr/pull/183
LUCENE-7778 Removed synchronized from RAMFile methods
These methods don't seem to benefit from locking - the methods that mutate
the underlying fields aren't synchronized themselves, for example
Removing these methods gives me a 2x throughput increase under concurrent
load on internal benchmarks
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/spmason/lucene-solr-1
ram-directory-remove-synchronized
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/lucene-solr/pull/183.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #183
----
commit 2439b917a33b91892e326ce4467cace46ad9ded5
Author: Steve Mason <[email protected]>
Date: 2017-04-11T11:08:38Z
LUCENE-7778 Removed synchronized from RAMFile methods
These methods don't seem to benefit from locking - the methods that mutate
the underlying fields aren't synchronized themselves, for example
----
> Remove synchronized from high-contention methods on RAMFile
> -----------------------------------------------------------
>
> Key: LUCENE-7778
> URL: https://issues.apache.org/jira/browse/LUCENE-7778
> Project: Lucene - Core
> Issue Type: Improvement
> Components: core/store
> Reporter: Steve Mason
> Priority: Minor
>
> When benchmarking RAMDirectory access via multiple threads the methods
> {{RAMFile::numBuffers}} and {{RAMFile::getBuffer}} show up blocking threads
> fairly frequently
> By removing the {{synchronized}} keyword from these methods our internal
> benchmarks show a 2x performance increase under concurrent load.
> I don't think removing {{synchronized}} from these methods is a problem as
> they are read-only and write access to these fields is not synchronized.
> LUCENE-2779 also implies that some ofthe locking on RAMDirectory is not
> necessary
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]