• Cyrill Gorcunov's avatar
    seize: Take --timeout option into account when freezing processes · 9fae23fb
    Cyrill Gorcunov authored
    When we're freezing processes we don't count on anything but
    rather do 5 attempts with constantly increasing delay.
    
    Lets rather do the following:
    
     - take --timeout option into account (which is 5 seconds
       by default) and split it into 100 ms steps;
    
     - when frezing processes check freezer status every 100 ms.
    
    Same time it looks that 5 seconds by default is too small
    for high loaded containers. Lets increase it to 10 seconds
    by default.
    
    [ skinsbursky@:
    Frankly speaking, in this particular case increasing intervals are not nice.
    This is not a network issue or something.
    Usually freezing takes less than a second, but more, that, say 200ms.
    Otherwise it takes quite o lot of time.
    If step size is growing all the time, in most of the cases criu will
    waste hundreds of milliseconds between iterX (say, third) and (iterX+1)
    because of the growing step size.
    100ms step looks solid enough: not to small to produce a lot of syscalls
    and not to large to waste a lot of time.
    With previous scheme freezing was usually taking half a second more that
    it should because of this growing step.
    
    [ gorcunov@:
    You won't belive, but been able to sepcify --timeout 0 here allowed
    me and Stas to catch serieous problem in freezer code.
    
    https://lkml.org/lkml/2016/8/3/317
    
    Without this feature we would have to patch criu instead. So you know,
    this would be great to keep it for catching more kernel bugs ;)
    Reported-by: 's avatarStanislav Kinsburskiy <skinsbursky@virtuozzo.com>
    Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@virtuozzo.com>
    Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
    9fae23fb
Name
Last commit
Last update
Documentation Loading commit data...
contrib Loading commit data...
coredump Loading commit data...
crit Loading commit data...
criu Loading commit data...
images Loading commit data...
lib Loading commit data...
scripts Loading commit data...
test Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
.travis.yml Loading commit data...
COPYING Loading commit data...
CREDITS Loading commit data...
INSTALL.md Loading commit data...
Makefile Loading commit data...
Makefile.install Loading commit data...
Makefile.versions Loading commit data...
README.md Loading commit data...