Skip to content

Instantly share code, notes, and snippets.

@jreidinger
Last active April 4, 2023 08:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jreidinger/6a10029c96324c89b851415c77a67eed to your computer and use it in GitHub Desktop.
Save jreidinger/6a10029c96324c89b851415c77a67eed to your computer and use it in GitHub Desktop.
How to Test Agame DBus Service Memory Consumption

How to Test Agame DBus Service Memory Consumption

Requirements

Get running Live image of Agama. If some additional software is needed to install like valgrind, TW repo needs to be added by zypper. Also it is good to stop agama before doing adjustments.

Pmap

To get pmap of backend service search for service pid e.g. using ps aux | grep agama and then pass pid to pmap call. It is good to measure overall memory consumption of given component or doing serie of it to see how it differs in time.

Ruby memory profiler gem

Install memory profiler with gem install memory_profiler ( do not confuse with memory-profiler which is different gem ). Then modify dbus file of component to run it. E.g. for software edit /usr/share/dbus-1/agama-services/org.opensuse.Agama.Software.service and change exec to Exec=/usr/bin/ruby-memory-profiler.ruby3.2 -o /tmp/software.profile.txt --pretty agamactl -- software. Then start agama and to get final result it needs again to stop agama.

Similar way it can be changed e.g. to valgrind.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment