Memory efficient way to import large files and data into MongoDB? -


after experimenting mongodb, tried few different methods of importing/inserting large amounts of data collections. far efficient method i've found mongoimport. works perfectly, there still overhead. after import complete, memory isn't made available unless reboot machine.

example:

mongoimport -d flightdata -c trajectory_data --type csv --file trjdata.csv --headerline 

where headerline , data like:

'fid','acid','flight_index','orig_index','orig_time','cur_lat', ... '20..','j5','79977,'79977','20110116:15:53:11','1967', ... 

with 5.3 million rows 20 columns, 900mb, end this:

overhead

this won't work me in long run; may not able reboot, or run out of memory. more effective way of importing mongodb? i've read periodic ram flushing, how implement example above?

update: don't think case benefit adjusting fsync, syncdelay, or journaling. i'm curious when idea, , best practice, if running on high ram servers.

i'm guessing memory being used mongodb itself, not mongoimport. mongodb design tries keep of data memory , relies on os swap memory-mapped files out when there's not enough room. i'd give 2 pieces of advice:

  1. don't worry os telling how memory "free" -- modern well-running os use every bit of ram available something.

  2. if can't abide #1, don't run mongodb on laptop.


Comments

Popular posts from this blog

ios - iPhone/iPad different view orientations in different views , and apple approval process -

java Extracting Zip file -

C# WinForm - loading screen -