Closed jjobi closed 7 years ago
the plugin image is 707MB with when built from golang, while it is just 205MB with centos. We may want to look at getting it built on top of alpine....
Created a new image called jvinod/hose:lcfs_plugin_base after removing all the unnecessary stuff from Centos image. The new base image jvinod/hose:lcfs_plugin_base is just 2.43MB in size, much smaller than Alpine! LCFS plugin is now being built on top of that image.
Earlier, our plugin would have consumed around 220MB of disk space, around 8500 inodes and around 10000 directory entries (including hardlinks).
The new plugin just consumes just 10MB of space, around 30 inodes and around 30 directory entries.
The new plugin will save lcfs on disk space as well as memory (LCFS caches all metadata).
As it stands today, around 74MB is downloaded from the Docker hub over the network while installing the plugin. This is saved as a temporary file in LCFS. After it is extracted to the plugin directory, it is running inside a Centos7.2.1511 container. That container itself creates around 8000 files (inodes) in LCFS and around 300MB of data in LCFS.
Explore using Debian golang as a base image.
All these being done, just to run a binary of size 10MB. Just wondering if this can be made smaller if that is converted to C.
PS: The overhead is a lot smaller with V1 plugin model.