iilyak opened a new pull request #2662: Use `couch_rate` application for 
`couch_view`
URL: https://github.com/apache/couchdb/pull/2662
 
 
   ## Overview
   
   Current implementation uses global configuration option to determine the 
batch size for a background index build. This approach is sub-optimal because 
it is not taking the design doc write amplification factors into account. The 
amount of writes and therefore transaction time depends on multiple factors, 
such as:
   
   * complexity of JavaScript function
   * size of the document
   * number of indexes
   * number of emits from JavaScript function
   
   This makes every database unique. Which requires independent control of a 
batch size. The idea is to implement a feedback control algorithm (rate 
limiter) to control batch size and delay between batches.
   
   ## Testing recommendations
   
   ```
   make couch && ERL_LIBS=`pwd`/src EXUNIT_DEBUG=true mix test --trace 
src/couch_rate/test/exunit/
   make eunit 
apps=couch_eval,couch_expiring_cache,ctrace,couch_jobs,couch_views,fabric
   ```
   
   ## Simulation results
   
   The test suite uses time simulation to get performance results without 
waiting forever. This statistics can be enabled using the following:
   ```
   make couch && ERL_LIBS=`pwd`/src EXUNIT_DEBUG=true mix test --trace 
src/couch_rate/test/exunit/couch_rate_limiter_test.exs
   ```
   
   ## Checklist
   
   - [x] Code is written and works correctly
   - [x] Changes are covered by tests
   - [ ] Any new configurable parameters are documented in 
`rel/overlay/etc/default.ini`
   - [ ] A PR for documentation changes has been made in 
https://github.com/apache/couchdb-documentation
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to