Skip to content

PHOENIX-6193 PHOENIX-6151 slows down shading - #925

Closed
stoty wants to merge 1 commit into
apache:masterfrom
stoty:PHOENIX-6193
Closed

PHOENIX-6193 PHOENIX-6151 slows down shading#925
stoty wants to merge 1 commit into
apache:masterfrom
stoty:PHOENIX-6193

Conversation

@stoty

Copy link
Copy Markdown
Contributor

No description provided.

@stoty

Copy link
Copy Markdown
ContributorAuthor

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec1m 11sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+1 💚@author0m 0sThe patch does not contain any @author tags.
-1 ❌test4tests0m 0sThe patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ master Compile Tests _
-1 ❌mvninstall47m 35sroot in master failed.
+1 💚compile0m 34smaster passed
+1 💚javadoc0m 13smaster passed
_ Patch Compile Tests _
-1 ❌mvninstall15m 19sroot in the patch failed.
+1 💚compile0m 27sthe patch passed
+1 💚javac0m 27sthe patch passed
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚xml0m 1sThe patch has no ill-formed XML file.
+1 💚javadoc0m 11sthe patch passed
_ Other Tests _
+1 💚unit12m 7sphoenix-client in the patch passed.
+1 💚asflicense0m 11sThe patch does not generate ASF License warnings.
78m 26s
SubsystemReport/Notes
DockerClientAPI=1.40 ServerAPI=1.40 base: https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-925/1/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#925
Optional Testsdupname asflicense javac javadoc unit xml compile
unameLinux b5e26355b6b7 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev/phoenix-personality.sh
git revisionmaster / 1784848
Default JavaPrivate Build-1.8.0_242-8u242-b08-0ubuntu3~16.04-b08
mvninstallhttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-925/1/artifact/yetus-general-check/output/branch-mvninstall-root.txt
mvninstallhttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-925/1/artifact/yetus-general-check/output/patch-mvninstall-root.txt
Test Resultshttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-925/1/testReport/
Max. process+thread count63 (vs. ulimit of 30000)
modulesC: phoenix-client U: phoenix-client
Console outputhttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-925/1/console
versionsgit=2.7.4 maven=3.3.9
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@lhofhansl

Copy link
Copy Markdown
Contributor

I'll try this out today.

@lhofhansl

lhofhansl commented Oct 17, 2020

Copy link
Copy Markdown
Contributor

Faster, about 500KB/s, but still take a long time to build the two 150MB jars.
It keeps one core busy on my machine... Can we build client and client-embedded in parallel?
(I'm building with -T 8, but these two jars are build in the same task)

@stoty

Copy link
Copy Markdown
ContributorAuthor

I've re-run the build with warm maven caches:
Pre-6151:
[INFO] Phoenix Client ..................................... SUCCESS [02:20 min]
With this patch:
[INFO] Phoenix Client ..................................... SUCCESS [05:10 min]

So we're still about twice as slow as the original shading setup. Part of that is probably simply that we are shading more stuff, but using excludes probably also contributes.

Putting the two client JARs in different modules is certainly possible, however I did not have much luck running the build in multiple threads. The test parameters (numITCount) are usually tuned to fully use the test machine, and -T will cause a lot of test failures due to resource exhaustion. (and if you are on a very large machine, you're probably still better off increasing numITCount when running the full test suite)

Since we do not actually test the shaded artifacts, there is not much point in building them in Jenkins, and they are not useful 95% percent of the time during local development. We could shave off 10 minutes from the CI builds by not building the shaded artifacts at all. Yetus sets some default profile/property that we could re-use for this, and of course this could also be used locally.

For local development builds that aren't deployed to a real cluster I usually just use:

mvn clean package -DskipTests -am -pl phoenix-core :
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Apache Phoenix 5.1.0-SNAPSHOT:
[INFO]
[INFO] Phoenix Hbase 2.1.6 compatibility .................. SUCCESS [ 4.551 s]
[INFO] Apache Phoenix ..................................... SUCCESS [ 1.355 s]
[INFO] Phoenix Core ....................................... SUCCESS [ 27.730 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 34.456 s

@lhofhansl

Copy link
Copy Markdown
Contributor

Perhaps we can have a maven option to not build the -embedded jar.

@stoty

Copy link
Copy Markdown
ContributorAuthor

The new patch implements both of your suggestions, @lhofhansl .
Note that this changes the embedded client maven coordinates.
At the same time, the new module structure should make adding new client variants easier.(for PHOENIX-6144, specifically)

@lhofhansl

Copy link
Copy Markdown
Contributor

Awesome!
Did a skim... Looks great. And I like the structure for adding new clients.

I'll take a closer look tomorrow.

@lhofhansllhofhansl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tried it. Works fine!

@lhofhansl

lhofhansl commented Oct 19, 2020

Copy link
Copy Markdown
Contributor

Wait... Looks like it's still taking a very long time. (The previous run wasn't finished... My mistake)
20 minutes and going. :(

But I see it is doing the building in parallel. So I guess we achieved was we set out to do with this one. Just still slow. :(
I'll stick with my approval. So still +1

@lhofhansl

Copy link
Copy Markdown
Contributor

Sorry for the noise - it's a bit early for me in seems. Now assembly fails for me. I'll come back when I fully tested this.

@stoty

stoty commented Oct 19, 2020

Copy link
Copy Markdown
ContributorAuthor

I've rebased the patch, as we had some (unrelated) build breaking bugs in master, that @virajjasani has found and fixed. @lhofhansl.
It builds fine now.

@stoty

Copy link
Copy Markdown
ContributorAuthor

(!) A patch to the testing environment has been detected.
Re-executing against the patched versions to perform further tests.
The console is at https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-925/2/console in case of problems.

@lhofhansl

lhofhansl commented Oct 19, 2020

Copy link
Copy Markdown
Contributor

When I do git apply with the patch I see that we still have the old, SLOW, exclude patterns. (in phoenix-client-parent/phoenix-client/pom.xml)
Might be a mistake about how I apply the patch. But let's double check.

@stoty

Copy link
Copy Markdown
ContributorAuthor

There are two patches, and github only exports the second, I guess.

simplify shading rules to speed it up
make client builds parallelizable
make embedded client skippable
change embedded client maven coordinates
@stoty

Copy link
Copy Markdown
ContributorAuthor

I've squashed them.

@lhofhansl

Copy link
Copy Markdown
Contributor

git am did it. Sigh.

@joshelserjoshelser left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Goes from 7.5mins to 4mins for me. Looks like a nice win!

I have not done any validation with the embedded artifact, though.

@lhofhansl

Copy link
Copy Markdown
Contributor

Yeah. Looks good now.

@stoty

Copy link
Copy Markdown
ContributorAuthor

Hmm. Looks like Yetus cannot correctly handle PRs that consist of more than one patch, even when working directly from GitHub.

@stotystoty closed this Oct 19, 2020
@stoty

Copy link
Copy Markdown
ContributorAuthor

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 29sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+1 💚@author0m 0sThe patch does not contain any @author tags.
-1 ❌test4tests0m 0sThe patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ master Compile Tests _
+0 🆗mvndep3m 38sMaven dependency ordering for branch
+1 💚mvninstall33m 36smaster passed
+1 💚compile1m 19smaster passed
+1 💚javadoc1m 28smaster passed
_ Patch Compile Tests _
+0 🆗mvndep0m 15sMaven dependency ordering for patch
+1 💚mvninstall18m 8sthe patch passed
+1 💚compile1m 16sthe patch passed
+1 💚javac1m 16sthe patch passed
+1 💚shellcheck0m 1sThere were no new shellcheck issues.
+1 💚shelldocs0m 1sThere were no new shelldocs issues.
-1 ❌whitespace0m 0sThe patch has 1 line(s) that end in whitespace. Use git apply --whitespace=fix <<patch_file>>. Refer https://git-scm.com/docs/git-apply
+1 💚xml0m 9sThe patch has no ill-formed XML file.
-1 ❌javadoc0m 10sphoenix-assembly in the patch failed.
_ Other Tests _
-1 ❌unit99m 22sroot in the patch failed.
-1 ❌asflicense1m 52sThe patch generated 8 ASF License warnings.
166m 4s
SubsystemReport/Notes
DockerClientAPI=1.40 ServerAPI=1.40 base: https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-925/2/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#925
Optional Testsdupname asflicense shellcheck shelldocs javac javadoc unit xml compile
unameLinux d93ab81a4843 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev/phoenix-personality.sh
git revisionmaster / 5b58d9b
Default JavaPrivate Build-1.8.0_242-8u242-b08-0ubuntu3~16.04-b08
whitespacehttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-925/2/artifact/yetus-general-check/output/whitespace-eol.txt
javadochttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-925/2/artifact/yetus-general-check/output/patch-javadoc-phoenix-assembly.txt
unithttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-925/2/artifact/yetus-general-check/output/patch-unit-root.txt
Test Resultshttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-925/2/testReport/
asflicensehttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-925/2/artifact/yetus-general-check/output/patch-asflicense-problems.txt
Max. process+thread count6701 (vs. ulimit of 30000)
modulesC: phoenix-client-parent/phoenix-client phoenix-assembly phoenix-client-parent/phoenix-client-embedded . phoenix-client phoenix-client-parent U: .
Console outputhttps://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-925/2/console
versionsgit=2.7.4 maven=3.3.9 shellcheck=0.7.0
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@stoty
stoty deleted the PHOENIX-6193 branch July 29, 2021 13:10
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@stoty@lhofhansl@joshelser