skip to content

In Redis Insight, when do you use the Profiler and when the Slow Log screen, and what does each one do to the server?

level: middleimportance: should knowfreq 15%

answer

  1. one slow call or a traffic pattern
  2. which screen has a duration column
  3. one connection per node
  4. a read screen with write buttons

basics

~20 s

Slow Log lists commands that exceeded a runtime threshold, so open it first. Profiler runs MONITOR on every node and streams all commands, so keep it short. Slow Log's settings and Clear button change shared server state.

solid answer

~50 s

I start with **Slow Log** when I suspect a slow command: it reads `SLOWLOG GET` from each node and shows when each command ran, how long it executed, and its arguments. Reading it adds very little, but the screen is not read-only. Its settings send `CONFIG SET` and **Clear** sends `SLOWLOG RESET`, and both affect everyone on that server. I use **Profiler** when the question is about traffic rather than one slow call, such as an endpoint sending hundreds of fast commands. It opens a `MONITOR` connection to each node and streams every command with its time, database, source and arguments, but no duration. `MONITOR` costs real throughput, so I run it for a short window and stop it; the connection closes when the last viewer leaves. A saved log holds full arguments, values included, so I treat that file as sensitive.

code

plaintext · 8 lines
plaintext
# Slow Log screen
SLOWLOG GET 50                             # each node
CONFIG GET slowlog*
CONFIG SET slowlog-log-slower-than 10000   # standalone connections only
SLOWLOG RESET                              # each node: the Clear button

# Profiler, one connection per node for as long as it runs
MONITOR

go deeper

for a junior

Recall the split: Slow Log lists commands that took too long, and Profiler shows every command as it arrives. Remember to stop the Profiler when you are done.

for a middle

Explain what each screen sends, what fields each returns, and why Profiler has no duration. Know that the Slow Log settings send CONFIG SET and that Clear sends SLOWLOG RESET.

for a senior

Show the order you would use on a shared server: read first, profile briefly, restore what you changed. Mention that Profiler opens a connection per node, replicas included on a cluster, and that a saved log holds values.

for a principal

Decide who may hold MONITOR and CONFIG rights on shared environments. A screen that looks like a dashboard can change server state, so the guard belongs in the user's permissions rather than in people's care.

## Two screens, two questions The two tools answer different questions, and choosing the wrong one wastes time or costs throughput. Picture a shared staging instance where an endpoint has become slow. | | **Slow Log** | **Profiler** | |---|---|---| | Question | Which commands took too long? | What is being sent right now? | | Sends | `SLOWLOG GET` | `MONITOR` | | Captures | Commands over the threshold, already recorded by the server | Commands arriving while it runs, and only then | | Duration shown | Yes | No | | Cost while reading | Very small | Real throughput cost for as long as it runs | | Can change the server | Yes: threshold, length, clear | No | ## The Slow Log screen The server records slow commands whether or not anyone is looking, and this screen reads them back. What exactly the server's timer includes is covered with `SLOWLOG` itself; here the concern is what the screen does. - **It reads per node.** The API sends `SLOWLOG GET` with a count, 50 by default, to each node and concatenates the replies, so on a cluster the count applies per node. - **It shows timestamp, duration and command.** You can switch the duration unit, and an auto-refresh interval keeps the list current. - **Its settings are server settings.** Changing the threshold or the maximum length sends `CONFIG SET slowlog-log-slower-than` or `CONFIG SET slowlog-max-len`. This is not a display filter: it changes what the server records for everybody. - **The change is not written to a file.** The service sends `CONFIG SET` and never `CONFIG REWRITE`, so the running value changes at once and is lost at the next restart unless someone also saves it. - **Cluster connections cannot change it.** The API refuses with the message that slowlog configuration for cluster is deprecated, and the page does not show the current threshold in that mode. - **Clear destroys shared evidence.** It sends `SLOWLOG RESET` to every node. On a shared instance, a colleague investigating the same incident loses those entries too. ## The Profiler Profiler is the screen that shows fast commands, which never reach a slow log. - **It opens one `MONITOR` per node.** A standalone connection has one. On a cluster connection, it asks for all nodes, so replicas get one too. - **Viewers share it.** Redis Insight keeps one observer per database, and when the last viewer leaves or its socket drops, it disconnects those connections. Closing the panel is what ends the cost. - **Each line holds time, database, source and arguments.** There is no execution time, so it shows what was sent and by whom, not how long anything took. - **Some commands never appear.** The server does not feed admin commands such as `CONFIG SET` to monitors, and Redis Insight's own traffic does appear: the overview's polling can show up as `INFO` lines unless its refresh is changed or stopped. - **Logs can be saved.** With saving enabled before you start, lines go to a text file you can download. The file lives in a temp folder wherever Redis Insight's API runs, and contains full arguments, including values. The cost is the reason to keep it brief. The release notes that introduced it warn that running `MONITOR` is dangerous to a production server's performance, and to remember to stop the Profiler. Redis's own `MONITOR` page shows one client cutting throughput by more than half in its example. How that cost behaves belongs with `MONITOR` as a command. ## A sensible order on a shared instance 1. **Read Slow Log first.** It costs almost nothing, and the entries are already there. 2. **If an expensive command is there,** you have a candidate. Confirm it with the application team before changing anything. 3. **If Slow Log is empty but the endpoint is slow,** suspect many fast commands or time spent outside the server. 4. **Run Profiler for a short window** while triggering the endpoint once, then stop it. Look for repeated commands and the source address. 5. **Put back anything you changed.** If you lowered the threshold to catch more, restore it, and tell the people sharing the server. The common mistake is treating both as harmless because they look like read-only dashboards. One has buttons that change server state; the other taxes every command while it is open.

  • If you lower the threshold in Redis Insight's Slow Log settings, does the change survive a restart?
    Not by itself. The screen sends `CONFIG SET` and never `CONFIG REWRITE`, so the running value changes immediately for every client, and the server goes back to its configuration file on restart. On a cluster connection the API refuses the change altogether.
  • Why can Redis Insight's Profiler not prove that a command was slow?
    Its lines carry arrival time, database, source and arguments, and no execution time. The gap between two lines is not a duration, because other clients' commands arrive in between. Use it to see what is being sent and how often, and use Slow Log or a client-side timer for how long something took.
  • What does Redis Insight's Profiler miss even while it is running?
    Anything sent before you started, and admin commands such as `CONFIG SET`, because the server does not feed those to monitors. It also adds noise of its own, since Redis Insight's overview polling can appear as `INFO` lines.

  • Slow Log is read-only, so nothing on that screen can affect other users.
  • Profiler shows how long each command took to execute.
  • Changing the Slow Log threshold is a private display filter in the GUI.
  • Profiler only samples traffic, so it is cheap enough to leave running.
  • A saved Profiler log is safe to share because it holds only command names.