diff options
author | dwight <dwight@10gen.com> | 2011-02-04 15:02:06 -0500 |
---|---|---|
committer | dwight <dwight@10gen.com> | 2011-02-04 15:02:06 -0500 |
commit | 879e5e1b0ad098cdd10add9fa6490a5b5c0ae583 (patch) | |
tree | 9e54e3cd36907b5292a2bce26cce01a4cd90aba5 /db/dur.cpp | |
parent | 7ea3b35626952771a236a1fc18f82837db427877 (diff) | |
download | mongo-879e5e1b0ad098cdd10add9fa6490a5b5c0ae583.tar.gz |
preallocate journal files. some file systems are quite slow otherwise.
Diffstat (limited to 'db/dur.cpp')
-rw-r--r-- | db/dur.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/db/dur.cpp b/db/dur.cpp index 88a4ce418d6..e297e0b6f02 100644 --- a/db/dur.cpp +++ b/db/dur.cpp @@ -596,6 +596,8 @@ namespace mongo { } } + void preallocateFiles(); + /** at startup, recover, and then start the journal threads */ void startup() { if( !cmdLine.dur ) @@ -612,6 +614,8 @@ namespace mongo { throw; } + preallocateFiles(); + boost::thread t(durThread); } |