mirror of
				https://github.com/postgres/postgres.git
				synced 2025-11-03 09:13:20 +03:00 
			
		
		
		
	doc: rewrite random_page_cost description
This removes some of the specifics of how the default was set, and adds a mention of latency as a reason the value is lower than the storage hardware might suggest. It still mentions caching. Discussion: https://postgr.es/m/CAKAnmmK_nSPYr53LobUwQD59a-8U9GEC3XGJ43oaTYJq5nAOkw@mail.gmail.com Backpatch-through: 13
This commit is contained in:
		@@ -5907,24 +5907,24 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class="
 | 
				
			|||||||
       </para>
 | 
					       </para>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
       <para>
 | 
					       <para>
 | 
				
			||||||
        Random access to mechanical disk storage is normally much more expensive
 | 
					        Random access to durable storage is normally much more expensive
 | 
				
			||||||
        than four times sequential access.  However, a lower default is used
 | 
					        than four times sequential access.  However, a lower default is
 | 
				
			||||||
        (4.0) because the majority of random accesses to disk, such as indexed
 | 
					        used (4.0) because the majority of random accesses to storage,
 | 
				
			||||||
        reads, are assumed to be in cache.  The default value can be thought of
 | 
					        such as indexed reads, are assumed to be in cache.  Also, the
 | 
				
			||||||
        as modeling random access as 40 times slower than sequential, while
 | 
					        latency of network-attached storage tends to reduce the relative
 | 
				
			||||||
        expecting 90% of random reads to be cached.
 | 
					        overhead of random access.
 | 
				
			||||||
       </para>
 | 
					       </para>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
       <para>
 | 
					       <para>
 | 
				
			||||||
        If you believe a 90% cache rate is an incorrect assumption
 | 
					        If you believe caching is less frequent than the default
 | 
				
			||||||
        for your workload, you can increase random_page_cost to better
 | 
					        value reflects, and network latency is minimal, you can increase
 | 
				
			||||||
        reflect the true cost of random storage reads. Correspondingly,
 | 
					        random_page_cost to better reflect the true cost of random storage
 | 
				
			||||||
        if your data is likely to be completely in cache, such as when
 | 
					        reads.  Storage that has a higher random read cost relative to
 | 
				
			||||||
        the database is smaller than the total server memory, decreasing
 | 
					        sequential, like magnetic disks, might also be better modeled with
 | 
				
			||||||
        random_page_cost can be appropriate.  Storage that has a low random
 | 
					        a higher value for random_page_cost.  Correspondingly, if your data
 | 
				
			||||||
        read cost relative to sequential, e.g., solid-state drives, might
 | 
					        is likely to be completely in cache, such as when the database
 | 
				
			||||||
        also be better modeled with a lower value for random_page_cost,
 | 
					        is smaller than the total server memory, or network latency is
 | 
				
			||||||
        e.g., <literal>1.1</literal>.
 | 
					        high, decreasing random_page_cost might be appropriate.
 | 
				
			||||||
       </para>
 | 
					       </para>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
       <tip>
 | 
					       <tip>
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user