bdb slow reading using cursor
632087Jun 19 2008 — edited Jun 25 2008We use berkeleyDB as our backend storage: During startup of our application, we load everything in berkeleyDB(using cursor) to memory, and every night we flush everything in memroy back to berkeleyDB.
Normally for 8 million records in berkeleyDB, loading them to a ConcurrentHashMap takes around 5 minutes in application startup. But sometimes loading takes very very long(more than one hour). Then if I copy the bdb content to another directory and load to memory from there, it takes 5 minutes again. Note that all I did is a copy operation.
I am wondering what is going on here? is it related to checkpoint? how come copying to another directory make it faster?
Thanks,