Mailinglist Archive: yast-devel (35 mails)

< Previous Next >
Re: [yast-devel] YaST Installer Memory Consumption (the Ruby part)
On 07/07/2016 07:38 PM, Ladislav Slezak wrote:

Hi all,

Ruby 2.1+ allows tracing object allocations, see more details in this article

I enabled it and dumped the Ruby memory usage data in a SLES12-SP2 Beta3

It is related to this Trello card [2] and this bug [3].

You can find more details and the dump in my Gist [4], here is a copy of the
interesting part:

## The Result

A quick scan found out that the place which consumes most memory is

/usr/share/YaST2/lib/installation/ssh_config_file.rb:45:STRING: count: 4,
total size: 274056

which loads the SSH keys and configuration from the previous installation and
about 270kB memory.

The question is we can optimize it better, the SSH keys actually need to be
somewhere as the target partition will be reformatted...

A quite trivial modification would be to change SshConfigFile#content
and SshKey::KeyFile#content to store the content of the files in a
temporary file and not in memory. It should be completely harmless,
since that code is new, sane and covered by unit tests.

The only optimization could be probably possible when the user selects to not
the keys. In that case we could drop the loaded keys when the installation
But that's not the default so this improvement would actually help only in
some cases...


You can collect a different statistics from the data, e.g. the place which
the most objects, which methods, check the object "age" (the GC generation
value), etc...


Ancor González Sosa
YaST Team at SUSE Linux GmbH
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: yast-devel+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups