Commit Graph
15 Commits
Author SHA1 Message Date
John Sully f6b81914d8 Merge tag '6.2.1' into unstable
Former-commit-id: bfed57e3e0
2021-05-19 02:59:48 +00:00
zhenwei pi e641a1e11e Disable THP if enabled (#7381)
In case redis starts and find that THP is enabled ("always"), instead
of printing a log message, which might go unnoticed, redis will try to
disable it (just for the redis process).

Note: it looks like on self-bulit kernels THP is likely be set to "always" by default.

Some discuss about THP side effect on Linux:
according to http://www.antirez.com/news/84, we can see that
redis latency spikes are caused by linux kernel THP feature.
I have tested on E3-2650 v3, and found that 2M huge page costs
about 0.25ms to fix COW page fault.

Add a new config 'disable-thp', the recommended setting is 'yes',
(default) the redis tries to disable THP by prctl syscall. But
users who really want THP can set it to "no"

Thanks to Oran & Yossi for suggestions.

Signed-off-by: zhenwei pi <pizhenwei@bytedance.com>
2020-10-27 15:04:18 +02:00
Oran Agra 5ba6fe50c7 Module API for LatencyAddSample 2019-10-24 14:24:55 +03:00
John Sully d6cb1bae74 refactor server global into a pointer (so that threadsafe commands can set this to NULL to prove they don't rely on it
Former-commit-id: 1abfb5828b5ee569d4373e40255a0eb87434759d
2019-04-21 14:01:10 -04:00
John Sully 3a22280da6 port server.c to server.cpp
Former-commit-id: a6d25b92df52e436e5cf8c23ecc258f68abda00f
2019-03-06 16:29:30 -05:00
antirez c752dc5adb Separate latency monitoring of eviction loop and eviction DELs. 2015-02-11 10:52:27 +01:00
antirez a883f367f5 Check THP support at startup and warn about it. 2014-11-12 10:55:47 +01:00
antirez b65c20e3ea LATENCY DOCTOR: initial draft and events summary output. 2014-07-08 11:31:46 +02:00
antirez 608c0051d6 Latency: low level time series analysis implemented. 2014-07-07 15:00:01 +02:00
antirez 4a89da385c latencyStartMonitor() modified to avoid warnings. 2014-07-02 16:53:44 +02:00
antirez 1760e6ede1 latencyTimeSeries structure max field type fixed. 2014-07-02 16:14:28 +02:00
antirez acb5c58fbb License added to latency.h. 2014-07-02 10:06:58 +02:00
antirez 69ba6924c9 Latency monitor: command duration is in useconds. Convert. 2014-07-01 16:09:02 +02:00
antirez 47f819f87d Latency monitor: collect slow commands.
We introduce the distinction between slow and fast commands since those
are two different sources of latency. An O(1) or O(log N) command without
side effects (can't trigger deletion of large objects as a side effect of
its execution) if delayed is a symptom of inherent latency of the system.

A non-fast command (commands that may run large O(N) computations) if
delayed may just mean that the user is executing slow operations.

The advices LATENCY should provide in this two different cases are
different, so we log the two classes of commands in a separated way.
2014-07-01 11:47:08 +02:00
antirez eabdfb3e30 Latency monitor: basic samples collection. 2014-07-01 11:30:15 +02:00