-
Notifications
You must be signed in to change notification settings - Fork 500
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
Support slow log tailing sidcar for tidb instance #290
Changes from 4 commits
7caaf3d
7b29f41
7a7fbac
ad17768
970c06b
cd0fec8
7b12348
c532803
de0f511
9918307
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -175,6 +175,16 @@ tidb: | |
exposeStatus: true | ||
# annotations: | ||
# cloud.google.com/load-balancer-type: Internal | ||
# separateSlowLog: true | ||
aylei marked this conversation as resolved.
Show resolved
Hide resolved
|
||
slowLogTailer: | ||
image: busybox:1.26.2 | ||
resources: | ||
limits: {} | ||
# cpu: 50m | ||
# memory: 10Mi | ||
requests: {} | ||
# cpu: 50m | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should specify a request. Very few resources should be needed for this. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is cpu 20m and memory 5MB a good default for both limit and request? (I've tested locally and seems that 10m cpu, 1MB memory is fairly enough) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK, LGTM. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would not use a limit or make the limit a bit higher at least until we have observed it in production.. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed, maybe 50Mi memory limit is enough. This is pretty small comparing to TiDB itself. |
||
# memory: 10Mi | ||
|
||
# mysqlClient is used to set password for TiDB | ||
mysqlClient: | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
This also needs to be changed to
/var/log/tidb/slowlog
.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.
Good catch.
BTW, this is kind of a code smell but I can't figure out a better solution. I'll document this caveat or any better ideas?
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 mean user may override the configuration by setting
tidb.config
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 can specify the command line argument
-log-slow-query
of tidb-server, Its priority is higher than the configuration file.