Score:0

Slow Browsers startup and hight CPU usage

cn flag

Internet-browsers on my Xubuntu 20.04 started slowly on first startup even though no CPU activity during that time.

chrome 112.0 (64 bits) = 38s

firefox 112.0.2 (64 bits) = 49s

msedge 114.0 (64 bits) = 27s

tor browser 12.0.4 based on MF 102.0.9 (64 bits) = 11s

Once starts, the wait time becomes 2s then run into usage issues specially when opening YouTube:

chrome takes 32% of CPU on HD video quality

firefox 52% on same video

msedge 27%

tor 17%

Info:

Os: Xubuntu 20.04, Desktop Xfce 4.14

Hardware: Intel i7 CPU 2.20GHz

Memory: 8 GB

Hardware acceleration enabled in Firefox

Internet connection seems good

lspci | grep VGA output:

00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)
01:00.0 VGA compatible controller: NVIDIA Corporation GF108M [GeForce GT 525M] (rev a1)

Is this normal? how to speed up Firefox (my first internet browser)?

pl flag
From the CPU and GPU it looks like this could be a 2011 vintage computer. With a SandyBridge processor. Does it also have a spinning hard disk, rather than a Solid State Disk? If so, I'd say yes, you're unlikely to get much better performance out of this. I used to have a ThinkPad X220 with these kinds of specs. Adding more RAM, and replacing the disk with an SSD improves things, especially load times.
s3idani avatar
cn flag
@popey yes it's a 2011 Dell Inspiron with a 1TB HDD
Score:0
pl flag

My initial suggestions are:

  • Replace the disk with an SSD
  • Buy more RAM
  • Get a better computer

Based off the age and specs of the machine. However if none of these are possible for you right now, we can try and diagnose where the bottleneck is (which may indeed lead to one of the above answers anyway).

Install a good monitoring tool:

In a terminal run

sudo apt update

then

sudo apt install dstat

Reboot, so your memory and caches are clean, then in a terminal run this with no applications open and leave it running:

dstat --time --load -cdngy --top-cpu --top-mem --top-io

It looks like this, and updates every second:

----system---- ---load-avg--- --total-cpu-usage-- -dsk/total- -net/total- ---paging-- ---system-- -most-expensive- --most-expensive- ----most-expensive----
     time     | 1m   5m  15m |usr sys idl wai stl| read  writ| recv  send|  in   out | int   csw |  cpu process   |  memory process |     i/o process      
12-05 08:42:39|3.20 2.64 2.42|  8   2  89   0   0|   0  1744k|7839B  157k|   0     0 |7264  8501 |msedge       6.5|msedge       788M|msedge       22M 9323B
12-05 08:42:40|3.20 2.64 2.42|  9   2  88   1   0|   0   248k|  26k  192k|   0     0 |7095  8251 |msedge       6.5|msedge       787M|msedge       21M   26k
12-05 08:42:41|3.20 2.64 2.42|  8   2  90   0   0|   0   288k|6320B  206k|   0     0 |6961  7879 |msedge       6.4|msedge       787M|msedge       21M 5897B

Launch a browser. Once it finishes launching, go back to the terminal, and capture the output.

My guess is you will see under --total-cpu-usage-- the usr and probably sys value rise, indicating high cpu usage. -dsk/total- read will likely be high as it's reading all the little files that make up the browser and associated libraries. Under -most-expensive- cpu process I'd expect initially dstat to appear or perhaps the terminal process, but later it will switch to the browser process. Under ---most-expensive--- i/o process you'll see the browser show up.

All of this will essentially mean that the CPU is slow and waiting for blocks to be read from disk. The fix for that is to get a better CPU (replace computer) or faster disk (get an SSD) or more RAM (so more blocks are cached).

Feel free to post the 30 or so lines from dstat in a pastebin, or add them to the bottom of your question.

s3idani avatar
cn flag
Thank you for replying. I'm using this laptop specifically for teaching and personal coding. No hight graphic or memory are needed and yes I'm thinking about new SSD, but I don't know which type matches my current machine capabilities..
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.