Redis's peak memory usage tells me the high water mark for memory usage but I have no way to identify when that high point occurred without separate monitoring and metrics. I'd like to have a data element in INFO
used_memory_peak_time
which contains a timestamp when the peak was hit, so I can correlate logs and other systems to determine the cause of high memory usage. Here's what an epoch second timestamp might look like:
used_memory_peak:1754368
used_memory_peak_human:1.67M
used_memory_peak_time:1747338361
Comment From: mperham
It would also be useful to reset that peak without restarting Redis but I can understand if you don't want that complexity.
Comment From: sundb
@mperham makes sense to me.
It would also be useful to reset that peak without restarting Redis but I can understand if you don't want that complexity.
It's not complicated. However, normally we only reset the stats, but peak doesn't seem like a statistic.
Comment From: yzc-yzc
Hi @sundb. Is this already under development? Can I work on this?
Comment From: sundb
@yzc-yzc thx, feel free to do it.
Comment From: yzc-yzc
@sundb Should we reset peak memory info without restarting Redis (i.e., should CONFIG RESETSTAT command reset peak memory info)?
Comment From: sundb
@sundb Should we reset peak memory info without restarting Redis (i.e., should CONFIG RESETSTAT command reset peak memory info)?
Peak memory is always the largest memory usage throughout the lifecycle. If reset is allowed, it is only the maximum value of a single cycle. i dont think it's worth to bring a break change.
Comment From: yzc-yzc
@sundb Should we reset peak memory info without restarting Redis (i.e., should CONFIG RESETSTAT command reset peak memory info)?
Peak memory is always the largest memory usage throughout the lifecycle. If reset is allowed, it is only the maximum value of a single cycle. i dont think it's worth to bring a break change.
Got it, thanks.