tingodb icon indicating copy to clipboard operation
tingodb copied to clipboard

Memory (RAM) usage

Open colinbes opened this issue 8 years ago • 2 comments

I am working with pretty tight memory (RAM) constraints and am looking to understand RAM requirements as collection size grows.

I assume main memory consumption (by tingodb) would be caching of objects but am unclear on definitions of 'object'. I assume object referred to in notes is a 'json object' committed to a collection as a document. Is object equivalent to a document written to a collection?

Just using default settings for now, is the default of 1000 objects referred to in notes per collection or across collections all collections. For example if I have two collections will I have up to 2000 objects cached?

If I am doing minimal querying and mainly inserting (my tingodb database is just a temporary store until data is pushed into cloud) is there any penalty I need to be aware of in reducing default cache sizes?

colinbes avatar Dec 29 '16 20:12 colinbes

Object is JSON object you store in collection but in JS object (not as JSON). But size I believe is more or less comparable. Caches are per collection, so you are correct, 2 collections means 2000 objects in cache. The only penalty for reduced cache is search (read access) performance. It is safe to disable it at all, especially assuming if you storage is fast enough. Also all indexes are all in memory, by default only _id:1 index is maintained.

sergeyksv avatar Jan 05 '17 10:01 sergeyksv

Thanks, that makes sense.

colinbes avatar Jan 05 '17 13:01 colinbes