couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Couchdb Wiki] Trivial Update of "Compaction" by GabrielFarrell
Date Sun, 16 Jan 2011 12:31:43 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Couchdb Wiki" for change notification.

The "Compaction" page has been changed by GabrielFarrell.
The comment on this change is: grammar fixes.
http://wiki.apache.org/couchdb/Compaction?action=diff&rev1=26&rev2=27

--------------------------------------------------

  
  == Database Compaction ==
  
- Compaction compresses the database file by removing unused sections created during updates.
Old revisions of documents are also removed from the database though a small amount of meta
data is kept for use in conflict during [[Replication|replication]]. The number of revisions
(default of 1000) can be configured using the ``_revs_limit`` URL endpoint (see [[HTTP_database_API#Accessing_Database-specific_options]]).
It is available since version 0.8-incubating.
+ Compaction compresses the database file by removing unused sections created during updates.
Old revisions of documents are also removed from the database though a small amount of meta
data is kept for use in conflict during [[Replication|replication]]. The number of revisions
(default of 1000) can be configured using the [[HTTP_database_API#Accessing_Database-specific_options|_revs_limit
URL endpoint]], available since version 0.8-incubating.
  
- Compaction is manually triggered per database. Support for queued compaction of multiple
databases is planned. Please note, that compaction will be run as a background task.
+ Compaction is manually triggered per database. Support for queued compaction of multiple
databases is planned. Please note that compaction will be run as a background task.
  
  === Example ===
  
@@ -18, +18 @@

  #=> {"ok":true}
  }}}
  
- GET requesting your database base URL ( see [[HTTP_database_API#Database_Information]] )
gives a hash of statuses that look like this:
+ GET requesting your database base URL (see [[HTTP_database_API#Database_Information]]) gives
a hash of statuses that look like this:
  
  {{{
  curl -X GET http://localhost/my_db
@@ -28, +28 @@

  The compact_running key will be set to true during compaction.
  
  === Compaction of write-heavy databases ===
- Note, it is not a good idea to attempt compaction on a database node that is near full capacity
for its write load. The problem is the compaction process may never catch up with the writes
if they never let up, and eventually it will run out of disk space.
+ It is not a good idea to attempt compaction on a database node that is near full capacity
for its write load. The problem is the compaction process may never catch up with the writes
if they never let up, and eventually it will run out of disk space.
  
+ Compaction should be attempted when the write load is less than full capacity. Read load
won't affect its ability to complete, however. To have the least impact possible on clients,
the database remains online and fully functional to readers and writers. It is a design limitation
that database compaction can't complete when at capacity for write load. It may be reasonable
to schedule compactions during off-peak hours. 
- Compaction should be attempted when the write load is less than full capacity. Read load
won't affect its ability to complete however.
- CouchDB works like this to have the least impact possible on clients,  the database remains
online and fully functional to readers and  
- writers. It is a design limitation that database compaction can't complete when at capacity
for write load. It may be reasonable to schedule compactions during off-peak hours. 
  
  In a clustered environment the write load can be switched off for any node before compaction
and brought back up to date with replication once complete. 
  

Mime
View raw message