Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce the image size of FFI-tools: https://gitlab.com/CentOS/automotive/container-images/ffi-tools/ #447

Closed
dougsland opened this issue May 28, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request jira

Comments

@dougsland
Copy link
Collaborator

This is not related to QM but I believe we can help there, let's track here so as soon we have a free cycle from validators effort we can improve things in the ffi-tools image size too.

cc @dougsland @Yarboa @telemaco @michalskrivanek

Original thread: #444

Related-to: tests/ffi/qm-oom-score-adj/main.fmf

[michalskrivanek](https://github.com/michalskrivanek) reviewed [yesterday](https://github.com/containers/qm/pull/444#pullrequestreview-2081081305)
[tests/ffi/qm-oom-score-adj/test.sh](https://github.com/containers/qm/pull/444/files/398f5ef610ff15749efe1367f35510d8d1208d1d#diff-5f6a63c1d7170b9cb7f9a29c92a71c118b9f1f72cc1e74b29207b2993649f3de)
image_id=$(podman images | grep quay.io/centos-sig-automotive/ffi-tools | awk -F " " '{print $3}')
if [ ! -d "${QM_HOST_REGISTRY_DIR}" ]; then
    exec_cmd "mkdir -p ${QM_HOST_REGISTRY_DIR}"
    exec_cmd "podman push ${image_id} dir:${QM_HOST_REGISTRY_DIR}/tools-ffi:latest"
@[michalskrivanek](https://github.com/michalskrivanek) michalskrivanek yesterday
IIUC this is 1.5GB. taht's going to take a while for no good reason. Unless there is a plan to use the same container inside QM for other test of course

@[michalskrivanek](https://github.com/michalskrivanek) michalskrivanek yesterday
actually, this one (in quay.io) is actually 3.34 GB

Member
@[dougsland](https://github.com/dougsland) dougsland yesterday
@Yarboa don't we have the version with the --build-arg shortbuild=yes  available somewhere?

From:
https://gitlab.com/CentOS/automotive/container-images/ffi-tools/

Thin image:
In case of testing only, add the following --build-arg shortbuild=yes to build command
# podman build -f Containerfile --build-arg shortbuild=yes --cap-add=sys_admin -t localhost/ffi-tools:latest .
Author
@[telemaco](https://github.com/telemaco) telemaco yesterday
@dougsland @Yarboa Is there any problem to use an alpine:latest image instead the tool-ffi:latest?

Member
@[dougsland](https://github.com/dougsland) dougsland yesterday
@odra for the shortversion question.

Member
@[dougsland](https://github.com/dougsland) dougsland yesterday
@telemaco I am always in favor of eating our own food but I understand your concern. I was thinking here, should we change the logic: thin version as default and make the fat version as the optional?
@odra @Yarboa do you think we can make this happen?

Member
@[Yarboa](https://github.com/Yarboa) Yarboa yesterday • 
Actually, everything is ready for that
Opened an issue,
https://gitlab.com/CentOS/automotive/container-images/ffi-tools/-/issues/2

Will work on that
Anyway, once tests are running one after each other, unless qm reboot container persist for other tests of qm

@[michalskrivanek](https://github.com/michalskrivanek) michalskrivanek 11 hours ago
1.5GB is a lot better than 3.5 GB, but it still leaves a lot to be desired. I think generally the test duration would greatly benefit of some generic optimizations (limiting number of layers, cleanup of caches) - none of that is done ATM so now wonder these images are monstrous.
It takes MINUTES to copy such amount of data on weaker boards

Member
@[Yarboa](https://github.com/Yarboa) Yarboa 5 hours ago • 
@michalskrivanek you are correct,
related to (limiting number of layers, cleanup of caches)
this one was not defined yet,
Currently we are running c9s and other SoC which are more powerfull.

I advise to open a detailed ticket for that, with tests definitions
We could also maintain lighter image for testing
@dougsland
Copy link
Collaborator Author

@Yarboa improved this topic, let's close for now, if need more work we can re-open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request jira
Projects
None yet
Development

No branches or pull requests

2 participants