Followup to yast/yast-installation#864 "Collect memory usage data"
Part of https://trello.com/c/2RY7fqpT/1891-8-research-study-and-maybe-reduce-memory-consumption
ruby memory
https://github.com/SamSaffron/memory_profiler https://www.joyfulbikeshedding.com/blog/2019-03-14-what-causes-ruby-memory-bloat.html
RSS drops gradually in 90s after GC.start is called
Related, check why new validator seems to consume 8MiB AFTER it has finished
Substitute agents written in Perl
Extension of the above: do not use the current Perl-based yast2-users
the RW data created at installation time (we did it for libzypp, then backtracked a bit whenit crashed)
The RO data created before installation starts. Also clarify how much of inst memory it takes - some of it remains compressed (squashfs), initrd is uncompressed.
"root" can be reduced to 70% if we remove the GUI stuff (Qt, X, TTF fonts) What if we told installation-images to build a root-nox that would only support TUI installation? The uncompressed size would be reduced by 30%.
"common" has 7 MB unpacked in /usr/lib64/python3.6/__pycache__
/suse/snwint/Export/instsys_sizes_now_and_then.txt This is kernel + initrd + root + common (all the images loaded to start yast)
http://dist.suse.de/install/SLP/SLE-15-SP2-Full-GM/x86_64/DVD1/boot/x86_64/loader/initrd (85MiB xz compressed, 121MiB uncompressed cpio archive)
initrd contains squashfs'd parts/00_lib, parts/01_usr
850 KB /etc/services, can be reduced to 229 KB with minification:
sed 's/#.*//g;s/ */ /g;/^$/d' etc/services | wc(a script to be pointed to a CD FS and making a du -a | sort -n over the
packaged filesystems)
https://man7.org/linux/man-pages/man1/memusage.1.html
It is a simple LD_PRELOAD'ed profiler, can detect peaks.