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

Limit size of audit log #14543

Closed
oprudkyi opened this issue Jul 11, 2022 · 4 comments · Fixed by #14695
Closed

Limit size of audit log #14543

oprudkyi opened this issue Jul 11, 2022 · 4 comments · Fixed by #14695
Assignees
Labels
kind/improvement Categorizes issue or PR as related to improving upon a current feature. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.

Comments

@oprudkyi
Copy link
Contributor

oprudkyi commented Jul 11, 2022

What Happened?

after updating to v1.26 spotted the slowness of 'minikube kubectl' command
investigation shows that audit.json was greater 5mb and that causes real slowness for every command

>time minikube options
minikube options  16.86s user 2.37s system 266% cpu 7.219 total

deletion of audit.json speedup things considerably

minikube options  0.03s user 0.03s system 91% cpu 0.064 total

probably audit.json should have limit on max size and truncated when needed

Operating System

Redhat/Fedora

Driver

Docker

@afbjorklund
Copy link
Collaborator

It should only be slower the first time after a Kubernetes version upgrade, while the client binary (kubectl) is being downloaded... After that, it should be cached and the same as running it directly.

@oprudkyi
Copy link
Contributor Author

wierd, but even simple commands like

minikube options  16.86s user 2.37s system 266% cpu 7.219 total

freeze

visually it looks like command by sefl was executed properly (with all output) and then some sort of finalizers keep running for some time

@oprudkyi
Copy link
Contributor Author

deletion of /home/user/.minikube/logs/* helped, autdit.json file was something like 5mb and probably updating of that file created such slow work

@oprudkyi oprudkyi reopened this Jul 12, 2022
@oprudkyi oprudkyi changed the title 'minikube kubectl' slow in v1.26 large audit.json make minikube very slow Jul 12, 2022
@spowelljr spowelljr added priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. kind/improvement Categorizes issue or PR as related to improving upon a current feature. labels Jul 14, 2022
@spowelljr spowelljr changed the title large audit.json make minikube very slow Limit size of audit log Jul 14, 2022
@spowelljr
Copy link
Member

spowelljr commented Jul 14, 2022

Can confirm it takes a while with a large audit file, I'm going to find exactly what part is taking a long time and see if I can optimize any, will likely cap the log count as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/improvement Categorizes issue or PR as related to improving upon a current feature. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants