0

I have a large number of collections getting created at high bursts of traffic. I generally delete this collections once I m done processing the data in them. But at sudden bursts I sometimes run into namesspace issues..

  • Can I increase nssize for handling this and what values of nssize are OK? By default, it is 16 MB.. I increased it to 100 MB and still hit the issue.. Can I still increase it without worrying?

  • Also, I have a lot of databases where the data is around 1 Mb but mongo pre allocates 64 Mb space. How do I fix this? If I run compact, does it hit mongo performance?

abipc
  • 997
  • 2
  • 13
  • 35
  • 1
    Regarding your second point: http://stackoverflow.com/questions/20087895/why-do-mongodb-takes-up-so-much-space/20088572#20088572 – Lix Nov 02 '14 at 10:19
  • 1
    What are your "namespace issues"? What is the error message in the log? How many databases/collections do you have when you run into this issue? – helmy Nov 02 '14 at 13:56
  • I have a total of 4000 databases of a type with 10 collections each. I have another database that had around 15000 collections. – abipc Nov 03 '14 at 10:16

1 Answers1

0

You can increase the namespace size, up to 2047MB. Each namespace file is per database and the default size should be fine for about 24000 collections.

What are the issues you're seeing, exactly? Do you have log lines or error messages? The numbers don't look like they should be a problem.

For more about nsSize, see the docs.

As for your second question, please see the link in the first comment as it has a good explanation and links to more info.

wdberkeley
  • 11,531
  • 1
  • 28
  • 23