BerkleyDb JE DbDump Extraordinary memory usage
We use BDB JE in one of our applications, and DbDump
for backing up database. The interesting things happened one day. DbDump
starts to throw out an OutOfMemoryError
. Postmortem a开发者_Python百科nalysis shows that a lot of memory is used by internal BDB nodes (IN
). It seems like BerkleyDB reads all the dataset in memory while backing it up, which is quite strange for me.
Another strange fact is that this behavior only visible when the environment is open by the application itself. So when DbDumb is the only client who open environment everything seems to be fine.
Have you considered using DbBackup
instead? I know they do two different things, but if all you're looking to do is backup a database, there's no need to pull it all into memory when simply copying the files elsewhere will do. Or is the command line ability the deciding factor here?
精彩评论