High CPU usage with GVFSD

I'm using Ubuntu MATE since 2 years, and few months ago, my CPU sensor became more high on idle : it was around 30°C before and now it is around 40°C, and CPU is always on use, around 20% which is very high for a Ryzen 5 3600 (it was closed to 0% before).

Strangely, when doing "ps -aux", I don't see any process using CPU a lot, even if I can see a high CPU usage on system monitor, but anyway.

To find which process was using CPU, I tried to stop each process on system monitor, and I find that the problem is because of GVFSD : when I stop it, CPU usage and temperature became normal. But when I'm doing that, I cannot use Ubuntu properly...

Does anyone have an idea how to fix this problem?

1 Like

you can use top and sort by cpu or

ps -eo pid,ppid,%mem,%cpu,cmd --sort=-%cpu | head

1 Like

Welcome @Pithecanthropus to the community!

1 Like

Thanks but my problem is not to learn how to use "ps" but to try to fix my problem with gvfsd which is anormaly using high CPU.

in my um22.04 these are the gvfsd processes ...

user        1210     888  0 Apr01 ?        00:00:00 /usr/libexec/gvfsd
user        1215     888  0 Apr01 ?        00:00:00 /usr/libexec/gvfsd-fuse /run/user/1000/gvfs -f
user        1677     888  0 Apr01 ?        00:00:00 /usr/libexec/gvfsd-metadata
user        1725    1210  0 Apr01 ?        00:00:00 /usr/libexec/gvfsd-trash --spawner :1.12 /org/gtk/gvfs/exec_spaw/0
user       12024   12004  0 10:27 pts/1    00:00:00 grep --color=auto gvfsd

You could have provided the output of the one liner I posted but you chose not to ...

user@um22:~$ ps -eo pid,ppid,%mem,%cpu,cmd --sort=-%cpu | head
  12038     677  0.1  0.2 sshd: user [priv]
      1       0  0.1  0.0 /sbin/init splash
      2       0  0.0  0.0 [kthreadd]
      3       2  0.0  0.0 [rcu_gp]
      4       2  0.0  0.0 [rcu_par_gp]
      5       2  0.0  0.0 [slub_flushwq]
      6       2  0.0  0.0 [netns]
      8       2  0.0  0.0 [kworker/0:0H-events_highpri]
     10       2  0.0  0.0 [mm_percpu_wq]

how do you expect help??

As I told, we cannot see that gvfsd is using CPU when using "ps" :

me@me-Ryzen5:~$ ps -eo pid,ppid,%mem,%cpu,cmd --sort=-%cpu | head
   1400    1321  0.5  6.5 /usr/lib/xorg/Xorg -core :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
 346740    3292  0.3  5.1 pluma
   3037    3009  0.0  3.8 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
   3030    1696  0.1  3.3 mate-session
   3175    3169  0.0  2.0 /usr/bin/dbus-daemon --config-file=/usr/share/defaults/at-spi2/accessibility.conf --nofork --print-address 3
   3234    3030  0.3  1.6 /usr/bin/mate-settings-daemon
   3179    3009  0.0  1.2 /usr/libexec/at-spi2-registryd --use-gnome-session
   1406       2  0.0  0.8 [irq/99-nvidia]
   3024    3009  0.1  0.8 /usr/bin/pulseaudio --daemonize=no --log-target=journal

This is when gvsfd is stopped :

me@me-Ryzen5:~$ ps -aux | grep -i gvfsd
me      3130  0.6  0.0 242720  8276 ?        Tsl  19:02   0:23 /usr/libexec/gvfsd
me      3135  0.0  0.0 378340  6516 ?        Sl   19:02   0:00 /usr/libexec/gvfsd-fuse /run/user/1000/gvfs -f -o big_writes
me      3268  0.0  0.0 316864  8388 ?        Sl   19:02   0:00 /usr/libexec/gvfsd-trash --spawner :1.7 /org/gtk/gvfs/exec_spaw/0
me      3436  0.0  0.0 175508 15404 ?        Ssl  19:02   0:00 /usr/libexec/gvfsd-metadata
me    360191  0.0  0.0 390932  8732 ?        Sl   19:56   0:00 /usr/libexec/gvfsd-network --spawner :1.7 /org/gtk/gvfs/exec_spaw/1
me    360226  0.0  0.0 317736  8476 ?        Sl   19:56   0:00 /usr/libexec/gvfsd-dnssd --spawner :1.7 /org/gtk/gvfs/exec_spaw/3
me    365917  0.0  0.0  11600  2640 pts/0    S+   19:59   0:00 grep --color=auto -i gvfsd

And this is when gvfsd is running :

And this is when gvfsd is running :
me     3130  0.6  0.0 242680  8276 ?        Ssl  19:02   0:23 /usr/libexec/gvfsd
me     3135  0.0  0.0 378340  6516 ?        Sl   19:02   0:00 /usr/libexec/gvfsd-fuse /run/user/1000/gvfs -f -o big_writes
me     3268  0.0  0.0 316864  8400 ?        Sl   19:02   0:00 /usr/libexec/gvfsd-trash --spawner :1.7 /org/gtk/gvfs/exec_spaw/0
me     3436  0.0  0.0 175508 15404 ?        Ssl  19:02   0:00 /usr/libexec/gvfsd-metadata
me   360191  0.0  0.0 390932  8740 ?        Sl   19:56   0:00 /usr/libexec/gvfsd-network --spawner :1.7 /org/gtk/gvfs/exec_spaw/1
me   360226  0.0  0.0 317736  8476 ?        Sl   19:56   0:00 /usr/libexec/gvfsd-dnssd --spawner :1.7 /org/gtk/gvfs/exec_spaw/3
me   369785  0.0  0.0  11600  2668 pts/0    S+   20:00   0:00 grep --color=auto -i gvfsd

But as it is visible here, CPU usage is changing when I'm stopping / starting the process :

There are hundreds of processes running in a Linux environment, how can you be sure that gvfsd is the issue? reboot the desktop so that it is in a clean state, monitor with top or htop. If gvfsd is stopped, why is there process 3130? You're running 20.04 which I do not have anymore to test.

For sure, I cannot be fully sure that it is gvfsd but when I stopped this process, CPU usage became normal. I tried to stopped a lot of processes and it didn't change CPU usage, so my problem is connected to gvfsd.

It's normal to see process 3130 if it is stopped, I didn't killed this process. The status "Tsl" shows it.

The Ryzen cpu is multi-threaded (6c,12t) so there could be many threads waking up & sleeping.

Yes, like most cpu nowadays, so do you know what can I do to fix my problem ?
When I'm using a process viewer, process that is using CPU it is not visible, as I showed you with ps command.

Ok, so I restarted my computer and did htop at the beggining. CPU is at 40°C.
Here is the result of an htop.

Then I stopped gvfsd process : temperature started to be lower as CPU usage. I did an other htop, and I noticed something strange : Xorg started to take a lot of virtual memory ! 24.3Go !

So maybe Xorg is the problem...

My suggestion: if you have an extra ssd, install um22.04 on that extra ssd and test if you see the same issue. Your Desktop is powerful so you can do the install in 10-15 min. But again, since I don't have a Ryzen cpu on my systems, I cannot offer advice. I hope others read the forum and provide suggestions.

Thank you but I don't have an extra hdd, and I want to try to fix the problem before reinstall. I didn't speak about it but I have a GeForce RTX1650 and I'm using Nvidia-driver-525 pilots, because when I'm using xserver-xorg-video, system is slower (and to change pilots doesn't have any consequence on CPU usage).

I also have an AMD Ryzen 5 3600 and I have a very low CPU usage.
If I run 'htop', 'htop' itself is the one using the most CPU power ( 1% )

GVFSD is the Gnome Virtual File System Daemon.
If other programs don't call it, it will use exactly 0% CPU.

It is a file system service that is kicked in action on behalf of other applications.

Now, what possibly happens is this:
You have one ore more misbehaving applications spamming the hell out of 'gvfsd' which obeys their rants and wishes just as it is designed to do
which , ofcourse, then results in high CPU usage.

Killing 'gvfsd' is killing the wrong shackle in the chain.
gvfsd is responsible for mounting URLs, external media/filesystems and the like.

Your computer is maybe possibly doing something with networked files in a highly uneconomic chatty way like talking SMB (samba) or WebDAV or some other flakey protocol with a lowly microsoft computer or constantly chatting with google-drive or dropbox or facebook or some equivalent online shady business.

So things you have to do:

  1. disable all the frivolous, non-standard, startup items and try to find out which of your startup toys is abusing the hell out of 'gvfsd'.

  2. If you are misfortunate enough to own a NVidia card: remove the proprietary drivers temporarely (use nouveau) and check again
    ( because since it is closed source, you don't know what it is doing behind your back like calling home via gvfs and continuously downloading drivers and continuously failing ?? who knows ??)

Also, if you need to: Switch off your network interfaces, remove your external drives and check again.


I upgrade to 22.04 and the problem disappeared. It's good but I don't like to "solve" a problem that way. I hope the problem will not be back in the future, because it came several months after installing 20.04.

That is, in an equivalent setup, highly likely

Thank you very much tkn for your detailed answer. I am responding in case someone finds themselves in a similar situation in the future.

  1. I tried to disable most of startup items, but it didn't fix the problem.
  2. I also used free pilots instead of Nvidia's, and it was same.

When I removed ethernet cable even before starting computer, it was still using CPU. I'm not using external drives.

1 Like

Gfvsd is a process that did consume a lot of cpu usage in the past. Yes it wont work very well on a 600mhz single core machine but nowadays nearly eevery pc is so fast the speed impact is almost unnoticeable.

Any devices attaxhed that gfvsd might "like" to open but can't?

1 Like

I add that there can be filesystem errors which cause high CPU usage by gvfs, if it has started after having used the system for a while, it might be the cause. Anyways, I agree that the cause is not gvfs itself, but some underlying problem. More testing would be needed to properly diagnose it.