redis-doc icon indicating copy to clipboard operation
redis-doc copied to clipboard

Could you specifically mention that the execution time of the INFO command is not deterministic in the Redis document (https://redis.io/commands/info)?

Open jxxxxn opened this issue 5 years ago • 2 comments

I noticed that the INFO has a 'random' and @dangerous flag in the server.c [1].

As explained in the server.c [2], it looks like the execution time of the command has a 'random' flag is non-deterministic. Please correct me if I am wrong.

Based on the information above, I would like to suggest that you put this 'warning' in the documentation of the command INFO.

The reason is that we recently figure that the cost of the INFO is expensive. And this has been discussed in [3] and [4]. Therefore, this can avoid that people generate too many INFO commands and be blocked by its non-deterministic execution time.

Sincerely,

[1] https://github.com/antirez/redis/blob/484af8ed537c3ec33b4e1f10d851c2dee0ae8686/src/server.c#L711 [2] https://github.com/antirez/redis/blob/484af8ed537c3ec33b4e1f10d851c2dee0ae8686/src/server.c#L133-L136 [3] https://groups.google.com/forum/?nomobile=true#!searchin/Redis-db/INFO/redis-db/mT4qEbxl4M0/Eol0k8PVAgAJ [4] https://github.com/antirez/redis/issues/5145

jxxxxn avatar Jun 04 '20 09:06 jxxxxn

Hi, a few facts to put the issue into the right perspective:

  • RANDOM has nothing to do with random execution time.
  • The INFO execution time, before, was linear with the number of connected clients.
  • The INFO execution time in Redis 6 was fixed and has no longer this problem.

I don't think there is anything to change.

antirez avatar Jun 04 '20 12:06 antirez

Hi,

Thank you so much for explaining that the RAMDOM is not related to the execution time of the command.

However, since the 'execution time' will linearly increase with the number of connected clients before Redis 6. Would it be possible if you could add this note to the document of INFO command?

I am assuming the INFO will block other commands from executing when the INFO is running since the Redis is a single thread. (Please correct me if I am wrong.)

If we know the execution time of INFO will increase with the number of connected clients, we will use less INFO command for monitoring utilization of Redis, say below 100 or 1 per second.

Sincerely,

jxxxxn avatar Jun 08 '20 14:06 jxxxxn

INFO does have @dangerous in current docs, closing.

mich-elle-luna avatar Dec 26 '23 18:12 mich-elle-luna