Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MacOS] Performance observation: Kantra is ~144x slower than WindUp on jboss-eap-quickstarts #121

Open
jwmatthews opened this issue Nov 16, 2023 · 6 comments

Comments

@jwmatthews
Copy link
Member

I ran an analysis on the jboss-eap-quickstarts repo, all of the subdirectories at once (~6k files present in checkout, ~23Mb of content, ~90 small projects ).

Kantra took 192 minutes to complete the analysis.
I re-ran this with WindUp and tried to use similar targets, and it took ~1 minute 20 seconds.

This analysis was run by accident, I intended to only run against kitchensink, but forgot and ran on entire checkout, was then surprised with how long it was taking.

Environment: Mac OS (apple silicon - M1Max)

$ podman machine ls
NAME        VM TYPE     CREATED       LAST UP       CPUS        MEMORY      DISK SIZE
kantra*     qemu        22 hours ago  22 hours ago  4           8GiB        100GiB

Reproducer Kantra (using binary from ":latest" image as of Nov 15 2023)

  1. Create podman machine via: https://github.com/jwmatthews/kyma_poc/blob/main/data/darwin_restart_podman_machine.sh

  2. git clone https://github.com/jboss-developer/jboss-eap-quickstarts.git jboss-eap-quickstarts-javaee

  3. time ./kantra analyze -i jboss-eap-quickstarts-javaee -t "quarkus" -t "jakarta-ee" -t "jakarta-ee8+" -t "jakarta-ee9+" -t "cloud-readiness" -o out --overwrite

       real	192m52.878s
       user	1m0.451s
       sys	2m2.828s
    

Reproducer Windup (using MTA 6.2.0 binary)

  1. Reuse checkout of jboss-eap-quickstarts-javaee from above

  2. time ./windup-cli --input jboss-eap-quickstarts-javaee --target jakarta-ee quarkus quarkus3 cloud-readiness --output ./out.windup --overwrite

    real 1m21.521s
    user 2m39.934s
    sys 0m9.134s
    159.94s user 9.14s system 207% cpu 1:21.54 total

@jwmatthews
Copy link
Member Author

jwmatthews commented Nov 16, 2023

This issue is likely a duplicate of #96, I filed it separately though as I thought the magnitude of the difference was worth being explicit and ensuring we didn't lose for tracking. Perhaps this repo (https://github.com/jboss-developer/jboss-eap-quickstarts) is a good test for us to work with to iron out the perf issues.

@shawn-hurley
Copy link
Contributor

@jwmatthews with the change #127 is still taking a long time I didn't let it finish.

wonder if the maven packages were already cached on the system, it is taking a long time in download AFAICT

Going to see how this works when we are not writing the deps to a maven cache that is a mount to see if it speeds that part of up.

@shawn-hurley
Copy link
Contributor

After removing the .m2 cache and using the change seeing a new time of:
./kantra analyze -i jboss-eap-quickstarts-javaee -t "quarkus" -t "jakarta-ee" 0.16s user 0.26s system 0% cpu 20:27.54 total

I am seeing a 6 min download twice for the deps though so 12 of the min is that. is that acceptable?

@shawn-hurley
Copy link
Contributor

In the future, we may want to allow to use a local .m2 as a volume, but because of the Mac OS and windows issues there I think it would cause more issues than not right now.

I wonder if we keep this around as a feature request for that once it does merge?

@jwmatthews
Copy link
Member Author

@shawn-hurley on my M1 Max with #127 went down to 36 mins (was 192 mins).

$ time ./kantra analyze -i jboss-eap-quickstarts-javaee -t "quarkus" -t "jakarta-ee" -t "jakarta-ee8+" -t "jakarta-ee9+" -t "cloud-readiness" -o out3  --overwrite
INFO[0000] running source code analysis                  args="--provider-settings=/opt/input/config/settings.json --rules=/opt/rulesets/ --output-file=/opt/output/output.yaml --context-lines=100 --dep-label-selector=(!konveyor.io/dep-source=open-source) --verbose=4 --label-selector=((konveyor.io/target=quarkus || konveyor.io/target=jakarta-ee || konveyor.io/target=jakarta-ee8+ || konveyor.io/target=jakarta-ee9+ || konveyor.io/target=cloud-readiness) && konveyor.io/source) || (discovery)" input=/Users/jmatthews/git/jwmatthews/kyma_poc/data/jboss-eap-quickstarts-javaee log=/Users/jmatthews/git/jwmatthews/kyma_poc/data/out3/analysis.log output=/Users/jmatthews/git/jwmatthews/kyma_poc/data/out3 volumes="{\"/Users/jmatthews/git/jwmatthews/kyma_poc/data/jboss-eap-quickstarts-javaee\":\"/opt/input/source\",\"/Users/jmatthews/git/jwmatthews/kyma_poc/data/out3\":\"/opt/output\",\"/var/folders/l1/1b7gzz8n02b5nrtdq51bnj4r0000gn/T/analyze-config-1050163100\":\"/opt/input/config\"}"
INFO[0000] generating analysis log in file               file=/Users/jmatthews/git/jwmatthews/kyma_poc/data/out3/analysis.log
INFO[1308] running dependency analysis                   args="--provider-settings=/opt/input/config/settings.json --rules=/opt/rulesets/ --output-file=/opt/output/output.yaml --context-lines=100 --dep-label-selector=(!konveyor.io/dep-source=open-source) --verbose=4 --label-selector=((konveyor.io/target=quarkus || konveyor.io/target=jakarta-ee || konveyor.io/target=jakarta-ee8+ || konveyor.io/target=jakarta-ee9+ || konveyor.io/target=cloud-readiness) && konveyor.io/source) || (discovery)" input=/Users/jmatthews/git/jwmatthews/kyma_poc/data/jboss-eap-quickstarts-javaee log=/Users/jmatthews/git/jwmatthews/kyma_poc/data/out3/dependency.log output=/Users/jmatthews/git/jwmatthews/kyma_poc/data/out3
INFO[1308] generating dependency log in file             file=/Users/jmatthews/git/jwmatthews/kyma_poc/data/out3/dependency.log
INFO[2171] generating static report                      args="/usr/local/bin/js-bundle-generator --analysis-output-list=/opt/output/output.yaml --deps-output-list=/opt/output/dependencies.yaml --output-path=/usr/local/static-report/output.js --application-name-list=jboss-eap-quickstarts-javaee && cp -r /usr/local/static-report /opt/output" output=/Users/jmatthews/git/jwmatthews/kyma_poc/data/out3
INFO[2172] Static report created. Access it at this URL:  URL="file:/Users/jmatthews/git/jwmatthews/kyma_poc/data/out3/static-report/index.html"
./kantra analyze -i jboss-eap-quickstarts-javaee -t "quarkus" -t "jakarta-ee"  

0.23s user 0.27s system 0% cpu 36:12.67 total

@jwmatthews
Copy link
Member Author

As of 12/1/2023, on my M1 Max, took ~15 mins to analyze Ticket Monster:
https://github.com/jmle/monolith/tree/master

My reproducer/output is here: https://github.com/jwmatthews/sample_kantra_reports/tree/main/ticket-monster

time ./analyze_ticketmonster.sh 
INFO[0000] running source code analysis                  args="--provider-settings=/opt/input/config/settings.json --rules=/opt/rulesets/ --output-file=/opt/output/output.yaml --context-lines=100 --dep-label-selector=(!konveyor.io/dep-source=open-source) --verbose=4 --label-selector=((konveyor.io/target=quarkus || konveyor.io/target=jakarta-ee || konveyor.io/target=jakarta-ee8+ || konveyor.io/target=jakarta-ee9+ || konveyor.io/target=cloud-readiness) && konveyor.io/source) || (discovery)" input=/Users/jmatthews/git/jwmatthews/kyma_poc/data/ticket-monster log=/Users/jmatthews/git/jwmatthews/kyma_poc/data/example_reports/ticket-monster/analysis.log output=/Users/jmatthews/git/jwmatthews/kyma_poc/data/example_reports/ticket-monster volumes="{\"/Users/jmatthews/git/jwmatthews/kyma_poc/data/example_reports/ticket-monster\":\"/opt/output\",\"/Users/jmatthews/git/jwmatthews/kyma_poc/data/ticket-monster\":\"/opt/input/source\",\"/var/folders/l1/1b7gzz8n02b5nrtdq51bnj4r0000gn/T/analyze-config-3263387763\":\"/opt/input/config\"}"
INFO[0000] generating analysis log in file               file=/Users/jmatthews/git/jwmatthews/kyma_poc/data/example_reports/ticket-monster/analysis.log
INFO[0541] running dependency analysis                   args="--provider-settings=/opt/input/config/settings.json --rules=/opt/rulesets/ --output-file=/opt/output/output.yaml --context-lines=100 --dep-label-selector=(!konveyor.io/dep-source=open-source) --verbose=4 --label-selector=((konveyor.io/target=quarkus || konveyor.io/target=jakarta-ee || konveyor.io/target=jakarta-ee8+ || konveyor.io/target=jakarta-ee9+ || konveyor.io/target=cloud-readiness) && konveyor.io/source) || (discovery)" input=/Users/jmatthews/git/jwmatthews/kyma_poc/data/ticket-monster log=/Users/jmatthews/git/jwmatthews/kyma_poc/data/example_reports/ticket-monster/dependency.log output=/Users/jmatthews/git/jwmatthews/kyma_poc/data/example_reports/ticket-monster
INFO[0541] generating dependency log in file             file=/Users/jmatthews/git/jwmatthews/kyma_poc/data/example_reports/ticket-monster/dependency.log
INFO[0919] generating static report                      args="/usr/local/bin/js-bundle-generator --analysis-output-list=/opt/output/output.yaml --deps-output-list=/opt/output/dependencies.yaml --output-path=/usr/local/static-report/output.js --application-name-list=ticket-monster && cp -r /usr/local/static-report /opt/output" output=/Users/jmatthews/git/jwmatthews/kyma_poc/data/example_reports/ticket-monster
INFO[0920] Static report created. Access it at this URL:  URL="file:/Users/jmatthews/git/jwmatthews/kyma_poc/data/example_reports/ticket-monster/static-report/index.html"

real	15m20.976s
user	0m0.184s
sys	0m0.201s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants