Browse files

Warn when useing --noprealloc that it can reduce performance SERVER-1903

  • Loading branch information...
1 parent 6157d16 commit fc15fa95207ae9e340992ef17f23bbde08252cf6 @erh erh committed Oct 29, 2010
Showing with 2 additions and 1 deletion.
  1. +2 −1 db/db.cpp
@@ -695,7 +695,7 @@ int main(int argc, char* argv[], char *envp[] )
("rest","turn on simple rest api")
("jsonp","allow JSONP access via http (has security implications)")
("noscripting", "disable scripting engine")
- ("noprealloc", "disable data file preallocation")
+ ("noprealloc", "disable data file preallocation - will often hurt performance")
("smallfiles", "use a smaller default file size")
("nssize", po::value<int>()->default_value(16), ".ns file size (in MB) for new databases")
("diaglog", po::value<int>(), "0=off 1=W 2=R 3=both 7=W+some reads")
@@ -866,6 +866,7 @@ int main(int argc, char* argv[], char *envp[] )
if (params.count("noprealloc")) {
cmdLine.prealloc = false;
+ cout << "note: noprealloc may hurt performance in many applications" << endl;
if (params.count("smallfiles")) {
cmdLine.smallfiles = true;

0 comments on commit fc15fa9

Please sign in to comment.