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:

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:
don't worry os telling how memory "free" -- modern well-running os use every bit of ram available something.
if can't abide #1, don't run mongodb on laptop.
Comments
Post a Comment