-
Notifications
You must be signed in to change notification settings - Fork 134
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
added document link about how to install and use Valgrind for Fluent-bit #454
Conversation
de5cea2
to
f2c820e
Compare
troubleshooting/debugging.md
Outdated
@@ -298,7 +298,7 @@ Check out the FireLens example for preventing/reducing out of memory exceptions: | |||
|
|||
#### Testing for real memory leaks using Valgrind | |||
|
|||
If you do think the cause of your high memory usage is a bug in the code, you can optionally help us out by attempting to profile Fluent Bit for the source of the leak. To do this, use the [Valgrind](https://valgrind.org/) tool. | |||
If you do think the cause of your high memory usage is a bug in the code, you can optionally help us out by attempting to profile Fluent Bit for the source of the leak. To do this, use the [Valgrind](https://valgrind.org/) tool. Here is the [tutorial](tutorials/valgrind/README.md) about how to install and use Valgrind to detect Fluent-bit memory leaks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's organize this valgrind section more and make the tutorial link more clear. Right now it's easy to miss. I want customers to see it and use it.
Here we have content in the tutorial for using valgrind, and in the guide here for creating valgrind image builds. How about we split this into clear sections that are linked in the table of contents like- "Building a Container Image with Valgrind" and "Tutorial: Using Valgrind with Fluent Bit" the latter which can be the link to your tutorial
@@ -0,0 +1,118 @@ | |||
# Tutorial: Fluent Bit Test in AWS EC2 Instance with Valgrind for Memory Leak |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
language nit: "Testing for memory leaks in Fluent Bit on an AWS EC2 Instance"
Also is the AWS EC2 necessary? Wouldn't this work on any linux machine?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because, this doc was before combined with debugging Fluent-bit on AWS EC2 Instance. I will change it to all linux machine
|
||
### Preparation | ||
|
||
Install your fluent-bit in AWS EC2 Linux 2 instance, that is, in a linux environment, which also meets the conditions for using valgrind. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are the required conditions? Does the user just need to use linux? Does it have to be an EC2 instance?
|
||
Install your fluent-bit in AWS EC2 Linux 2 instance, that is, in a linux environment, which also meets the conditions for using valgrind. | ||
|
||
### Step for Using Valgrind |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please note that Fluent Bit has support for valgrind that makes it easier for valgrind to track the stack when Fluent bit switches from one coroutine to another.
You must compile it with cmake -DFLB_VALGRIND=On
to get this support. Please ntoe this.
valgrind ./bin/fluent-bit {args for fluent bit} | ||
``` | ||
|
||
Valgrind will generate a large number of output logs when it is running, so in order to browse all output logs conveniently, it is recommended to store them in a file instead of viewing them directly in the terminal, otherwise it is inconvenient and inconvenient to find, and at the same time It will also cause the loss of many output logs. Use CLI `flag —log-file=“file-name”` will save the output logs to a file named “file-name”. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should also suggest using --leak-check=full --error-limit=no
Signed-off-by: Clay Cheng [email protected]
0384e89
to
d83ba1e
Compare
Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.