This PR provides two performance related improvements to couch_server:
More details in the corresponding commit messages.
Standard test suite should do the trick.
Related Issues or Pull Requests
This adds the read_concurrency option to couch_server's ETS table for couch_dbs which contains the references to open database handles. This is an obvious improvement as all callers opening database pids interact with this ETS table concurrently. Conversely, the couch_server pid is the only writer, so no need for write_concurrency.
The couchdb.update_lru_on_read setting controls whether couch_server uses read requests as LRU update triggers. Unfortunately, the messages for update_lru on reads are sent regardless of whether this is enabled or disabled. While in principle this is harmless, and overloaded couch_server pid can accumulate a considerable volume of these messages, even when disabled. This patch prevents the caller from sending an update_lru message when the setting is disabled.
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments.