diff options
author | Matthew Heon <matthew.heon@gmail.com> | 2018-10-19 16:02:14 -0400 |
---|---|---|
committer | Matthew Heon <matthew.heon@gmail.com> | 2018-11-07 11:36:01 -0500 |
commit | 140f87c474f5a075d5833335593895491b83dab6 (patch) | |
tree | 93fa572f876c58bd2e083a64bb8a8529b11e3ce9 /libpod/runtime_ctr.go | |
parent | f714ee4fb14085c326ee5d56432781a01ffabbb0 (diff) | |
download | podman-140f87c474f5a075d5833335593895491b83dab6.tar.gz podman-140f87c474f5a075d5833335593895491b83dab6.tar.bz2 podman-140f87c474f5a075d5833335593895491b83dab6.zip |
EXPERIMENTAL: Do not call out to runc for sync
When syncing container state, we normally call out to runc to see
the container's status. This does have significant performance
implications, though, and we've seen issues with large amounts of
runc processes being spawned.
This patch attempts to use stat calls on the container exit file
created by Conmon instead to sync state. This massively decreases
the cost of calling updateContainer (it has gone from an
almost-unconditional fork/exec of runc to a single stat call that
can be avoided in most states).
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
Diffstat (limited to 'libpod/runtime_ctr.go')
-rw-r--r-- | libpod/runtime_ctr.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libpod/runtime_ctr.go b/libpod/runtime_ctr.go index b63726f29..09dc7c48b 100644 --- a/libpod/runtime_ctr.go +++ b/libpod/runtime_ctr.go @@ -256,7 +256,7 @@ func (r *Runtime) removeContainer(ctx context.Context, c *Container, force bool) } // Need to update container state to make sure we know it's stopped - if err := c.syncContainer(); err != nil { + if err := c.waitForExitFileAndSync(); err != nil { return err } } else if !(c.state.State == ContainerStateConfigured || |