Database Reference
In-Depth Information
Reviewing the hardware considerations
Changing a machine's hardware to increase the performance of a database is a common pat-
tern among database administrators. As discussed in the previous chapters, MongoDB is
designed for horizontal scaling, but some considerations about a machine's hardware con-
figurations can help the database engine work smoothly.
Using an SSD hard drive can improve the database engine's performance significantly. Be-
cause MongoDB uses disk I/O to access data and it happens randomly, with an SSD hard
drive, the database engine can read/write data faster from the disk, so the overall perform-
ance will be better.
For mongod instances, make sure that the machine has sufficient RAM. Also, since the
mongod instance stores data in RAM to access the database faster, it's important to have
enough RAM capacity. If you don't have enough RAM on a single server, use clustering
solutions to use the RAM capacity of all the machines.
We recommend that you use each machine for a single role, meaning it would be better if
each mongod instance is hosted on a separate machine. However, for arbiters and query
routers, you can use a single server. But because the mongod instances perform a signific-
ant task, using separate machines for each one can impact the performance.
Furthermore, as discussed in Chapter 6 , Understanding the Concept of Sharding , and
Chapter 7 , Sharding in Action , using multiple query routers can balance the requests
between different machines and, finally, the entire database performance gets better. To
shard networks and in a production environment, you should use replica sets instead of
single mongod instances.
Search WWH ::




Custom Search