• yoav-steinberg's avatar
    Add warning for suspected slow system clocksource setting (#10636) · 843a4cdc
    yoav-steinberg authored
    This PR does 2 main things:
    1) Add warning for suspected slow system clocksource setting. This is Linux specific.
    2) Add a `--check-system` argument to redis which runs all system checks and prints a report.
    
    ## System checks
    Add a command line option `--check-system` which runs all known system checks and provides
    a report to stdout of which systems checks have failed with details on how to reconfigure the
    system for optimized redis performance.
    The `--system-check` mode exists with an appropriate error code after running all the checks.
    
    ## Slow clocksource details
    We check the system's clocksource performance by running `clock_gettime()` in a loop and then
    checking how much time was spent in a system call (via `getrusage()`). If we spend more than
    10% of the time in the kernel then we print a warning. I verified that using the slow clock sources:
    `acpi_pm` (~90% in the kernel on my laptop) and `xen` (~30% in the kernel on ...
    843a4cdc
syscheck.h 1.84 KB