[ https://issues.apache.org/jira/browse/LUCENE-6119?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael McCandless updated LUCENE-6119: --------------------------------------- Attachment: LUCENE-6119.patch OK new patch with a completely different approach, moving the tracking under Directory. I added a new AdaptiveRateLimitedDirectoryWrapper: it watches the average bytes/sec written by non-merges, and then (based on a multiplier) sets the merge throttling accordingly. It uses a rolling timestamps window of the last 1 GB of writes with 1 MB resolution, and lets you set min/max on the merge throttle. Also, I removed RateLimitedDirectoryWrapper: I think it's dangerous how it encourages you to throttle anything except merges, and encourages you to just set a fixed rate (one size does NOT fit all...). If you want "similar" behavior you can use AdaptiveRateLimitedDirectoryWrapper but set min and max to the same value. > Add IndexWriter.getTotalNewBytesWritten > --------------------------------------- > > Key: LUCENE-6119 > URL: https://issues.apache.org/jira/browse/LUCENE-6119 > Project: Lucene - Core > Issue Type: Improvement > Reporter: Michael McCandless > Assignee: Michael McCandless > Fix For: 5.0, Trunk > > Attachments: LUCENE-6119.patch, LUCENE-6119.patch > > > This method returns number of "incoming" bytes IW has written since it > was opened, excluding merging. > It tracks flushed segments, new commits (segments_N), incoming > files/segments by addIndexes, newly written live docs / doc values > updates files. > It's an easy statistic for IW to track and should be useful to help > applications more intelligently set defaults for IO throttling > (RateLimiter). > For example, an application that does hardly any indexing but finally > triggered a large merge can afford to heavily throttle that large > merge so it won't interfere with ongoing searches. > But an application that's causing IW to write new bytes at 50 MB/sec > must set a correspondingly higher IO throttling otherwise merges will > clearly fall behind. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org