[SERVER-14588] prealloc of datafiles not on by default in 2.6 Created: 16/Jul/14  Updated: 14/Mar/17  Resolved: 25/Nov/14

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Critical - P2
Reporter: Thomas Boyd Assignee: Matt Kangas
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
is documented by DOCS-8997 prealloc of datafiles not on by defau... Closed
is documented by DOCS-4429 --noprealloc option (storage.prealloc... Closed
Related
related to SERVER-14818 Cpp test to measure FileAllocator per... Closed
is related to SERVER-13508 Don't ignore --nopreallocj if there a... Closed
is related to SERVER-12644 Move note about noprealloc hurting pe... Closed
Tested
Backwards Compatibility: Minor Change
Operating System: ALL
Steps To Reproduce:

See above.

Sprint: Server 2.7.4, Server 2.7.5, Server 2.7.6
Participants:

 Description   

Mac OSX, starting up mongod from commend line (either no parameters, or passing an empty config file (old format)), using a new db and inserting inserting a single document.

In 2.6.3, I get the following:

drwxr-xr-x   2 thomasboyd  wheel         68 Jul 16 15:03 _tmp
drwxr-xr-x   3 thomasboyd  wheel        102 Jul 16 15:02 journal
-rw-------   1 thomasboyd  wheel   67108864 Jul 16 15:03 local.0
-rw-------   1 thomasboyd  wheel   16777216 Jul 16 15:03 local.ns
-rwxr-xr-x   1 thomasboyd  wheel          5 Jul 16 15:02 mongod.lock
-rw-------   1 thomasboyd  wheel   67108864 Jul 16 14:50 test.0
-rw-------   1 thomasboyd  wheel   16777216 Jul 16 14:50 test.ns

In 2.4.10, I get the following (note two data files for test DB):

drwxr-xr-x   2 thomasboyd  wheel         68 Jul 16 14:57 _tmp
drwxr-xr-x   2 thomasboyd  wheel         68 Jul 16 15:01 journal
-rw-------   1 thomasboyd  wheel   67108864 Jul 16 14:57 local.0
-rw-------   1 thomasboyd  wheel   16777216 Jul 16 14:57 local.ns
-rwxr-xr-x   1 thomasboyd  wheel          0 Jul 16 15:01 mongod.lock
-rw-------   1 thomasboyd  wheel   67108864 Jul 16 14:57 test.0
-rw-------   1 thomasboyd  wheel  134217728 Jul 16 14:57 test.1
-rw-------   1 thomasboyd  wheel   16777216 Jul 16 14:57 test.ns

Other than for changes around the way no/prealloc is set in YAML files, I could not find any explanation for this change of behavior in release notes or jira tickets.



 Comments   
Comment by Matt Kangas [ 25/Nov/14 ]

DOCS-4429

Comment by Matt Kangas [ 17/Jul/14 ]

Confirmed. The "prealloc" field is not set in the StorageGlobalParams initalizer (storage_options.h) so it's false by default.

Note that we inverted the sense of this field from negative "noprealloc" to positive "prealloc" in 2.6, and the YAML config files specify "storage.preallocDataFiles". So there are two OptionSection items that interact over this field in mongod_options.cpp

The change happened in SERVER-8510.

Generated at Thu Feb 08 03:35:20 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.