3

I see with iotop that gnome-software --gapplication-service does a lot of io, which annoys me, since this makes my laptop nearly unusable.

I see with ls -l /proc/PID/fd that there a lot of open files (more then 100).

Is there a way to reduce the load of it?

guettli
  • 1,777
  • I created a more general question, since I think this only one part of the problem: http://askubuntu.com/questions/837724/debug-slow-boot-too-much-io – guettli Oct 16 '16 at 07:07

1 Answers1

1

the classic way to reduce its impact would be to use nice , this allows you to configure the application to be more or less of a resource hog.

nice is for cpu usage, you run it with a privelege number and a command e.g.

nice 10 /usr/loca/bin/my-service

numbers range from minus 19 which is almost never run to positive 20 which is almost exclusive. The default is 0.

ionice does similar but for I/O resources (e.g. disks) and can be run in a similar way but has more options

to choose the scheduling algorithm

-c  0: none, 1: realtime, 2: best-effort, 3: idle

to choose the priority

-p 1-7 (realtime or best-effort classes only)

you can either start the process through it like nice or effect a running process by specifying its PID with -P. Nice has renice for altering running processes.

I would experiment with values for ionice by running it against an already running PID, then when you have the right values edit the script that starts gnome-software to do so via ionice and or nice if required.

To re-ionice your gnome-software process to priority 4 copy and run the following command line: (note the ` backtick is not a quote, its to the left of the one)

ionice -p `ps ax | grep gnome-software | cut -f2 -d' ' | cut -f1 -d$'\n' ` -n 4

if you want to see what your priority is just run the same command but remove the -n 4 and it will tell you. Everything in the backticks is executed and the result is dropped into the ionice command in its place just before its run , its fetching the process id of the first gnome-software process it can find.

Amias
  • 5,246
  • 1
    I don't start gnome-software --gapplication-service myself. It gets started somewhere during booting. I don't know how to put the call to nice before calling this programm. – guettli Oct 19 '16 at 13:52
  • if you add the ionice line as a 'Startup Application' then it will get reniced when you login – Amias Oct 22 '16 at 11:19
  • are you sure? I guess it will run twice if I add it to "Startup Application". – guettli Oct 24 '16 at 08:33
  • 1
    no , it won't you add the renice line to Startup Applications not a call to start gnome-software – Amias Oct 24 '16 at 11:03
  • @Amias nice -n 19 /usr/bin/gnome-software --gapplication-service at .config/autostart/gnome-software-service.desktop thx – Aquarius Power Feb 26 '17 at 00:29
  • /etc/xdg/autostart/gnome-software-service.desktop rather – DustWolf Oct 20 '17 at 08:05