mirror of
				https://github.com/Zygo/bees.git
				synced 2025-11-04 04:00:36 +01:00 
			
		
		
		
	ExtentWalker: increase efficiency for typical btrfs extent sizes
Perf was blaming more than 50% of cycles on TREE_SEARCH_V2. strace showed 4 TREE_SEARCH_V2 calls for every pread in grow_backward(). Fix by increasing the extent fetch batch size so it is more likely to include the desired items in the first fetch attempt. This removes TREE_SEARCH_V2 from the top 10 list of cycle consumers. Signed-off-by: Zygo Blaxell <bees@furryterror.org>
This commit is contained in:
		@@ -58,7 +58,7 @@ namespace crucible {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
		virtual Vec get_extent_map(off_t pos);
 | 
							virtual Vec get_extent_map(off_t pos);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		static const unsigned sc_extent_fetch_max = 64;
 | 
							static const unsigned sc_extent_fetch_max = 1024;
 | 
				
			||||||
		static const unsigned sc_extent_fetch_min = 4;
 | 
							static const unsigned sc_extent_fetch_min = 4;
 | 
				
			||||||
		static const off_t sc_step_size = 0x1000 * (sc_extent_fetch_max / 2);
 | 
							static const off_t sc_step_size = 0x1000 * (sc_extent_fetch_max / 2);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user