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

container memory increasing after deploy mtail using docker #650

Open
ruyifu159 opened this issue Jun 9, 2022 · 2 comments
Open

container memory increasing after deploy mtail using docker #650

ruyifu159 opened this issue Jun 9, 2022 · 2 comments

Comments

@ruyifu159
Copy link

ruyifu159 commented Jun 9, 2022

Current mtail version: 3.0.0-rc47.

create mtail container's command:
docker run -d -p 3803:3803 -m 2048m --name mtail -v /data/xx/workspace/mtail:/etc/mtail -v /data/prelog:/var/log/xx dylanmei/mtail:v3.0.0-rc47 -logtostderr --port 3803 --expired_metrics_gc_interval 30m --stale_log_gc_interval 10m --vm_logs_runtime_errors=false --progs /etc/mtail --logs '/var/log/xx/*.log'

Next, my mtail container running and configure mtail job exporter and telegraf job exporter in prometheus. Through prometheus's monitor panel using command docker_container_mem_usage_percent{container_name="mtail"}, I find mtail container's memory increasing, follow as:
434FCCE4-C659-4614-85F2-948EE726AEF5

@jaqx0r
Copy link
Contributor

jaqx0r commented Jun 9, 2022 via email

@ruyifu159
Copy link
Author

ruyifu159 commented Jun 9, 2022

Do you want to know mtail regular file?
Actualy, I write some .mtail regular statement, and they has similar syntax, for example:

gauge controller_resp_time by name, param

/<(?P<name>.*)> 执行:(?P<time>.*)ms  响应:(?P<param>.*)/ {
	controller_resp_time[$name][$param] = $time
}

so I guess that similar these mtail statement is too grow. Because I find mtail provide two args, follow as:

 -max_recursion_depth int
    	The maximum length a mtail statement can be, as measured by parsed tokens. Excessively long mtail expressions are likely to cause compilation and runtime performance problems. (default 100)
  -max_regexp_length int
    	The maximum length a mtail regexp expression can have. Excessively long patterns are likely to cause compilation and runtime performance problems. (default 1024)

And it indeed to describe that these are likely to cause compilation and runtime performance problems.

https://google.github.io/mtail/Troubleshooting.html#memory-or-performance-issues has some tips on debugging where memory usage is occuring. If the program is not releasing metrics then the expiration gc time won't affect any memory. Please share the mtail program so we can understand what it is doing.

On Thu, 9 Jun 2022 at 14:50, 付如意 @.> wrote: Current mtail version: 3.0.0-rc47. create mtail container's command: docker run -d -p 3803:3803 -m 2048m --name mtail -v /data/xx/workspace/mtail:/etc/mtail -v /data/prelog:/var/log/xx dylanmei/mtail:v3.0.0-rc47 -logtostderr --port 3803 --expired_metrics_gc_interval 30m --stale_log_gc_interval 10m --vm_logs_runtime_errors=false --progs /etc/mtail --logs '/var/log/xx/.log' Next, my mtail container running and configure mtail job exporter and telegraf job exporter in prometheus. Through prometheus's monitor panel using command docker_container_mem_usage_percent{container_name="mtail"}, I find mtail container's memory increasing, follow as: [image: CE378A44-31C5-41a9-B772-F3FE77967E9B] https://user-images.githubusercontent.com/5111004/172766248-f64092dc-cb93-4728-92b1-48b8ff3743f6.png — Reply to this email directly, view it on GitHub <#650>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAXFX65ZWJICGJ3CXWD2OE3VOFZYFANCNFSM5YIWBVOQ . You are receiving this because you are subscribed to this thread.Message ID: @.*>

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

No branches or pull requests

2 participants