You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@helix.apache.org by Kanak Biscuitwala <ka...@apache.org> on 2013/12/20 00:50:36 UTC
Review Request 16407: [HELIX-345] Speed up the controller pipeline for 0.6.x
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16407/
-----------------------------------------------------------
Review request for helix, Zhen Zhang and Kishore Gopalakrishna.
Bugs: HELIX-345
Repository: helix-git
Description
-------
commit 90e995b02a59622a0526897faaee3d6ae057b63e
Author: Kanak Biscuitwala <ka...@apache.org>
Date: Thu Dec 19 15:44:48 2013 -0800
[HELIX-345] Speed up the controller pipeline for 0.6.x
:100644 100644 5c0a94a... 5858958... M helix-core/src/main/java/org/apache/helix/controller/stages/ClusterDataCache.java
:100644 100644 df893bb... 9e2452b... M helix-core/src/test/java/org/apache/helix/Mocks.java
Diffs
-----
helix-core/src/main/java/org/apache/helix/controller/stages/ClusterDataCache.java 5c0a94a
helix-core/src/test/java/org/apache/helix/Mocks.java df893bb
Diff: https://reviews.apache.org/r/16407/diff/
Testing
-------
Tests pass locally, ReadClusterDataStage finishes 10-20% faster in extreme cases.
Thanks,
Kanak Biscuitwala
Re: Review Request 16407: [HELIX-345] Speed up the controller pipeline for
0.6.x
Posted by Kishore Gopalakrishna <ki...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16407/#review32429
-----------------------------------------------------------
do we have a test case where controller loses leadership and becomes leader again and it ensures that the messages and entire cluster data is refreshed ?
helix-core/src/main/java/org/apache/helix/controller/stages/ClusterDataCache.java
<https://reviews.apache.org/r/16407/#comment61256>
can we have if traceenabled check outside of the for loop
- Kishore Gopalakrishna
On Jan. 21, 2014, 9:13 p.m., Kanak Biscuitwala wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/16407/
> -----------------------------------------------------------
>
> (Updated Jan. 21, 2014, 9:13 p.m.)
>
>
> Review request for helix, Zhen Zhang and Kishore Gopalakrishna.
>
>
> Bugs: HELIX-345
>
>
> Repository: helix-git
>
>
> Description
> -------
>
> commit 90e995b02a59622a0526897faaee3d6ae057b63e
> Author: Kanak Biscuitwala <ka...@apache.org>
> Date: Thu Dec 19 15:44:48 2013 -0800
>
> [HELIX-345] Speed up the controller pipeline for 0.6.x
>
> :100644 100644 5c0a94a... 5858958... M helix-core/src/main/java/org/apache/helix/controller/stages/ClusterDataCache.java
> :100644 100644 df893bb... 9e2452b... M helix-core/src/test/java/org/apache/helix/Mocks.java
>
>
> Diffs
> -----
>
> helix-core/src/main/java/org/apache/helix/controller/GenericHelixController.java 3b522e6
> helix-core/src/main/java/org/apache/helix/controller/stages/ClusterDataCache.java 5c0a94a
> helix-core/src/main/java/org/apache/helix/controller/stages/ReadClusterDataStage.java f077d29
> helix-core/src/main/java/org/apache/helix/controller/stages/TaskAssignmentStage.java 192a645
> helix-core/src/test/java/org/apache/helix/Mocks.java df893bb
> helix-core/src/test/java/org/apache/helix/controller/stages/TestRebalancePipeline.java 1a11be3
>
> Diff: https://reviews.apache.org/r/16407/diff/
>
>
> Testing
> -------
>
> Tests pass locally, ReadClusterDataStage finishes 10-20% faster in extreme cases.
>
>
> Thanks,
>
> Kanak Biscuitwala
>
>
Re: Review Request 16407: [HELIX-345] Speed up the controller pipeline for
0.6.x
Posted by Kishore Gopalakrishna <ki...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16407/#review33182
-----------------------------------------------------------
Ship it!
Ship It!
- Kishore Gopalakrishna
On Jan. 21, 2014, 11:54 p.m., Kanak Biscuitwala wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/16407/
> -----------------------------------------------------------
>
> (Updated Jan. 21, 2014, 11:54 p.m.)
>
>
> Review request for helix, Zhen Zhang and Kishore Gopalakrishna.
>
>
> Bugs: HELIX-345
>
>
> Repository: helix-git
>
>
> Description
> -------
>
> commit 90e995b02a59622a0526897faaee3d6ae057b63e
> Author: Kanak Biscuitwala <ka...@apache.org>
> Date: Thu Dec 19 15:44:48 2013 -0800
>
> [HELIX-345] Speed up the controller pipeline for 0.6.x
>
> :100644 100644 5c0a94a... 5858958... M helix-core/src/main/java/org/apache/helix/controller/stages/ClusterDataCache.java
> :100644 100644 df893bb... 9e2452b... M helix-core/src/test/java/org/apache/helix/Mocks.java
>
>
> Diffs
> -----
>
> helix-core/src/main/java/org/apache/helix/controller/GenericHelixController.java 3b522e6
> helix-core/src/main/java/org/apache/helix/controller/stages/ClusterDataCache.java 5c0a94a
> helix-core/src/main/java/org/apache/helix/controller/stages/ReadClusterDataStage.java f077d29
> helix-core/src/main/java/org/apache/helix/controller/stages/TaskAssignmentStage.java 192a645
> helix-core/src/test/java/org/apache/helix/Mocks.java df893bb
> helix-core/src/test/java/org/apache/helix/controller/stages/TestRebalancePipeline.java 1a11be3
> helix-core/src/test/java/org/apache/helix/integration/TestReelectedPipelineCorrectness.java PRE-CREATION
>
> Diff: https://reviews.apache.org/r/16407/diff/
>
>
> Testing
> -------
>
> Tests pass locally, ReadClusterDataStage finishes 10-20% faster in extreme cases.
>
>
> Thanks,
>
> Kanak Biscuitwala
>
>
Re: Review Request 16407: [HELIX-345] Speed up the controller pipeline for
0.6.x
Posted by Kanak Biscuitwala <ka...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16407/
-----------------------------------------------------------
(Updated Jan. 21, 2014, 3:54 p.m.)
Review request for helix, Zhen Zhang and Kishore Gopalakrishna.
Changes
-------
Added a test to make sure that changes in live instances and ideal state are captured in the face of leader elections. Everything else (other than messages) is read every time, so it's not a concern. For messages, we always read the names from ZK, so we don't have to worry about these getting stale (message content never changes in a way that the controller cares).
Added the if (trace).
Bugs: HELIX-345
Repository: helix-git
Description
-------
commit 90e995b02a59622a0526897faaee3d6ae057b63e
Author: Kanak Biscuitwala <ka...@apache.org>
Date: Thu Dec 19 15:44:48 2013 -0800
[HELIX-345] Speed up the controller pipeline for 0.6.x
:100644 100644 5c0a94a... 5858958... M helix-core/src/main/java/org/apache/helix/controller/stages/ClusterDataCache.java
:100644 100644 df893bb... 9e2452b... M helix-core/src/test/java/org/apache/helix/Mocks.java
Diffs (updated)
-----
helix-core/src/main/java/org/apache/helix/controller/GenericHelixController.java 3b522e6
helix-core/src/main/java/org/apache/helix/controller/stages/ClusterDataCache.java 5c0a94a
helix-core/src/main/java/org/apache/helix/controller/stages/ReadClusterDataStage.java f077d29
helix-core/src/main/java/org/apache/helix/controller/stages/TaskAssignmentStage.java 192a645
helix-core/src/test/java/org/apache/helix/Mocks.java df893bb
helix-core/src/test/java/org/apache/helix/controller/stages/TestRebalancePipeline.java 1a11be3
helix-core/src/test/java/org/apache/helix/integration/TestReelectedPipelineCorrectness.java PRE-CREATION
Diff: https://reviews.apache.org/r/16407/diff/
Testing
-------
Tests pass locally, ReadClusterDataStage finishes 10-20% faster in extreme cases.
Thanks,
Kanak Biscuitwala
Re: Review Request 16407: [HELIX-345] Speed up the controller pipeline for
0.6.x
Posted by Kanak Biscuitwala <ka...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16407/
-----------------------------------------------------------
(Updated Jan. 21, 2014, 1:13 p.m.)
Review request for helix, Zhen Zhang and Kishore Gopalakrishna.
Changes
-------
- Cached messages
- Batched current state reads
- Update ideal states, live instances, and instance configs directly from the callbacks
Bugs: HELIX-345
Repository: helix-git
Description
-------
commit 90e995b02a59622a0526897faaee3d6ae057b63e
Author: Kanak Biscuitwala <ka...@apache.org>
Date: Thu Dec 19 15:44:48 2013 -0800
[HELIX-345] Speed up the controller pipeline for 0.6.x
:100644 100644 5c0a94a... 5858958... M helix-core/src/main/java/org/apache/helix/controller/stages/ClusterDataCache.java
:100644 100644 df893bb... 9e2452b... M helix-core/src/test/java/org/apache/helix/Mocks.java
Diffs (updated)
-----
helix-core/src/main/java/org/apache/helix/controller/GenericHelixController.java 3b522e6
helix-core/src/main/java/org/apache/helix/controller/stages/ClusterDataCache.java 5c0a94a
helix-core/src/main/java/org/apache/helix/controller/stages/ReadClusterDataStage.java f077d29
helix-core/src/main/java/org/apache/helix/controller/stages/TaskAssignmentStage.java 192a645
helix-core/src/test/java/org/apache/helix/Mocks.java df893bb
helix-core/src/test/java/org/apache/helix/controller/stages/TestRebalancePipeline.java 1a11be3
Diff: https://reviews.apache.org/r/16407/diff/
Testing
-------
Tests pass locally, ReadClusterDataStage finishes 10-20% faster in extreme cases.
Thanks,
Kanak Biscuitwala
Re: Review Request 16407: [HELIX-345] Speed up the controller pipeline for
0.6.x
Posted by Kanak Biscuitwala <ka...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16407/
-----------------------------------------------------------
(Updated Jan. 14, 2014, 4:39 p.m.)
Review request for helix, Zhen Zhang and Kishore Gopalakrishna.
Changes
-------
Updated diff. See comment https://issues.apache.org/jira/browse/HELIX-345?focusedCommentId=13871418&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13871418
Bugs: HELIX-345
Repository: helix-git
Description
-------
commit 90e995b02a59622a0526897faaee3d6ae057b63e
Author: Kanak Biscuitwala <ka...@apache.org>
Date: Thu Dec 19 15:44:48 2013 -0800
[HELIX-345] Speed up the controller pipeline for 0.6.x
:100644 100644 5c0a94a... 5858958... M helix-core/src/main/java/org/apache/helix/controller/stages/ClusterDataCache.java
:100644 100644 df893bb... 9e2452b... M helix-core/src/test/java/org/apache/helix/Mocks.java
Diffs (updated)
-----
helix-core/src/main/java/org/apache/helix/controller/stages/ClusterDataCache.java 5c0a94a
helix-core/src/main/java/org/apache/helix/controller/stages/TaskAssignmentStage.java 192a645
helix-core/src/test/java/org/apache/helix/Mocks.java df893bb
Diff: https://reviews.apache.org/r/16407/diff/
Testing
-------
Tests pass locally, ReadClusterDataStage finishes 10-20% faster in extreme cases.
Thanks,
Kanak Biscuitwala
Re: Review Request 16407: [HELIX-345] Speed up the controller pipeline for
0.6.x
Posted by Kanak Biscuitwala <ka...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16407/
-----------------------------------------------------------
(Updated Dec. 23, 2013, 3:10 p.m.)
Review request for helix, Zhen Zhang and Kishore Gopalakrishna.
Changes
-------
I tried the suggested approach, but found that it did not significantly decrease the latency and made the code much more difficult to read (lots of type conversions and helper data structures since each thing could be a different HelixProperty under a different path).
What I settled on was caching messages, batch-reading all current states, and leaving everything else alone. The performance is still improved, but not at the expense of readability/maintainability.
Bugs: HELIX-345
Repository: helix-git
Description
-------
commit 90e995b02a59622a0526897faaee3d6ae057b63e
Author: Kanak Biscuitwala <ka...@apache.org>
Date: Thu Dec 19 15:44:48 2013 -0800
[HELIX-345] Speed up the controller pipeline for 0.6.x
:100644 100644 5c0a94a... 5858958... M helix-core/src/main/java/org/apache/helix/controller/stages/ClusterDataCache.java
:100644 100644 df893bb... 9e2452b... M helix-core/src/test/java/org/apache/helix/Mocks.java
Diffs (updated)
-----
helix-core/src/main/java/org/apache/helix/controller/stages/ClusterDataCache.java 5c0a94a
helix-core/src/test/java/org/apache/helix/Mocks.java df893bb
Diff: https://reviews.apache.org/r/16407/diff/
Testing
-------
Tests pass locally, ReadClusterDataStage finishes 10-20% faster in extreme cases.
Thanks,
Kanak Biscuitwala
Re: Review Request 16407: [HELIX-345] Speed up the controller pipeline for
0.6.x
Posted by Kanak Biscuitwala <ka...@apache.org>.
> On Dec. 22, 2013, 8:41 p.m., Kishore Gopalakrishna wrote:
> > what is the difference we are seeing in terms of performance. Will reading in different thread imply that we might read messages first and then currenst state or vice versa ? will there be any issues with the change in order? Keep in mind that participant first update CS and then deletes the message. Controller might read the stale copy of message/current state. we need to have a test case that tests all possible combinations
> >
> > Is this is most optimal way
> >
> > is it not better to pre construct all the paths that need to be read and read them all in one async call? Actually read them in two async calls, one call gets all the stats and other call gets the data for only the changed ones.
> >
> >
This varies, but it's cut down ReadClusterDataStage by about 100ms depending on what the cluster looks like (from ~1s to ~900ms when there are 100 nodes, 100 resources, 100 partitions per resource).
That's a good call in aggregating the paths and splitting by stats, I didn't think of that. I'll change this up to try that approach and see what numbers I get.
- Kanak
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16407/#review30804
-----------------------------------------------------------
On Dec. 19, 2013, 3:50 p.m., Kanak Biscuitwala wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/16407/
> -----------------------------------------------------------
>
> (Updated Dec. 19, 2013, 3:50 p.m.)
>
>
> Review request for helix, Zhen Zhang and Kishore Gopalakrishna.
>
>
> Bugs: HELIX-345
>
>
> Repository: helix-git
>
>
> Description
> -------
>
> commit 90e995b02a59622a0526897faaee3d6ae057b63e
> Author: Kanak Biscuitwala <ka...@apache.org>
> Date: Thu Dec 19 15:44:48 2013 -0800
>
> [HELIX-345] Speed up the controller pipeline for 0.6.x
>
> :100644 100644 5c0a94a... 5858958... M helix-core/src/main/java/org/apache/helix/controller/stages/ClusterDataCache.java
> :100644 100644 df893bb... 9e2452b... M helix-core/src/test/java/org/apache/helix/Mocks.java
>
>
> Diffs
> -----
>
> helix-core/src/main/java/org/apache/helix/controller/stages/ClusterDataCache.java 5c0a94a
> helix-core/src/test/java/org/apache/helix/Mocks.java df893bb
>
> Diff: https://reviews.apache.org/r/16407/diff/
>
>
> Testing
> -------
>
> Tests pass locally, ReadClusterDataStage finishes 10-20% faster in extreme cases.
>
>
> Thanks,
>
> Kanak Biscuitwala
>
>
Re: Review Request 16407: [HELIX-345] Speed up the controller pipeline for
0.6.x
Posted by Kanak Biscuitwala <ka...@apache.org>.
> On Dec. 22, 2013, 8:41 p.m., Kishore Gopalakrishna wrote:
> > what is the difference we are seeing in terms of performance. Will reading in different thread imply that we might read messages first and then currenst state or vice versa ? will there be any issues with the change in order? Keep in mind that participant first update CS and then deletes the message. Controller might read the stale copy of message/current state. we need to have a test case that tests all possible combinations
> >
> > Is this is most optimal way
> >
> > is it not better to pre construct all the paths that need to be read and read them all in one async call? Actually read them in two async calls, one call gets all the stats and other call gets the data for only the changed ones.
> >
> >
>
> Kanak Biscuitwala wrote:
> This varies, but it's cut down ReadClusterDataStage by about 100ms depending on what the cluster looks like (from ~1s to ~900ms when there are 100 nodes, 100 resources, 100 partitions per resource).
>
> That's a good call in aggregating the paths and splitting by stats, I didn't think of that. I'll change this up to try that approach and see what numbers I get.
By the way, the new thread reads messages and current state together and in the same order as before. However, by switching to the approach you suggested, multithreading probably isn't even necessary.
- Kanak
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16407/#review30804
-----------------------------------------------------------
On Dec. 19, 2013, 3:50 p.m., Kanak Biscuitwala wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/16407/
> -----------------------------------------------------------
>
> (Updated Dec. 19, 2013, 3:50 p.m.)
>
>
> Review request for helix, Zhen Zhang and Kishore Gopalakrishna.
>
>
> Bugs: HELIX-345
>
>
> Repository: helix-git
>
>
> Description
> -------
>
> commit 90e995b02a59622a0526897faaee3d6ae057b63e
> Author: Kanak Biscuitwala <ka...@apache.org>
> Date: Thu Dec 19 15:44:48 2013 -0800
>
> [HELIX-345] Speed up the controller pipeline for 0.6.x
>
> :100644 100644 5c0a94a... 5858958... M helix-core/src/main/java/org/apache/helix/controller/stages/ClusterDataCache.java
> :100644 100644 df893bb... 9e2452b... M helix-core/src/test/java/org/apache/helix/Mocks.java
>
>
> Diffs
> -----
>
> helix-core/src/main/java/org/apache/helix/controller/stages/ClusterDataCache.java 5c0a94a
> helix-core/src/test/java/org/apache/helix/Mocks.java df893bb
>
> Diff: https://reviews.apache.org/r/16407/diff/
>
>
> Testing
> -------
>
> Tests pass locally, ReadClusterDataStage finishes 10-20% faster in extreme cases.
>
>
> Thanks,
>
> Kanak Biscuitwala
>
>
Re: Review Request 16407: [HELIX-345] Speed up the controller pipeline for
0.6.x
Posted by Kishore Gopalakrishna <ki...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16407/#review30804
-----------------------------------------------------------
what is the difference we are seeing in terms of performance. Will reading in different thread imply that we might read messages first and then currenst state or vice versa ? will there be any issues with the change in order? Keep in mind that participant first update CS and then deletes the message. Controller might read the stale copy of message/current state. we need to have a test case that tests all possible combinations
Is this is most optimal way
is it not better to pre construct all the paths that need to be read and read them all in one async call? Actually read them in two async calls, one call gets all the stats and other call gets the data for only the changed ones.
- Kishore Gopalakrishna
On Dec. 19, 2013, 11:50 p.m., Kanak Biscuitwala wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/16407/
> -----------------------------------------------------------
>
> (Updated Dec. 19, 2013, 11:50 p.m.)
>
>
> Review request for helix, Zhen Zhang and Kishore Gopalakrishna.
>
>
> Bugs: HELIX-345
>
>
> Repository: helix-git
>
>
> Description
> -------
>
> commit 90e995b02a59622a0526897faaee3d6ae057b63e
> Author: Kanak Biscuitwala <ka...@apache.org>
> Date: Thu Dec 19 15:44:48 2013 -0800
>
> [HELIX-345] Speed up the controller pipeline for 0.6.x
>
> :100644 100644 5c0a94a... 5858958... M helix-core/src/main/java/org/apache/helix/controller/stages/ClusterDataCache.java
> :100644 100644 df893bb... 9e2452b... M helix-core/src/test/java/org/apache/helix/Mocks.java
>
>
> Diffs
> -----
>
> helix-core/src/main/java/org/apache/helix/controller/stages/ClusterDataCache.java 5c0a94a
> helix-core/src/test/java/org/apache/helix/Mocks.java df893bb
>
> Diff: https://reviews.apache.org/r/16407/diff/
>
>
> Testing
> -------
>
> Tests pass locally, ReadClusterDataStage finishes 10-20% faster in extreme cases.
>
>
> Thanks,
>
> Kanak Biscuitwala
>
>
Re: Review Request 16407: [HELIX-345] Speed up the controller pipeline for
0.6.x
Posted by Zhen Zhang <ne...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16407/#review30802
-----------------------------------------------------------
Ship it!
Ship It!
- Zhen Zhang
On Dec. 19, 2013, 11:50 p.m., Kanak Biscuitwala wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/16407/
> -----------------------------------------------------------
>
> (Updated Dec. 19, 2013, 11:50 p.m.)
>
>
> Review request for helix, Zhen Zhang and Kishore Gopalakrishna.
>
>
> Bugs: HELIX-345
>
>
> Repository: helix-git
>
>
> Description
> -------
>
> commit 90e995b02a59622a0526897faaee3d6ae057b63e
> Author: Kanak Biscuitwala <ka...@apache.org>
> Date: Thu Dec 19 15:44:48 2013 -0800
>
> [HELIX-345] Speed up the controller pipeline for 0.6.x
>
> :100644 100644 5c0a94a... 5858958... M helix-core/src/main/java/org/apache/helix/controller/stages/ClusterDataCache.java
> :100644 100644 df893bb... 9e2452b... M helix-core/src/test/java/org/apache/helix/Mocks.java
>
>
> Diffs
> -----
>
> helix-core/src/main/java/org/apache/helix/controller/stages/ClusterDataCache.java 5c0a94a
> helix-core/src/test/java/org/apache/helix/Mocks.java df893bb
>
> Diff: https://reviews.apache.org/r/16407/diff/
>
>
> Testing
> -------
>
> Tests pass locally, ReadClusterDataStage finishes 10-20% faster in extreme cases.
>
>
> Thanks,
>
> Kanak Biscuitwala
>
>