You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now, the size of runc-dmz binary is more than 700kb, there is a sapce to reduce its size to reduce more memory when the container starting.
There are to ways could be considered:
try to remove libc dependency.
use asm
I guess we can optimize the binary footprint by eliminating glibc and executing “syscall” instruction directly, but that may happen in follow-up PRs
Rewriting this in asm will be much easier than complicating libc dependency
original posted by @AkihiroSuda #3983 (comment)
The kernel's nolibc can be easily used and produces a very small binary. It seems only ppc is not supported, so we can fallback to stdlib in that case. We can just vendor it and no need to have anything installed on the distro building it.
A quick test shows that the binary can be 8K:
original posted by @rata #3987 (comment)
Now, the size of runc-dmz binary is more than 700kb, there is a sapce to reduce its size to reduce more memory when the container starting.
There are to ways could be considered:
I guess we can optimize the binary footprint by eliminating glibc and executing “syscall” instruction directly, but that may happen in follow-up PRs
Rewriting this in asm will be much easier than complicating libc dependency
original posted by @AkihiroSuda
#3983 (comment)
The kernel's nolibc can be easily used and produces a very small binary. It seems only ppc is not supported, so we can fallback to stdlib in that case. We can just vendor it and no need to have anything installed on the distro building it.
A quick test shows that the binary can be 8K:
original posted by @rata
#3987 (comment)
https://gist.github.com/Zheaoli/f37bc1fb04917fdfac36d644ee69f7e9
I made a demo for amd64. The binary file size is 4.9k.
original posted by @Zheaoli
#3983 (comment)
Here is my contribution for arm64:
original posted by @eiffel-fl
#3983 (comment)
The text was updated successfully, but these errors were encountered: