Skip to content

Conversation

@giuseppe
Copy link
Member

@giuseppe giuseppe commented Sep 1, 2023

we are using runc to read the cgroup configuration, if eBPF is enabled it pulls in the cilium/ebpf dependency that increases the binary size by ~1 MB.

we are using runc to read the cgroup configuration, if eBPF is enabled
it pulls in the cilium/ebpf dependency that increases the binary size
by ~1 MB.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
@giuseppe
Copy link
Member Author

giuseppe commented Sep 1, 2023

@AkihiroSuda @kolyshkin what do you think about this flag?

@AkihiroSuda
Copy link
Member

Sorry, NACK, as eBPF is a hard dependency for cgroup v2 (in the initial UserNS)

@AkihiroSuda
Copy link
Member

For library use, the packages should be just split and refactored to eliminate eBPF deps

Copy link
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NACK, please see my comments above

@giuseppe
Copy link
Member Author

giuseppe commented Sep 1, 2023

For library use, the packages should be just split and refactored to eliminate eBPF deps

how do you suggest splitting it?

@kolyshkin
Copy link
Contributor

@giuseppe this is already solved last year in #3452 (in a way described by @AkihiroSuda above). So you can try using runc from HEAD and seeing if it helps with the bloat.

The only problem is, we haven't made a release having it yet. Working on it.

@giuseppe
Copy link
Member Author

giuseppe commented Sep 1, 2023

@giuseppe this is already solved last year in #3452 (in a way described by @AkihiroSuda above). So you can try using runc from HEAD and seeing if it helps with the bloat.

The only problem is, we haven't made a release having it yet. Working on it.

I've tried with the latest runc from HEAD but I still get the ebpf dependency, and as a result the podman binary is ~1MB bigger. I'll check better if I am doing anything wrong, but I cannot see any import of github.com/opencontainers/runc/libcontainer/cgroups/devices:

$ go mod why github.com/opencontainers/runc/libcontainer/cgroups/devices
# github.com/opencontainers/runc/libcontainer/cgroups/devices
(main module does not need package github.com/opencontainers/runc/libcontainer/cgroups/devices)

@giuseppe
Copy link
Member Author

giuseppe commented Sep 1, 2023

I'll close this PR and investigate better the proposed way

@giuseppe giuseppe closed this Sep 1, 2023
@giuseppe
Copy link
Member Author

giuseppe commented Nov 3, 2023

The only problem is, we haven't made a release having it yet. Working on it.

sadly the last release did not fix the issue I have reported. It is enough to pull github.com/opencontainers/runc/libcontainer/cgroups/fs and it will add the dependency on /devices and eBPF:

$ go mod why github.com/opencontainers/runc/libcontainer/cgroups/devices
# github.com/opencontainers/runc/libcontainer/cgroups/devices
github.com/containers/podman/v4/cmd/podman/containers
github.com/containers/common/pkg/cgroups
github.com/opencontainers/runc/libcontainer/cgroups/fs
github.com/opencontainers/runc/libcontainer/cgroups/devices

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants