Unexpected CFS throttling

From: Ivan Babrou
Date: Thu Dec 07 2017 - 23:03:56 EST


Hello,

We're seeing unexpected CFS throttling. I wrote down detailed
description with an easily reproducible case here:

* https://gist.github.com/bobrik/2030ff040fad360327a5fab7a09c4ff1

TL;DR is that even though we don't burn through CFS quota during the
period, throttling kicks in anyways. The larger interval between wakes
up is, the higher chance of throttling we get. We're seeing this on
different kernels (4.4, 4.9, 4.14) and different distros (different
kernel configs).

In corner cases well behaved applications that stay within quota get
delayed for two periods in a row, which means 200ms latency with
systemd.