Skip to main content
Question

How Data Rebalance operate?

  • November 23, 2018
  • 2 replies
  • 18 views

mkheir
Forum|alt.badge.img+1
  • Participating Frequently

Hello team,

We are preparing to add more nodes to a cluster, the cluster actually counts 7 nodes and want to extend it to 11 nodes.

I have the following questions:
- Is it faster to add 4 nodes at once then rebalance, or add two nodes then rebalance , followed by adding two other nodes then rebalance?
- Are there any operations (DML,DDL?) that need to be avoided or should not run during the rebalance?
- The cluster have 18TB of data, does it mean that >36TB (K-Safety=1) will be moved? details on how data will be moved is highly appreciated.

Note:
=> SELECT scaling_factor, is_enabled, maximum_skew_percent FROM ELASTIC_CLUSTER;
scaling_factor | is_enabled | maximum_skew_percent
----------------+------------+----------------------
4 | false | 15
(1 row)

The following page : https://www.vertica.com/blog/rebalance-taking-long-time/
states that local segmentation need to be disabled prior to rebalance, but documentation says that local segments make rebalance more efficient. Does this mean that prior to extending the cluster, we need to make sure that an appropriate number of local segments exists in the cluster, and then disable local segmentation to move these segments, finaly after the rebalance complete enable the local segmentation then rebalance?

Many thanks.

2 replies

Dingqiang
Forum|alt.badge.img+1
  • Participating Frequently
  • November 23, 2018
Hi

Here are some posts to help us understanding rebalance and finding out answers of your questions:
https://www.vertica.com/kb/PrepareYourClusterforRebalance/Content/BestPractices/PrepareYourClusterforRebalance.htm
https://www.vertica.com/kb/Understanding-Rebalancing-Part-1-What-Happens-During-Rebalancing/Content/BestPractices/Understanding-Rebalancing-Part-1-What-Happens-During-Rebalancing.htm
https://www.vertica.com/kb/Understanding-Rebalancing-Part-2-Optimizing-for-Rebalancing/Content/BestPractices/Understanding-Rebalancing-Part-2-Optimizing-for-Rebalancing.htm

In general, it's better adding all nodes at one, because adding fewer nodes need more time. And as there are locks when table is rebalancing, DML and DDL operators will be blocked until it finished or failed.

To save time for splitting data when rebalancing, we can leverage local resegment to split ROS containers before really adding nodes. The process is :
1. prepare as suggestions from upper posts.
2. turn on local segment.
SELECT ENABLE_LOCAL_SEGMENTS();
SELECT SET_SCALING_FACTOR (11);
3. force spliting data. If business is busy, the 2nd optional paramenter can help us split tables one by one.
SELECT DO_TM_TASK('mergeoutsingleros' [, ':tablename']);
4. really adding 4 new nodes and reblancing according to our documents. It's better to stop DDLs/DMLs operations at the step.
5. turn off local segment after No.4 finished.
SELECT DISABLE_LOCAL_SEGMENTS();
SELECT SET_SCALING_FACTOR(4);

Hope those can help you.
DQ

On 2018/11/23, 17:17, "mkheir" wrote:

Vertica Forum https://forum.vertica.com/
mkheir started a new discussion: How Data Rebalance operate?

Hello team,

We are preparing to add more nodes to a cluster, the cluster actually counts 7 nodes and want to extend it to 11 nodes.

I have the following questions:

- Is it faster to add 4 nodes at once then rebalance, or add two nodes then rebalance , followed by adding two other nodes then rebalance?

- Are there any operations (DML,DDL?) that need to be avoided or should not run during the rebalance?

- The cluster have 18TB of data, does it mean that >36TB (K-Safety=1) will be moved? details on how data will be moved is highly appreciated.

Note:

=> SELECT scaling_factor, is_enabled, maximum_skew_percent FROM ELASTIC_CLUSTER;

scaling_factor | is_enabled | maximum_skew_percent

mkheir
Forum|alt.badge.img+1
  • Author
  • Participating Frequently
  • November 23, 2018

Many thanks Dingqiang,

Very useful inputs, I will go throw them in details and prepare a plan following your recommendations.

Regards.