-
Notifications
You must be signed in to change notification settings - Fork 652
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
Feature COMMANDLOG to record slow and heavy traffic #1294
base: unstable
Are you sure you want to change the base?
Conversation
Signed-off-by: zhaozhao.zz <[email protected]>
Signed-off-by: zhaozhao.zz <[email protected]>
Signed-off-by: zhaozhao.zz <[email protected]>
Signed-off-by: zhaozhao.zz <[email protected]>
Signed-off-by: zhaozhao.zz <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## unstable #1294 +/- ##
============================================
+ Coverage 70.69% 70.70% +0.01%
============================================
Files 114 114
Lines 63161 63193 +32
============================================
+ Hits 44650 44680 +30
- Misses 18511 18513 +2
|
Signed-off-by: zhaozhao.zz <[email protected]>
Signed-off-by: zhaozhao.zz <[email protected]>
Signed-off-by: zhaozhao.zz <[email protected]>
Signed-off-by: zhaozhao.zz <[email protected]>
Just for Note: Let's first refresh the memory in pr #336, the last comment conclusion is: After a core team meeting, we decided adding a new command COMMANDLOG with subcommands HEAVYTRAFFIC and SLOW, and then slowlog.c can be renamed to a common commandlog.c. #336 (comment) |
From my understanding, for the command: commandlog get should be: commandlog len should be: commandlog reset should be: Can you describe the terms heavytraffic-input and heavytraffic-output in the json file (argument part) because I can only know And I think the existing slowlog commands should be deprecated? If yes, I think you should update the related json files as well. |
slowlog-max-len 128 | ||
|
||
# The second type is HEAVYTRAFFIC-INPUT, which is used to log commands with large inputs. | ||
# These commands can consume network bandwidth and the client's query buffer. The input |
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.
# These commands can consume network bandwidth and the client's query buffer. The input | |
# which can consume network bandwidth and the client's query buffer. The input |
heavytraffic-input-max-len 128 | ||
|
||
# The third type is HEAVYTRAFFIC-OUTPUT, which is used to log commands with large | ||
# execution results. This type consumes network bandwidth and the client's output buffer. |
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.
# execution results. This type consumes network bandwidth and the client's output buffer. | |
# execution results. This kind of commands consume network bandwidth and the client's output buffer. |
As discussed in PR #336.
We have different types of resources like CPU, memory, network, etc. The slowlog can only record commands eat lots of CPU during the processing phase (doesn't include read/write network time), but can not record commands eat too many memory and network. For example:
This PR introduces a new command
COMMANDLOG
, to log commands that consume significant network bandwidth, including both input and output. Users can retrieve the results usingCOMMANDLOG get <count> heavytraffic-input
andCOMMANDLOG get <count> heavytraffic-output
.And the slowlog is also incorporated into the commandlog.