Page 1 of 1

Fix: XFCe (up to 4.10 at least): tumblerd using 100% CPU

Posted: 16 Apr 2016, 05:07
by Rava
I found a solution to the tumblerd og XFCe hogging 100% CPU, especially when browsing folders with many files, especially large files e.g. animated GIF, or huge PNG or animated PNG files, for creating the thumbnails.

It is also described here.

There are two solutions I found online.
Both are scripts. The one that seems to be the "more compact coded" one is from ... o_much_CPU :

Code: Select all

tumblerpath="/usr/lib/*/tumbler-1/tumblerd" # The * here should find the right one, whether 32 and 64-bit
max_strikes=2                               # max number of above cpu/mem-threshold's in a row

if [[ -n "${log}" ]]; then
    cat /dev/null > "${log}"
    exec >"${log}" 2>&1

while sleep "${period}"; do
    while read pid; do
	cpu_usage=$(ps --no-headers -o pcpu -f "${pid}"|cut -f1 -d.)
	mem_usage=$(ps --no-headers -o pmem -f "${pid}"|cut -f1 -d.)

	if [[ $cpu_usage -gt $cpu_threshold ]] || [[ $mem_usage -gt $mem_threshold ]]; then
	    echo "$(date +"%F %T") PID: $pid CPU: $cpu_usage/$cpu_threshold %cpu MEM: $mem_usage/$mem_threshold STRIKES: ${strikes} NPROCS: $(pgrep -c -f ${tumblerpath})"
	    (( strikes++ ))
	    if [[ ${strikes} -ge ${max_strikes} ]]; then
		kill "${pid}"
		echo "$(date +"%F %T") PID: $pid KILLED; NPROCS: $(pgrep -c -f ${tumblerpath})"
    done < <(pgrep -f ${tumblerpath})
Sadly, it won't work that easily for our version / path of tumblerd;

Code: Select all

root@porteus:/# l /usr/lib/*/tumbler-1/tumblerd
ls: cannot access /usr/lib/*/tumbler-1/tumblerd: No such file or directory
root@porteus:/# l /usr/lib64/tumbler-1/tumblerd
-rwxr-xr-x 1 root 91104 2014-10-19 15:15 /usr/lib64/tumbler-1/tumblerd
root@porteus:/# l /usr/lib*/*/tumbler-1/tumblerd
ls: cannot access /usr/lib*/*/tumbler-1/tumblerd: No such file or directory
root@porteus:/# l /usr/lib*/tumbler-1/tumblerd
-rwxr-xr-x 1 root 91104 2014-10-19 15:15 /usr/lib64/tumbler-1/tumblerd

I have not run both scripts to get a good comparison, but by the code alone it seems the version is more "compact" or "slim-coded" and might be more CPU and RAM friendly.

The other version you can find here: ... rd#p554241

It was posted as solution here and since I do have an forum.xfce account I did post the URL and code of the other, more slim script (as I did above)

Any ideas what the path of the 32 bit version to tumblerd is?
The "longer" version used /usr/lib/i386-linux-gnu/tumbler-1/tumblerd
But I dunno what 32 bit Porteus 3.1 (and upcoming 3.2) are using... I only know what 3.1 84 bit are using.

Fix: XFCe (up to 4.10 at least): tumblerd using 100% CPU

Posted: 15 Apr 2024, 20:54
by sos
Just a heads up that this is still a problem in Porteus 5.01 XFCE x86_64.
Apparently nothing to do with Porteus per se (Google shows other distros affected), but with Thunar/Tumbler in certain circumstances.

In my case, I was using the Tree view in the Thunar Side Pane and browsing some pretty big file trees in /tmp while building some modules. The mouse cursor began doing its spinning/wait deal for some ridiculous amount of time while Thunar was working on my last Tree click. Finally I ran top in the terminal and saw that tumblerd was using all the CPU. Closing (or killing) Thunar ended it and gave me back control.

I usually run with the Thumbnails turned off in the guest account ("Show thumbnails: Never" in the Thunar Preferences), but in this case building some modules I was using a root Thunar window and the Thumbnails were probably on. As others have reported (Google), it seems that the Tree view in conjunction with the Thumbnails can exhibit this long-standing problem.

For me, the simplest fix seems to be just running with the Thumbnails off (which I usually do anyway), but now will make sure both my guest AND root accounts are set that way. The next level fix would be to edit /etc/xdg/tumbler/tumbler.rc (setting Disabled=true for some or all of the plugins). I will report back if I experience any more trouble and need to do so. And then, of course we have Rava's earlier fixes if you need Thumbnails.

Fix: XFCe (up to 4.10 at least): tumblerd using 100% CPU

Posted: 25 Apr 2024, 20:31
by Rava
Hi sos,

good to know that it is not an Porteus issue.

For now I added nemo to my system and made sure almost all instances when the GUI file browser is wanted, nemo takes over.
The only program that i was unable to convince in using nemo instead of thunar is palemoon. :(

But in palemoon's case, lucky me that only happens when i downloaded a file with palemoon and click the "open target folder" link in its download listings. When I don't do that thunar is never started.

with one exception: since nemo has no own ability to rename multiple files, I tweaked its settings to use

Code: Select all

thunar --bulk-rename
in its settings / tab "behaviour"

And us XFCE users can call ourself lucky since nemo is more slimand has better performance when it comes to lots of files and folders… it l most looks like thunar. I never miss thunar now that nemo is my GUI file browser.

I especially love its two F keys:

Code: Select all

F3 Toggle Extra Pane (split view that shows two folder side by side)
F9 Toggle left pane (browsing folders only)
When I switch on the 2nd pane with F3 temporarily and after I went to the target folders for both panes I temporarily switch off the left pane. And after I am done with the work that needs two panes, I switch off th2n with F3 again and switch on the left pane with F9.