You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by 尤抱琵琶半遮面 <so...@qq.com> on 2016/06/04 02:02:30 UTC

How to control solr 4.8 recovery download file speed

Hey everyone,
  I've been using Solr 4.8 for some time now,my solrcloud have three
replication, the shard have more than 64GB index file.But I meet some 
problem when solrcloud execute recovery, it consume a lot of bandwidth.
So when solrcloud recovery the replication download file from leader
 my other network program can't get bandwidth.
 
  My question is this, how can I control the solrcloud recovery bandwidth
consume? Is there some method control replication download file speed?
  Now, add a patch for "SnapPull.java", I modify the "DirectoryFileFetcher"
class, I modify the "fetchPackets(FastInputStream)" method.
		if (bytesCount >= bytesLimit) {
			long currentTime = System.currentTimeMillis();
			if (currentTime <= endTime) {
				Thread.sleep(endTime - currentTime);
				endTime = System.currentTimeMillis() + 50;
				bytesCount = 0
			} else{
				endTime = System.currentTimeMillis() + 50;
				bytesCount = 0;
			}
		}
		
		bytesCount += packetSize;
  
  I control the download speed 40MB/s, but Some times it work failed.
  Every one meet same issue.
  
 Thanks.
 Peter Song.