mirror of
https://github.com/containers/podman.git
synced 2025-10-17 19:24:04 +08:00
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>
This commit is contained in:
@ -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 ||
|
||||
|
Reference in New Issue
Block a user