Skip to content

Unnecessary gettimeoftheday / ustime calls or mstime caching #2552

@bungle

Description

@bungle

We have one particular issue with Redis as we see huge amounts of gettimeoftheday calls inside Redis. One of the problem sources seems to be this:
https://github.com/antirez/redis/blob/9b7f8b1c9b379ab842d40df4636dfbbeb6376fcb/src/redis.c#L2089-L2091

It seems the duration is mainly used for SLOWLOGs. Could this be disabled somehow? E.g.

Only call the ustime two times IF

flags & REDIS_CALL_STATS

OR

flags & REDIS_CALL_SLOWLOG && c->cmd->proc != execCommand

I think it is worth to check these and not to call ustime unnecessarily.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions