Cloud Photo

Azure Data Architect | DBA

CouchDB on Suse VM in Azure For Less Than $100/month (Part 4 of 5)


This is the fourth part of the series and covers a few performance tweaks to improve data ingestion.

  1. Introduction
    1. Goals
    2. Cheap, Fast, Reliable
    3. Eventual Consistency
  2. Installation
    1. Create VM
    2. Installs
    3. SSH Security
    4. Capture VM
  3. Client Code
    1. Create Databases
    2. Create Benchmark/Testing Code
    3. Create Views
    4. Start Replication
    5. Cron Jobs
  4. Performance Tweaks
    1. stale=update_after
    2. CouchDB local.ini mods
  5. Mapping Data
    1. Aggregate Heat Map
    2. Live Map


4. Performance Tweaks

In addition to using cron jobs to maintaining database performance, a few changes to the CouchDB local.ini file may be required. Also the update_after value will improve view performance at a cost.


a. stale=update_after

Adding stale=update_after to the design view URL, example URL below, CouchDB will return the design view data and then refresh the view. This attribute is useful if views become stale but data from views needs to be returned immediately. The cost of this benefit is that the data will be stale. However, when used in conjunction with cron jobs to maintain views, the data should not be so stale as to be useless.


b. CouchDB local.ini

Changing the following socket options in the /etc/couchdb/local.ini configuration file will allow requests to pile up rather than fail. This is useful when index rebuilds and database compactions temporarily slow down disk and cpu operations.
;server_options = [{backlog, 128}, {acceptor_pool_size, 16}]
server_options = [{backlog, 512}, {acceptor_pool_size, 512}]


c. Performance Reference

Leave a Reply