help the mongodb run more and more slowly

13 views
Skip to first unread message

qiujiawei

unread,
Dec 8, 2010, 1:25:19 AM12/8/10
to mongodb-user
maybe it cause since two day ago.
Two days ago,we create about 10K unuseful collections in the db.
then ,I write an java to del most of then.
but now,when I use the mongo and use "show collections",i find may
collections with the same name appears.
And ,command "getIndexes() or getStatus()" can't use;

I goto /data/db find that there is 14 ns file,and 11 of then is
2GB.Should I set bigger --nssize ?

now ,I have 300+ collections,some of then is contain most 40W
records,and some only contain 300 records.
If I combine this all collections to one,would the db be faster?

now,each query would cost near 2000ms to get return with the index.
my analytics programe get an Exception while connecting to db

com.mongodb.MongoException$Network: can't say something
at com.mongodb.DBTCPConnector.say(DBTCPConnector.java:165)
at com.mongodb.DBApiLayer$MyCollection.update(DBApiLayer.java:
289)
at com.mongodb.DBCollection.update(DBCollection.java:112)
at
com.xingyun.analytics.lib.MyMongodb.HdfsIntoColl(MyMongodb.java:208)
at com.xingyun.analytics.MainRun.main(MainRun.java:64)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:
58)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

plz help

Brendan W. McAdams

unread,
Dec 13, 2010, 1:15:43 PM12/13/10
to mongod...@googlegroups.com
It sounds like you're encountering a few different issues here, so let's start at the top.

First, MongoDB does preallocate for collections, as documented: http://www.mongodb.org/display/DOCS/Excessive+Disk+Space

What do you mean by 'unuseful' collections?  Certainly 10,000 collections will allocate a good bit of disk space for you. 

The "can't say something" error indicates a network error occurred speaking to MongoD.  Below that stacktrace should be the root cause of the exception, in this case it should be an IOException.  Can you post that trace as well?



--
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To post to this group, send email to mongod...@googlegroups.com.
To unsubscribe from this group, send email to mongodb-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/mongodb-user?hl=en.


Reply all
Reply to author
Forward
0 new messages