Documentation for vacuum_cost config options.
authorJan Wieck
Fri, 13 Feb 2004 12:25:09 +0000 (12:25 +0000)
committerJan Wieck
Fri, 13 Feb 2004 12:25:09 +0000 (12:25 +0000)
Jan

doc/src/sgml/runtime.sgml

index 71d7f0621c8dc75343faad5a1c53ce039d037129..67e8931273a87564d21e0c50c7e1c1283bfbc2e8 100644 (file)
@@ -1,5 +1,5 @@
 
 
 
@@ -990,6 +990,87 @@ SET ENABLE_SEQSCAN TO OFF;
 
      
     
+
+    
+     Cost Based Vacuum Delay
+
+     
+     
+      vacuum_cost_page_hit (integer)
+      
+       
+       During a default VACUUM (not
+       FULL) the system maintains and internal counter
+       accumulating the cost of various operations performed. When the
+       accumulated cost reaches a limit, the backend performing the
+       VACUUM will sleep for a while, reset the
+       accumulator and continue. The intention is to lower the IO impact
+       of VACUUM.
+      
+
+      
+       The variable vacuum_cost_page_hit is the cost
+       for vacuuming a buffer found inside the shared buffer cache. 
+       It represents the cost to lock the buffer pool, lookup the 
+       shared hash table and to actually scan the block content.
+       
+      
+     
+
+     
+      vacuum_cost_page_miss (integer)
+      
+       
+       The cost for vacuuming a buffer that has to be read from disk.
+       This represents the effort to lock the buffer pool, lookup the
+       cache directory, reading the block from disk and scanning the
+       content.
+       
+      
+     
+
+     
+      vacuum_cost_page_dirty (integer)
+      
+       
+       This extra cost is added when vacuum modifies a block that was
+       clean before. It represents the extra IO required to flush the
+       dirty block out to disk again.
+       
+      
+     
+
+     
+      vacuum_cost_limit (integer)
+      
+       
+       This is the cost limit that must be reached or exceeded before
+       the VACUUM will nap.
+       
+      
+     
+
+     
+      vacuum_cost_naptime (integer)
+      
+       
+       The time im milliseconds the VACUUM will
+       nap when the cost limit has been reached or exceeded.
+       There are certain bulk operations that hold critical
+       locks and should therefore perform
+       as quickly as possible. Because of that it is possible that the
+       cost actually accumulates far higher than this limit. To compensate
+       for this, the final naptime is calculated as
+       vacuum_cost_naptime * 
+       accumulated_balance /
+       vacuum_cost_limit with a maximum of
+       vacuum_cost_naptime * 4.
+       
+      
+     
+
+     
+