LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Browser lags when browsing websites [high CPU usage] (https://www.linuxquestions.org/questions/linux-newbie-8/browser-lags-when-browsing-websites-%5Bhigh-cpu-usage%5D-4175532359/)

decenter 01-29-2015 12:05 AM

Browser lags when browsing websites [high CPU usage]
 
Hi,

Whenever I open browser (any browser) and load websites (any website), it lags and CPU rate gets hiked. I think its due to the processor of the system.

System specs:


Intel(R) Pentium(R) 4 CPU 3.00GHz

RAM : 2 GiB

The modern websites need at least Core i3 processors to handle properly?

Or is it some other problem?

Thanks

qlue 01-29-2015 07:25 AM

All websites use Javascript which is inherently single threading. Using a multicore/multithreaded processor won't make an ounce of difference.
Most websites these days are optimised for Google Chrome (or Chromium) and tend to lag on other browsers.

If a site is taking a ridiculous amount of time to load, and I'm only interested in the text then I load it on the command line in Lynx instead.

veerain 01-29-2015 07:26 AM

Which distro and which web browser you are using?

Opening multiple webpages loaded wih flash, scripts, images, videos of huge size with in multiple tabs makes a system unresponsive.

It happens in dual core i3 also.

Since Pentium is usually single core with propably hyper threading present so it happens with it also.

You can raise ram to 4GB.

Also use lightweight web browser based on webkit like epiphany or midori.

Also open a single or two webpage at a time.

Turn off videos, flash and even animated images.

decenter 01-29-2015 09:49 PM

Quote:

Originally Posted by qlue (Post 5308235)
All websites use Javascript which is inherently single threading. Using a multicore/multithreaded processor won't make an ounce of difference.
Most websites these days are optimised for Google Chrome (or Chromium) and tend to lag on other browsers.

If a site is taking a ridiculous amount of time to load, and I'm only interested in the text then I load it on the command line in Lynx instead.

But when I browse the same websites on a core i5 processors, I don't notice the delay.

---------- Post added 01-30-15 at 09:20 AM ----------

Quote:

Originally Posted by veerain (Post 5308237)
Which distro and which web browser you are using?

Opening multiple webpages loaded wih flash, scripts, images, videos of huge size with in multiple tabs makes a system unresponsive.

It happens in dual core i3 also.

Since Pentium is usually single core with propably hyper threading present so it happens with it also.

You can raise ram to 4GB.

Also use lightweight web browser based on webkit like epiphany or midori.

Also open a single or two webpage at a time.

Turn off videos, flash and even animated images.

I use Cent OS 6.6 and Firefox. Even chromium lags when loading websites.

qlue 01-30-2015 03:13 AM

Check your swappiness on the command line with the following command;
Code:

cat /proc/sys/vm/swappiness
The default is usually 60
Try setting it to 10 with this command;
Code:

sysctl vm.swappiness=10
Note: you must do this as root or you'll get a permission denied error message.

I suspect your machine is lagging because it is going into swap frequently. Increasing ram can reduce the problem if that is the case but reducing your swappiness can reduce the problem as well.

veerain 01-30-2015 03:21 AM

There was a old trick for Firefox where temporary files are kept in a shared ram memory (tmpfs).

decenter 01-30-2015 04:51 AM

Quote:

Originally Posted by qlue (Post 5308782)
Check your swappiness on the command line with the following command;
Code:

cat /proc/sys/vm/swappiness
The default is usually 60
Try setting it to 10 with this command;
Code:

sysctl vm.swappiness=10
Note: you must do this as root or you'll get a permission denied error message.

I suspect your machine is lagging because it is going into swap frequently. Increasing ram can reduce the problem if that is the case but reducing your swappiness can reduce the problem as well.


Thanks. I can say that there is no issue with swappiness value. My swap is not being used. Just loading from RAM. Also, if I scroll the pages (All the browsers)the CPU usage increases and due to that the browser lags.

Head_on_a_Stick 01-30-2015 05:02 AM

Go to about:config and disable javascript.

You could also try a lighter webkit-based browser (as mentioned, as long as you can live with the webkit bugs) or a light-weight distribution -- the ones based on BusyBox are very undemanding of hardware (SliTaz, TinyCore, etc).

decenter 01-30-2015 08:34 PM

Quote:

Originally Posted by Head_on_a_Stick (Post 5308810)
Go to about:config and disable javascript.

You could also try a lighter webkit-based browser (as mentioned, as long as you can live with the webkit bugs) or a light-weight distribution -- the ones based on BusyBox are very undemanding of hardware (SliTaz, TinyCore, etc).

Thank you for the suggestion. I will try it. But when I browse websites on a higher end machine which has core i5 processor, I don't get any lag.

EDDY1 01-30-2015 09:17 PM

How far are you from router?
Are you using wireless or wired?
What network are you using.
It may be your carrier.

jlinkels 01-31-2015 05:19 AM

Seems to be a normal problem, I experienced the same.

http://www.linuxquestions.org/questi...wser+scripting

In the mean time I have upgraded to a fanless I7 processor. The lag is gone. Except for Flickr which brings even an I7 to a grinding halt.

jlinkels

veerain 01-31-2015 05:23 AM

Fanless processor are less fast than those with liquid cooling whether be it i7 or not.

jlinkels 01-31-2015 09:14 AM

Put it a bit more subtle: it is true that I7 come in a lot of versions. Both in clock speed and architecture. Mine is a I7 4587T. Whatever that may mean. I have seen comparision charts were other I7 are faster.

Nevertheless this I7 is the perfect processor for me. I am running KDE with full graphic effects. I do not experience any slowness neither in KDE, not in any other desktop application.

Except for certain web pages in Firefox. But hey, making a process slow as molasses is not really difficult. I assume Flickr let decode their JPG pictures pixel by pixel in Javascript or so.

jlinkels

273 01-31-2015 09:54 AM

Quote:

Originally Posted by veerain (Post 5309377)
Fanless processor are less fast than those with liquid cooling whether be it i7 or not.

To be more accurate: Fanless processors of any given generation will likely be slower than those with active cooling (whether it is a fan or liquid makes no difference whatsoever) since fanless processors will be designed to run cool which more often than not will mean low voltage and slow.

heyubob 03-23-2015 09:26 PM

I used the above mentioned swappiness setting ((changing from 60 to 10) on a Dell Inspiriron 1150 (linuxMint) with 512k ram)). It worked Great! So, I set same to 5 and it works even better. I wonder though, could I get similar result with higher swappiness setting (w/o having to try all)? I am unsure just what is the trade-off with this method?


All times are GMT -5. The time now is 11:24 AM.