[SERVER-11946] colMod should expose padding factor, so one can tune it up and down Created: 04/Dec/13  Updated: 10/Dec/14  Resolved: 23/Jul/14

Status: Closed
Project: Core Server
Component/s: Admin, Performance, Storage, Usability
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: David Murphy Assignee: Unassigned
Resolution: Won't Fix Votes: 2
Labels: collMod, padding, pull-request
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

all


Issue Links:
Related
is related to SERVER-1810 ability to set minimum allocation siz... Closed
Participants:

 Description   

This is important to be able to "hint" to the system the correct padding, as some workloads are heavy to start and tapper off. This type of workload makes it impossible to learn the padding factor when needed. It would not override the normal behavior just tune the current level for heuristics to still tune as more data is learned.

It should behave like this, so that is not a new setting up just updating the existing data to help the engine make better INITIAL decisions.

> db.col1.stats() 
{      
	"ns" 			: "foo.col1",
    "count" 		: 1,    
    "size" 			: 24,  
    "avgObjSize" 	: 24,      
    "storageSize" 	: 4096,   
    "numExtents" 	: 1,
 	"nindexes" 		: 1,        
 	"lastExtentSize" : 4096,        
 	"paddingFactor" : 1,
 	"systemFlags" 	: 1,     
 	"userFlags" 	: 0,        
 	"totalIndexSize" : 8176,
 	"indexSizes" : {               
 		"_id_" : 8176   
 	},      
 	"ok" : 1 
 } 
 >db.runCommand( {"collMod" : "col1" , "paddingFactor" : 1.3 } ) 
 {
 	"PaddingSize_old" : 1, 
 	"PaddingSize_new" : 1.3, 
 	"ok" : 1 
 } 
> db.col1.stats()
{      
	"ns" 			: "foo.col1",      
 	"count" 		: 1,    
 	"size" 			: 24,    
 	"avgObjSize" 	: 24,    
 	"storageSize" 	: 4096,   
 	"numExtents" 	: 1,       
 	"nindexes" 		: 1,
 	"lastExtentSize" : 4096,       
 	"paddingFactor" : 1.3,  
 	"systemFlags" 	: 1,
 	"userFlags" 	: 0,       
 	"totalIndexSize" : 8176,        
 	"indexSizes" : {
   		"_id_" : 8176   
    },      
    "ok" : 1 
}

Pull request is ready once the test case is written.



 Comments   
Comment by Ramon Fernandez Marina [ 23/Jul/14 ]

dmurphy, apologies for the late reply. We discussed this internally, and the decision was to close this ticket but keep SERVER-1810 to investigate ways to improve storage usage. Feel free to comment on that ticket if you have further suggestions.

Comment by David Murphy [ 09/Dec/13 ]

https://github.com/mongodb/mongo/pull/572 been generated

SERVER-11946 collMod should expose padding factor.

No test included as no other tests for collMod where found in the code. This call the same function as organic growth does "nsd->setPaddingFactor()". It only exposes what it done internal so in specific use cases it can be optimized when growth via updates are expected.

I ran a a full smoke to review this , as well as inserting 1M

{x:"$number"}

type documents that could have a string,double,array or sub-document (or combo assigned) in a loop, then changed the padding factor to ensure the value was not reverted back.

Generated at Thu Feb 08 03:27:10 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.