portworx / px-dev

PX-Developer is scale-out storage for containers. Run Cassandra, Jenkins, or any application in Docker, with enterprise storage functionality on commodity servers
270 stars 83 forks source link

Strip binaries #30

Closed steigr closed 7 years ago

steigr commented 7 years ago

Please strip the PX binaries in portworx/px-dev. The image size may reduce by ~80MiB.

core@master-3 ~ $ docker run --rm --net=none --entrypoint=bash portworx/px-dev -c 'cd /usr/local/bin && bins=$(file * | grep "not stripped" | cut -f1 -d:); du -csh $bins; for bin in $bins; do file $bin; ls -lh $bin; strip $bin; ls -lh $bin; done; du -csh $bins'
81M px
13M px-ns
27M px-obj
28M px-storage
484K    pxd
2.5M    pxd-dummy
6.3M    pxexec
2.9M    tp
159M    total
px: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=106cff5a7ff79ac56a96a20513d8b7d878bfe465, not stripped
-rwxr-xr-x. 1 root root 81M May 18 22:02 px
-rwxr-xr-x. 1 root root 44M May 23 09:20 px
px-ns: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=ed8afabf042430c954f47426a6141fb6aa48f627, not stripped
-rwxr-xr-x. 1 root root 13M May 18 22:02 px-ns
-rwxr-xr-x. 1 root root 7.5M May 23 09:20 px-ns
px-obj: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, not stripped
-rwxr-xr-x. 1 root root 27M May 18 22:02 px-obj
-rwxr-xr-x. 1 root root 17M May 23 09:20 px-obj
px-storage: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=f7459dcc81ca6fdf3a1c0407d9444a53c4ab74b6, not stripped
-rwxr-xr-x. 1 root root 28M May 18 22:02 px-storage
-rwxr-xr-x. 1 root root 2.9M May 23 09:20 px-storage
pxd: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=d72fc35b6cb656cc6757e60fd620876e809a5df0, not stripped
-rwxr-xr-x. 1 root root 477K May 18 22:02 pxd
-rwxr-xr-x. 1 root root 27K May 23 09:20 pxd
pxd-dummy: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, not stripped
-rwxr-xr-x. 1 root root 2.5M May 18 22:02 pxd-dummy
-rwxr-xr-x. 1 root root 1.6M May 23 09:20 pxd-dummy
pxexec: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, not stripped
-rwxr-xr-x. 1 root root 6.3M May 18 22:02 pxexec
-rwxr-xr-x. 1 root root 4.0M May 23 09:20 pxexec
tp: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=230a6606707bf419543476ed361c2e47a92b30a5, not stripped
-rwxr-xr-x. 1 root root 2.9M May 18 22:02 tp
-rwxr-xr-x. 1 root root 200K May 23 09:20 tp
44M px
7.5M    px-ns
17M px-obj
2.9M    px-storage
32K pxd
1.6M    pxd-dummy
4.0M    pxexec
204K    tp
77M total
venkatpx commented 7 years ago

Thanks for opening this. Future releases have been stripped off unneeded symbols. We will continue to look for footprint reduction as part of the development process.