Re: Slow performance for the first query

508 views
Skip to first unread message

myCloudWatcher

unread,
Nov 3, 2012, 4:47:16 AM11/3/12
to mongod...@googlegroups.com
Yes,

This is the current way  MongoDB works.

Try this:

Re-Boot the servers ( note stop and start MongoDB does NOT have this effect ).  Then from the command line use Mongo and do the "show dbs"  command...

What you will see is that all of the Data is "Read in" from disk and the VM gets loaded up for the first time.

The "second" show dbs is very fast.

I have seen very large 1T MongoDB collections take 30 min. to reply when you ask for "show dbs" on the first request on the "fresh" server.

NOTE:  If you have a plot of the VM Status you can "watch" the "read in" process build up the memory map of the data set and index in VM.


Please call any time:
Cell:      916-202-1600
Skype:  EdwardMGoldberg

Edward M. Goldberg
http://myCloudWatcher.com/
e.m.g.


On Friday, November 2, 2012 7:26:07 PM UTC-7, Hermès Radison wrote:
Hi,
There is a very odd issue with mongodb. I am using the java driver. 
I already indexed important stuff, but I do not think it is a problem of indexing. 
When I first run a search in my program, it takes a long time(189s). Then I re-run the same search then it is back to normal speed(0.3s).
On the customer machine it can go like forever. 
Did this kind of thing happens to anyone?
It only happens right after a reboot, any subsequent queries do not hung up. 
Thank you

Reply all
Reply to author
Forward
0 new messages