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

Tim Owen commented on SOLR-13029:
---------------------------------

Updated to be specific to the copying of index files to/from HDFS during 
backups and restores. Would be configured in solr.xml using e.g.
{noformat}
  <backup>
    <repository name="hdfs" 
class="org.apache.solr.core.backup.repository.HdfsBackupRepository" 
default="false">
      ..
      <int name="solr.hdfs.buffer.size">262144</int>
{noformat}
There is another method in {{HdfsBackupRepository}}, {{openInput}} that is only 
used for opening small metadata files or getting the checksum during restores, 
so I have left that using the default buffer size. Only the bulk whole-file 
copying uses the larger buffer.

> Allow HDFS buffer size to be configured
> ---------------------------------------
>
>                 Key: SOLR-13029
>                 URL: https://issues.apache.org/jira/browse/SOLR-13029
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: Backup/Restore, hdfs
>    Affects Versions: 7.5, master (8.0)
>            Reporter: Tim Owen
>            Priority: Major
>         Attachments: SOLR-13029.patch, SOLR-13029.patch
>
>
> There's a default hardcoded buffer size setting of 4096 in the HDFS code 
> which means in particular that restoring a backup from HDFS takes a long 
> time. Copying multi-GB files from HDFS using a buffer as small as 4096 bytes 
> is very inefficient. We changed this in our local build used in production to 
> 256kB and saw a 10x speed improvement when restoring a backup. Attached patch 
> simply makes this size configurable using a command line setting, much like 
> several other buffer size values.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to