-
Notifications
You must be signed in to change notification settings - Fork 136
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
Diagnosing low performance #918
Comments
can you share output of ytt with time command |
Like this?
|
I also tried looking into the output of
When grepping for the
|
ok I was trying to see if ytt is spending more time on I/O. I need to check the output of time command later, I think you can also run the ytt command through blk trace or iotop to get more details. One thing though can you tell how many files is ytt generating in output in your setup? |
It's just three files:
The secret is taken as-is,
What I could try to do is get a flamegraph after recompiling ytt. |
ok, I can take a guess that some library is being loaded repeatedly probably in a loop or recursion. Since you cannot share the yaml files, can you double check from your side. |
I load the library in a #@ main = library.get("main")
#@ for r in data.values.resources:
--- #@ template.replace(main.with_data_values(r).eval())
#@ end So I am indeed evaluating the library repeatedly in the loop (with 23 elements), but I am calling |
23 elements is quite less I think (I guess your library is not too big since overall lines you said is 1600 lines). |
What steps did you take:
I have a fairly small ytt configuration, with 36 files and 1600 lines. Among these, 20 files are values (totaling 1100 lines).
The templates (which I unfortunately cannot share) do not do anything I would consider heavy. They just generate manifests for regular Kubernetes resources.
What happened:
It takes 3.9 seconds to generate the 5700 lines of output on a fairly beefy Lenovo P1 machine.
I tried to remove all values files and add them back one by one, and one can see the generation time dramatically increasing:
What did you expect:
With a fairly small configuration, I would expect the generation to be almost instantaneous.
Anything else you would like to add:
Is there a way to diagnose where ytt spends the generation time?
The
--debug
flag is generating a lot of lines that are difficult to inspect.Environment:
ytt --version
): 0.49.0/etc/os-release
): Manjaro LinuxVote on this request
This is an invitation to the community to vote on issues, to help us prioritize our backlog. Use the "smiley face" up to the right of this comment to vote.
👍 "I would like to see this addressed as soon as possible"
👎 "There are other more important things to focus on right now"
We are also happy to receive and review Pull Requests if you want to help working on this issue.
The text was updated successfully, but these errors were encountered: