Swap Space Usage in GNU/Linux

When you system has uses up all the physical memory space, it will move some of the inactive pages to the swap space, which is either a partition or a file in your storage. This works as a backup mechanism to keep you system running continuous even though the performance will take a hit. You will notice that the system will feel sluggish as there are a lot of swapping going on in the background.

I found this Bash script, swaptop, which list out all the swap usage by each process. Ran it through my current system which shown very interesting result.
$ ./swaptop | head -n 10
  188828  python 5669
  112844  chrome 3080
   67032  chrome 3617
   56312  gnome-shell 1884
   52752  chrome 2994
   44880  chrome 3031
   40784  gnome-software 2710
   37124  evolution-calen 2720
   34292  chrome 3124
   32804  packagekitd 1960

What is that Python process which has the highest usage? Why is RabbitVCS' checkerservice.pyc used up so much virtual memory? Result shown that while inactive, it will consume up to 334MB of RAM size. No wonder my system felt sluggish as I've just installed it yesterday to test out.
$ ps -a -o pid,size,args | grep 5669
 5669 334868 /usr/bin/python /usr/lib/python2.7/site-packages/rabbitvcs/services/checkerservice.pyc
31581   352 grep --color=auto 5669

Remove all RabbitVCS related packages and kill the running process of checkerservice.pyc.
$ sudo dnf remove rabbitvcs*
$ sudo kill -9 5669

Move on to the second process, evolution-calen, which I assumed is calendaring service for Evolution. Likely, let's find out the exact command parameters.
$ ps -a -o pid,size,args | grep 2720
 2720 403132 /usr/libexec/evolution-calendar-factory
 2770 517072 /usr/libexec/evolution-calendar-factory-subprocess --bus-name org.gnome.evolution.dataserver.Subprocess.Backend.Calendarx2720x2 --own-path /org/gnome/evolution/dataserver/Subprocess/Backend/Calendar/2720/2
 2780 443204 /usr/libexec/evolution-calendar-factory-subprocess --bus-name org.gnome.evolution.dataserver.Subprocess.Backend.Calendarx2720x3 --own-path /org/gnome/evolution/dataserver/Subprocess/Backend/Calendar/2720/3
32125   352 grep --color=auto 2720

Let's find out the RPM package name that provides this file.
$ dnf provides /usr/libexec/evolution-calendar-factory
Last metadata expiration check performed 2 days, 4:35:01 ago on Tue May  5 02:27:11 2015.
evolution-data-server-3.16.1-1.fc22.x86_64 : Backend data server for Evolution
Repo        : @System
......

Unfortunately I can't remove this package as there are quite a few essential packages depends on its, for example, Gnome Shell. Uninstall it will leave us with partially broken GNOME desktop.

No comments:

Post a Comment