Every x seconds, my firefox (built from sources) hangs for a few seconds (but the other applications keep running smothly).
Seems that my firefox (i didn’t tried using the binary) isn’t very keen on multithreading.
By default it has:
$ taskset -c -p firefoxpid
pid 29964's current affinity list: 0,1
To find firefox’s pid do:
$ ps -eo pid,comm | grep firefox
29964 firefox
So, firefoxpid is 29964, only in this case (pid varies). I needed to do this:
taskset -c -p 0 29964
with -c 0 (<– that’s a zero) the affinity mask is set to 1, so firefox only is allowed to use one cpu.
Take note of the parameters ordering: first the flags ( -c -p ) them the values ( <affinity list> <pid> )
the cpu id:
$ taskset -c -p firefoxpid
pid 29964's current affinity list: 0
the number of cpu’s allowed:
$ taskset -p firefoxpid
pid 29964's current affinity mask: 1
If firefox is to start from the beginning restricted, it can be launched like:
taskset -c 0 firefox
That should lessen the hangings. In my case, javascript still hanged a bit.