Louis Kapp (Customer) asked a question.

Is it better to add forests or add nodes?

I have a mature MarkLogic Cluster that is outgrowing its existing cluster. Presently I have 2 Enodes and 7 DNodes with 3 forests and 3 replica forests on each of the DNodes. My forest sizes have grown beyond the 500G recommended size. Would it be better to add forests/cpu/memory to the existing nodes or add nodes with similar setups to the cluster? How many forests can a node handle provided the cpu and memory recommendations are met? And at what point is it better to add a DNode instead of more forests?


Philip Miller and Mads Hansen like this.
  • Mads Hansen (Progress Software)

    The answer is: "It depends!"

     

    Are you meeting your SLAs? Have response times or throughput numbers started to decrease? Are you noticing any issues? Is resource utilization acceptable or hitting any unusual spikes or limits?

     

    The 500GB forest size recommendation is a rule of thumb, but there are a number of factors that could mean you would want to keep your forests much smaller, or allow you to grow even larger and still be fine. The size of your documents, index settings, types of documents and whether there are binary and large documents, whether it's mostly static read-only, heavy writes, or a mix of transactional workloads, the size and capacity of your servers, etc. all affect what an optimal size of your forests would be.

     

    Not knowing anything about your data, the workloads, or the specs of your servers - if you already have several forests on that host and they are each ~500GB or larger, then it may be better to scale-out. Adding more D-nodes and spread things out so that they each have less data to manage and can perform better. Things usually perform better when you throw extra hardware and resources at them, rather than simply shuffling chairs on the deck.

     

    Sometimes adding forests to your existing nodes is the best decision. If you have enough resources, and things are performing well enough to meet your SLAs and you are just looking to spread things out a little, maybe put them on separate data mounts in order to ensure that you have enough IOPs and/or throughput or to cut down on the max size of some lexicons that are soaking up a ton of CPU for big and scary queries.

     

    The best way to know for sure is to test it out! Try either, or both, and see which helps or hurts and measure how much things are affected. With MarkLogic it's relatively easy to add forests and/or hosts and rebalance. So, test both scenarios and see which one is best for you, and what the optimal size of your forests are for your workloads and your servers.

    Selected as Best
  • Mads Hansen (Progress Software)

    The answer is: "It depends!"

     

    Are you meeting your SLAs? Have response times or throughput numbers started to decrease? Are you noticing any issues? Is resource utilization acceptable or hitting any unusual spikes or limits?

     

    The 500GB forest size recommendation is a rule of thumb, but there are a number of factors that could mean you would want to keep your forests much smaller, or allow you to grow even larger and still be fine. The size of your documents, index settings, types of documents and whether there are binary and large documents, whether it's mostly static read-only, heavy writes, or a mix of transactional workloads, the size and capacity of your servers, etc. all affect what an optimal size of your forests would be.

     

    Not knowing anything about your data, the workloads, or the specs of your servers - if you already have several forests on that host and they are each ~500GB or larger, then it may be better to scale-out. Adding more D-nodes and spread things out so that they each have less data to manage and can perform better. Things usually perform better when you throw extra hardware and resources at them, rather than simply shuffling chairs on the deck.

     

    Sometimes adding forests to your existing nodes is the best decision. If you have enough resources, and things are performing well enough to meet your SLAs and you are just looking to spread things out a little, maybe put them on separate data mounts in order to ensure that you have enough IOPs and/or throughput or to cut down on the max size of some lexicons that are soaking up a ton of CPU for big and scary queries.

     

    The best way to know for sure is to test it out! Try either, or both, and see which helps or hurts and measure how much things are affected. With MarkLogic it's relatively easy to add forests and/or hosts and rebalance. So, test both scenarios and see which one is best for you, and what the optimal size of your forests are for your workloads and your servers.

    Selected as Best
  • Avinash Mistry (Progress Software)

    Horizontal or Vertical scaling?

    Horizontal scaling (expanding by adding nodes) adds Network as another potential performance bottleneck. Vertical scaling (more RAM/CPU/Disk IO) gets expensive compare to just adding another node (horizontally), but by avoiding network (inter node XDQP communication) it will perform better when compared to load where there is no resource constraint on CPU/RAM/Disk. However, vertical scaling adds to single point of failure concentration of data. So again: "It depends!"