[SERVER-22323] MongoDB Ignores wiredTiger Config Setting Created: 27/Jan/16  Updated: 27/Jan/16  Resolved: 27/Jan/16

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

Type: Bug Priority: Minor - P4
Reporter: Volodymyr Tsap Assignee: Kelsey Schubert
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Gentoo Linux 3.17.7-gentoo #2 SMP Sun Dec 28 23:21:45 EET 2014 x86_64 Intel(R) Xeon(R) CPU E5-2620 0 @ 2.00GHz GenuineIntel GNU/Linux


Operating System: Linux
Steps To Reproduce:

Change /etc/mongodb.conf

Participants:

 Description   

Example config:

storage:
    dbPath: "/var/lib/mongodb"
    directoryPerDB: true
    engine: wiredTiger
    indexBuildRetry: true
    syncPeriodSecs: 60
    journal:
        enabled: true
    wiredTiger:
        engineConfig:
            cacheSizeGB: 4
            directoryForIndexes: true

Sets the 37G for the cache_size (it should be 4GB):

2016-01-04T20:39:08.518+0200 I STORAGE  [initandlisten] wiredtiger_open config: create,cache_size=37G,session_max=20000,eviction=(threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),checkpoint=(wait=60,log_size=2GB),statistics_log=(wait=0)

Startup option --wiredTigerCacheSizeGB=4 works well and sets the cache_size correctly:

2016-01-26T23:23:21.584+0200 I STORAGE  [initandlisten] wiredtiger_open config: create,cache_size=4G,session_max=20000,eviction=(threads_max=4),config_base=false,statistics=fast),log=enabled=true,archive=true,path=journal,compressor=snappy),file_manaer=(close_idle_time=100000),checkpoint=(wait=60,log_size=2GB),statistics_log=(wait=0)



 Comments   
Comment by Kelsey Schubert [ 27/Jan/16 ]

Hi voa,

I copied your example config and started a mongod with

 mongod --config mongodb.conf 

The startup logs show that the cacheSizeGB is correctly set to 4 GB.

2016-01-27T14:00:17.048-0500 I CONTROL  [initandlisten] db version v3.2.0
2016-01-27T14:00:17.048-0500 I CONTROL  [initandlisten] git version: 45d947729a0315accb6d4f15a6b06be6d9c19fe7
2016-01-27T14:00:17.048-0500 I CONTROL  [initandlisten] allocator: system
2016-01-27T14:00:17.048-0500 I CONTROL  [initandlisten] modules: none
2016-01-27T14:00:17.048-0500 I CONTROL  [initandlisten] build environment:
2016-01-27T14:00:17.048-0500 I CONTROL  [initandlisten]     distarch: x86_64
2016-01-27T14:00:17.049-0500 I CONTROL  [initandlisten]     target_arch: x86_64
2016-01-27T14:00:17.049-0500 I CONTROL  [initandlisten] options: { config: "mongodb.conf", storage: { dbPath: "/Users/thomas/jiratickets/SERVER-22308/db", directoryPerDB: true, engine: "wiredTiger", indexBuildRetry: true, journal: { enabled: true }, syncPeriodSecs: 60.0, wiredTiger: { engineConfig: { cacheSizeGB: 4, directoryForIndexes: true } } } }
2016-01-27T14:00:17.049-0500 I STORAGE  [initandlisten] wiredtiger_open config: create,cache_size=4G,session_max=20000,eviction=(threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),checkpoint=(wait=60,log_size=2GB),statistics_log=(wait=0),
2016-01-27T14:00:17.309-0500 I CONTROL  [initandlisten] 
2016-01-27T14:00:17.309-0500 I CONTROL  [initandlisten] ** WARNING: soft rlimits too low. Number of files is 256, should be at least 1000
2016-01-27T14:00:17.3092016-01-27T14:00:17.352-0500 I NETWORK  [initandlisten] waiting for connections on port 27017

If you execute the same command and see a different result please comment and we will reopen this ticket.

Thank you,
Thomas

Generated at Thu Feb 08 04:00:04 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.