summaryrefslogtreecommitdiff
path: root/db/dur.cpp
diff options
context:
space:
mode:
authordwight <dwight@10gen.com>2011-02-04 15:02:06 -0500
committerdwight <dwight@10gen.com>2011-02-04 15:02:06 -0500
commit879e5e1b0ad098cdd10add9fa6490a5b5c0ae583 (patch)
tree9e54e3cd36907b5292a2bce26cce01a4cd90aba5 /db/dur.cpp
parent7ea3b35626952771a236a1fc18f82837db427877 (diff)
downloadmongo-879e5e1b0ad098cdd10add9fa6490a5b5c0ae583.tar.gz
preallocate journal files. some file systems are quite slow otherwise.
Diffstat (limited to 'db/dur.cpp')
-rw-r--r--db/dur.cpp4
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);
}