3

My server is running mongoDB, for web application that requires a lot of databases (around 1000-2000 databases) which can't be merged.

Right now, each databases takes pre-allocation size of 64 MB. According to MongoDB's documentation, it can reach up to 2 GB.

My question is as follows:

  1. Can I suppress this behavior? Because my server's storage space can't take 2000 databases, if each of them have 2 GB in size. Can I somehow tell MongoDB to reduce the allocated size for each database for a set number (for example, can I force MongoDB to only allocate 128 MB for each database?

  2. I plan not to use --noprealloc, because according to the MongoDB's documentation it will severely reduce the performance of the server. What is the downside of using --noprealloc for a production server?

  3. Is there any other solution to my problem?

Community
  • 1
  • 1
Samuel Adam
  • 1,327
  • 4
  • 26
  • 45
  • 1
    maybe duplicate question 'Set MongoDB Database quota (SIZE)' http://stackoverflow.com/questions/9779923/set-mongodb-database-quota-size – Curry Oct 10 '13 at 05:15
  • So these dbs cannot be merged but you want to store all of them on the same server without any real integrity to ensure their safe running (pre-alloc ensures the allocation of things like journal), sounds to me like you have the wrong setup for your budget and job. noprealloc actually stops mongodb from anticipating your wites meaning it has to allocate data files on the spot. – Sammaye Oct 10 '13 at 07:06
  • 1
    When your web application requires 1000-2000 databases, you are doing something wrong. When this is not in your control... why are you here and not on http://dba.stackexchange.com? – Philipp Oct 10 '13 at 07:06
  • @Philipp I didn't even know dba.stackexchange until know, thanks for pointing that out ! :) – Samuel Adam Oct 10 '13 at 09:49

0 Answers0