[DOCS-126] Add more details to the Lots of Collections wiki page Created: 08/Apr/10  Updated: 18/Dec/12  Resolved: 18/Dec/12

Status: Closed
Project: Documentation
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Michael Schurter Assignee: Kay Kim (Inactive)
Resolution: Done Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates DOCS-661 Create Data Modeling Page Closed
Participants:
Days since reply: 11 years, 51 weeks ago

 Description   

Considering the scale of data most people considering the "Lots of Collections" route have, I feel the page could use a lot more detailed information about the ramifications of choosing to use lots of collections.

The following is what I added to my internal wiki:

=== Namespaces ===

  • namespaces = collections + indexes and are per-database (stored in a db.ns file)
  • Check namespaces with ''db.system.namespaces.count()'' (safe & cheap)
  • ''show collections'' in the mongo shell will no longer work
  • ~600 bytes per namespace on disk
  • namespaces are stored in a hashtable
  • so you should only fill the namespace table up to ~75%
  • namespace database is statically sized on server startup
  • change with --nssize
  • defaults to 16mb
  • can go up to 2047mb (docs say 2GB, but --nssize=2048 crashes)
  • db.ns file is created and zeroed to nssize //the first time data is inserted into the database//
  • So we'd need to be careful creating test dbs on busy servers with high nssizes

== Limits ==

Limits are approximate due to the fact hash tables should never be full.

  • Default: *20k*
  • Maximum: *2.5m*


 Comments   
Comment by Sam Kleinman (Inactive) [ 29/Feb/12 ]

http://www.mongodb.org/display/DOCS/Using+a+Large+Number+of+Collections#comment-452199167

It would be nice if the docs were updated to describe what the allowable syntax is for the nssize parameter. According to http://www.mongodb.org/display..., it's the file size in MB. Could one specify 1GB as "1GB" or would it have to be 1024?

Generated at Thu Feb 08 07:37:59 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.