MongoDB Questions and Answers – Run-time Database Configuration

«
»

This set of MongoDB Multiple Choice Questions & Answers (MCQs) focuses on “Run-time Database Configuration”.

1. Replica set configuration requires that the _______ have a value that is consistent among all members of the set.
a) replSetName
b) instance
c) MMS
d) all of the mentioned
View Answer

Answer: a
Explanation: Use descriptive names for sets. Once configured, use the mongo shell to add hosts to the replica set.

advertisement

2. Point out the correct statement.
a) Replica set configuration is straightforward
b) Keyfile must be less than one kilobyte in size
c) Keyfile may only contain characters in the base64 set and the file must not have group or “world” permissions on UNIX systems
d) All of the mentioned
View Answer

Answer: d
Explanation: To enable authentication for the replica set, add the keyFile option.

3. Setting _______ enables authentication and specifies a key file for the replica set member use to when authenticating to each other.
a) mongostat
b) mongod
c) keyFile
d) all of the mentioned
View Answer

Answer: c
Explanation: The content of the key file is arbitrary, but must be the same on all members of the replica set and mongos instances that connect to the set.

advertisement
advertisement

4. _______ is /srv/mongodb, which specifies where MongoDB will store its data files.
a) dbPath
b) dbPathSts
c) db.Op
d) none of the mentioned
View Answer

Answer: a
Explanation: The user account that mongod runs under will need read and write access to this directory.

5. Point out the correct statement.
a) Config servers are not replica sets
b) Sharding requires a number of mongod instances with different configurations
c) The config servers store the cluster’s metadata, while the cluster distributes data among one or more shard servers
d) None of the mentioned
View Answer

Answer: d
Explanation: The command line and configuration file interfaces provide MongoDB administrators with a large number of options and settings for controlling the operation of the database system.

advertisement

6. _____ bit builds of mongod enable journaling by default.
a) 8
b) 16
c) 32
d) 64
View Answer

Answer: d
Explanation: Journaling ensures single instance write-durability.

7. Which of the following provide acceptable performance levels for multiple mongod instances?
a) GridFS
b) SST
c) MMS
d) SSD
View Answer

Answer: d
Explanation: Additionally, you may find that multiple databases with small working sets may function acceptably on a single system.

advertisement

8. What is the size of Chunk by default?
a) 64 MB
b) 64 GB
c) 64 KB
d) 32 MB
View Answer

Answer: a
Explanation: Default chunk size provides the ideal balance between the most even distribution of data, for which smaller chunk sizes are best, and minimizing chunk migration, for which larger chunk sizes are optimal.

9. Which of the following sets the database profiler level?
a) systemLog.verbosity
b) operationProfiling.mode
c) operationProfiling.slowOpThresholdMs
d) none of the mentioned
View Answer

Answer: b
Explanation: The profiler is not active by default because of the possible impact on the profiler itself on performance.

advertisement

10. Which of the following document configures the threshold which determines whether a query is “slow” for the purpose of the logging system?
a) systemLog.verbosity
b) operationProfiling.mode
c) operationProfiling.slowOpThresholdMs
d) none of the mentioned
View Answer

Answer: c
Explanation: systemLog.verbosity controls the amount of logging output that mongod write to the log.

Sanfoundry Global Education & Learning Series – MongoDB.

Here’s the list of Best Reference Books in MongoDB.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

advertisement
advertisement
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He is Linux Kernel Developer & SAN Architect and is passionate about competency developments in these areas. He lives in Bangalore and delivers focused training sessions to IT professionals in Linux Kernel, Linux Debugging, Linux Device Drivers, Linux Networking, Linux Storage, Advanced C Programming, SAN Storage Technologies, SCSI Internals & Storage Protocols such as iSCSI & Fiber Channel. Stay connected with him @ LinkedIn | Youtube | Instagram | Facebook | Twitter