View previous topic :: View next topic |
Author |
Message |
pmam Veteran

Joined: 30 Dec 2013 Posts: 1145
|
Posted: Mon May 23, 2016 11:24 am Post subject: [SOLVED] Browser getting very slow? |
|
|
My browser is getting very slow and I do not know how to find out the reason.
I used to use Seamonkey and at the beginning, it was very fast and works nicely.
However, after sometime it became slower till it was heavy and very slow.
At that point I saw large activity in "CPU Usage Monitor".
So I switched to FireFox and again it was ok but after a while it became the same as Seamonkey.
Please advise how to analyse and prevent such overloaded CPU? _________________ “You can take our property, our sweet homes, even our cloths...
But don't touch the streets, Ah, That's NO, NO, NO!
The streets are our @world's compilable kernel ...”
Last edited by pmam on Sun May 29, 2016 8:27 am; edited 1 time in total |
|
Back to top |
|
 |
eccerr0r Watchman

Joined: 01 Jul 2004 Posts: 10006 Location: almost Mile High in the USA
|
Posted: Mon May 23, 2016 1:10 pm Post subject: |
|
|
I quit my firefox session after using it each time, can't reproduce slowness.
Also depends on what websites you visit... f.g.o never has an issue. _________________ Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
 |
gorg86 Guru


Joined: 20 May 2011 Posts: 325
|
Posted: Mon May 23, 2016 2:46 pm Post subject: |
|
|
Try a new/clean profile. "firefox -P"
I had problems with AdBlock PLUS in firefox and chromium. It was causing significant CPU load and it was consuming an insane amount of RAM. |
|
Back to top |
|
 |
pmam Veteran

Joined: 30 Dec 2013 Posts: 1145
|
Posted: Mon May 23, 2016 6:28 pm Post subject: |
|
|
eccerr0r,
Quote: | I quit my firefox session after using it each time, can't reproduce slowness. |
Do you mean 'quit' = close firefox Tabs window before shut down? I sometimes close firefox window and other times just shut down...
Quote: | Also depends on what websites you visit... f.g.o never has an issue. |
Of course - guess that some sales sites etc can overloading cpu. Sorry but what is f.g.o?
As I said, looks that over time it gets more slowly due to any cookies or whatever...
gorg86,
Quote: | Try a new/clean profile. "firefox -P" |
Do you mean to open Firefox from console with this command: "firefox -P" (Need to add name of profile?)
or by choosing "New Private Window" from Firefox's Menu?
Quote: | I had problems with AdBlock PLUS in firefox and chromium. It was causing significant CPU load and it was consuming an insane amount of RAM. |
Looks you have faced same problem as mine...
Thanks _________________ “You can take our property, our sweet homes, even our cloths...
But don't touch the streets, Ah, That's NO, NO, NO!
The streets are our @world's compilable kernel ...” |
|
Back to top |
|
 |
eccerr0r Watchman

Joined: 01 Jul 2004 Posts: 10006 Location: almost Mile High in the USA
|
Posted: Mon May 23, 2016 6:29 pm Post subject: |
|
|
f.g.o = forums.gentoo.org :D _________________ Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
 |
pmam Veteran

Joined: 30 Dec 2013 Posts: 1145
|
Posted: Mon May 23, 2016 6:35 pm Post subject: |
|
|
Guess I have checked this abbreviation in all available dictionaries...  _________________ “You can take our property, our sweet homes, even our cloths...
But don't touch the streets, Ah, That's NO, NO, NO!
The streets are our @world's compilable kernel ...” |
|
Back to top |
|
 |
gorg86 Guru


Joined: 20 May 2011 Posts: 325
|
Posted: Mon May 23, 2016 8:47 pm Post subject: |
|
|
Quote: | Do you mean to open Firefox from console with this command: "firefox -P" (Need to add name of profile?)
or by choosing "New Private Window" from Firefox's Menu? |
Yes from console. Create a new profile and try it out. If the problem persists you can select your old profile again with that parameter (it is a capital P). You don't need to add anything else after the parameter, an extra window will open where you can manage your profiles. |
|
Back to top |
|
 |
Syl20 l33t


Joined: 04 Aug 2005 Posts: 621 Location: France
|
Posted: Tue May 24, 2016 8:22 am Post subject: |
|
|
You can deactivate all the extensions by running
Quote: | # firefox -safe-mode |
If the slowness problems are solved, try to activate your extensions one by one, until the problem reappears.
You should consider replacing Adblock plus (and, potentially, Ghostery) by uBlock Origin, which is much lighter, and doesn't belong to a private compagny. |
|
Back to top |
|
 |
lost+found Guru


Joined: 15 Nov 2004 Posts: 512 Location: North~Sea~Coa~s~~t~~~
|
Posted: Tue May 24, 2016 10:17 am Post subject: |
|
|
As a general speed improvement, you could keep cache files on tmpfs. The mozilla cache is normally under ~/.cache
I export this at login, and /tmp is tmpfs:
Code: | $ export XDG_CACHE_HOME="/tmp/.cache-$USER" |
|
|
Back to top |
|
 |
pmam Veteran

Joined: 30 Dec 2013 Posts: 1145
|
Posted: Wed May 25, 2016 6:44 am Post subject: |
|
|
Syl20,
I see there is no Add-ons at all in my Firefox - Maybe it is one reason for this slowness -
Do you recommend to add uBlock Origin?
In Extensions I just have IamTranslator, and in Plugins: OpenH264, Shockwave Flash.
lost+found,
In order to keep cache files on tmpfs permenantly - as you recommend - I just need to hit this command, while I am login in my Home/User?
Code: | $ export XDG_CACHE_HOME="/tmp/.cache-$USER" |
EDIT: Need to add any line to fstab? Where tmpfs located?
Thanks _________________ “You can take our property, our sweet homes, even our cloths...
But don't touch the streets, Ah, That's NO, NO, NO!
The streets are our @world's compilable kernel ...” |
|
Back to top |
|
 |
lost+found Guru


Joined: 15 Nov 2004 Posts: 512 Location: North~Sea~Coa~s~~t~~~
|
Posted: Wed May 25, 2016 7:14 am Post subject: |
|
|
pmam wrote: | In order to keep cache files on tmpfs permenantly - as you recommend - I just need to hit this command, while I am login in my Home/User?
Code: | $ export XDG_CACHE_HOME="/tmp/.cache-$USER" |
|
Yes, but instead of executing it manually, I've put it in ~/.bashrc and into my login manager's config file (wdm). If it's exported in a subshell, then Firefox needs to be started from that subshell too (not so handy).
Not sure if /tmp is tmpfs by default: 'cat /proc/mounts' should list at least /dev/shm, which could be used. Tmpfs itself is of course not persistent after reboot, and XDG_CACHE_HOME is used by some other programs as well (gstreamer, cantata...).
Last edited by lost+found on Wed May 25, 2016 7:42 am; edited 1 time in total |
|
Back to top |
|
 |
pmam Veteran

Joined: 30 Dec 2013 Posts: 1145
|
Posted: Wed May 25, 2016 7:39 am Post subject: |
|
|
lost+found,
I will try to see how to add this command to ~/.bashrc and into my login manager's config file (wdm).
Here my cat /proc/mounts:
Code: | cat /proc/mounts
/dev/sda4 / ext4 rw,noatime,data=ordered 0 0
proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
tmpfs /run tmpfs rw,nodev,relatime,size=304392k,mode=755 0 0
dev /dev devtmpfs rw,nosuid,relatime,size=10240k,nr_inodes=380052,mode=755 0 0
mqueue /dev/mqueue mqueue rw,nosuid,nodev,noexec,relatime 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620 0 0
shm /dev/shm tmpfs rw,nosuid,nodev,noexec,relatime 0 0
sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
debugfs /sys/kernel/debug debugfs rw,nosuid,nodev,noexec,relatime 0 0
fusectl /sys/fs/fuse/connections fusectl rw,nosuid,nodev,noexec,relatime 0 0
selinuxfs /sys/fs/selinux selinuxfs rw,relatime 0 0
cgroup_root /sys/fs/cgroup tmpfs rw,nosuid,nodev,noexec,relatime,size=10240k,mode=755 0 0
openrc /sys/fs/cgroup/openrc cgroup rw,nosuid,nodev,noexec,relatime,release_agent=/lib64/rc/sh/cgroup-release-agent.sh,name=openrc 0 0
cpuset /sys/fs/cgroup/cpuset cgroup rw,nosuid,nodev,noexec,relatime,cpuset 0 0
cpu /sys/fs/cgroup/cpu cgroup rw,nosuid,nodev,noexec,relatime,cpu 0 0
cpuacct /sys/fs/cgroup/cpuacct cgroup rw,nosuid,nodev,noexec,relatime,cpuacct 0 0
freezer /sys/fs/cgroup/freezer cgroup rw,nosuid,nodev,noexec,relatime,freezer 0 0
net_cls /sys/fs/cgroup/net_cls cgroup rw,nosuid,nodev,noexec,relatime,net_cls 0 0
net_prio /sys/fs/cgroup/net_prio cgroup rw,nosuid,nodev,noexec,relatime,net_prio 0 0
/dev/sda2 /boot ext4 rw,noatime,data=ordered 0 0
binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw,nosuid,nodev,noexec,relatime 0 0
rpc_pipefs /var/lib/nfs/rpc_pipefs rpc_pipefs rw,relatime 0 0
nfsd /proc/fs/nfsd nfsd rw,nosuid,nodev,noexec,relatime 0 0
/etc/autofs/auto.misc /mnt/auto autofs rw,relatime,fd=6,pgrp=2423,timeout=15,minproto=5,maxproto=5,indirect 0 0
none /run/user/1000 tmpfs rw,relatime,mode=700,uid=1000 0 0 |
Thanks _________________ “You can take our property, our sweet homes, even our cloths...
But don't touch the streets, Ah, That's NO, NO, NO!
The streets are our @world's compilable kernel ...” |
|
Back to top |
|
 |
lost+found Guru


Joined: 15 Nov 2004 Posts: 512 Location: North~Sea~Coa~s~~t~~~
|
Posted: Wed May 25, 2016 7:58 am Post subject: |
|
|
(Added the subshell sentence in previous post.)
This should work as a one time test in a terminal window:
Code: | $ export XDG_CACHE_HOME="/dev/shm/.cache-$USER"
$ firefox &>/dev/null & |
I would not recommend using wdm (although I like it; it's unmaintained software). Exporting env. variables in login managers can be difficult. |
|
Back to top |
|
 |
pmam Veteran

Joined: 30 Dec 2013 Posts: 1145
|
Posted: Wed May 25, 2016 9:26 am Post subject: |
|
|
I tried this testing and it is working - how can check if really cache files on tmpfs?
Code: | $ export XDG_CACHE_HOME="/dev/shm/.cache-$USER"
$ firefox &>/dev/null & |
I am using xdm - so in /etc/conf.d/xdm have:
Code: | DISPLAYMANAGER="lxdm" |
Please inform if need to add something to /etc/conf.d/xdm or just add this line to ~/.bashrc:
Code: | export XDG_CACHE_HOME="/dev/shm/.cache-$USER" |
Also - In order to block Ads - Do you recommend to add uBlock Origin?
Thanks _________________ “You can take our property, our sweet homes, even our cloths...
But don't touch the streets, Ah, That's NO, NO, NO!
The streets are our @world's compilable kernel ...” |
|
Back to top |
|
 |
lost+found Guru


Joined: 15 Nov 2004 Posts: 512 Location: North~Sea~Coa~s~~t~~~
|
Posted: Wed May 25, 2016 10:40 am Post subject: |
|
|
The 'mozilla' directory is now under /dev/shm/.cache-$USER. You should see file changes there while browsing, and not under ~/.cache anymore.
As tmpfs is a fast filesystem in RAM, you might want to reduce cache size under SeaMonkey/Firefox settings.
I don't know anything of lxdm and how to configure it. An alternative is exporting env. variables systemwide under /etc/env.d. We have a wiki on that. Exporting in ~/.bashrc is useful when loging in on the commandline, but not needed if the env. variable is set systemwide.
I'm using the /etc/hosts file for ad blocking. Works pretty well, without installing add-ons. |
|
Back to top |
|
 |
pmam Veteran

Joined: 30 Dec 2013 Posts: 1145
|
Posted: Wed May 25, 2016 11:41 am Post subject: |
|
|
OK - Now I almost figure out how implement your tips, however, still have some issues (First time to deal with global var...):
According your wiki's env link I created a new file called: /etc/env.d/80firefox and put in:
Code: | export XDG_CACHE_HOME="/dev/shm/.cache-$USER"
Then: env-update && source /etc/profile |
Looks it is ok - I see 'mozilla' directory under /dev/shm/.cache-$USER.
I see that all applications will use this tmpfs cash, not only firefox - right? No problem - just to know...
Quote: | As tmpfs is a fast filesystem in RAM, you might want to reduce cache size under SeaMonkey/Firefox settings. |
I do not find where to set this cache size? Please advise.
Thanks _________________ “You can take our property, our sweet homes, even our cloths...
But don't touch the streets, Ah, That's NO, NO, NO!
The streets are our @world's compilable kernel ...” |
|
Back to top |
|
 |
lost+found Guru


Joined: 15 Nov 2004 Posts: 512 Location: North~Sea~Coa~s~~t~~~
|
Posted: Wed May 25, 2016 12:02 pm Post subject: |
|
|
/etc/env.d/80firefox will be replaced when upgrading. I would make a new separate file like /etc/env.d/99mystuff, and just XDG_CACHE_HOME="/dev/shm/.cache-$USER" in it, without export. I'm not sure "$USER" will work right this way, but if you use your real login name instead, then it doesn't work for another user due to file permissions on the cache directory. (Maybe that was the reason I'm setting it on login manager level.) Anyone's got a better idea?
Yes, XDG_CACHE_HOME is used by more programs.
SeaMonkey: Edit -> Preferences -> Advanced -> Cache
Firefox: Alt (for the menubar), Edit -> Preferences -> Advanced -> Network |
|
Back to top |
|
 |
pmam Veteran

Joined: 30 Dec 2013 Posts: 1145
|
Posted: Wed May 25, 2016 1:01 pm Post subject: |
|
|
lost+found,
I replaced to /etc/env.d/99mystuff (99 tells portage to keep on upgrading?)
and put in: XDG_CACHE_HOME="/dev/shm/.cache-$USER" then run env-update && source /etc/profile.
After reboot and opening Seamonkey I see 'mozilla' directory under /dev/shm/.cache-$USER -
Hope it is ok - I put "$USER" - not my real login name. BTW: It was ok also with export...
I set 240MB cache for Seamonkey and Firefox - Hope it is enough -
I have only 2GB RAM (my smartphone has more...)
Thanks a lot  _________________ “You can take our property, our sweet homes, even our cloths...
But don't touch the streets, Ah, That's NO, NO, NO!
The streets are our @world's compilable kernel ...” |
|
Back to top |
|
 |
lost+found Guru


Joined: 15 Nov 2004 Posts: 512 Location: North~Sea~Coa~s~~t~~~
|
Posted: Wed May 25, 2016 3:13 pm Post subject: |
|
|
99 means it will be executed last, which should be fine.
The $USER thing in env.d was not a well thought idea from me. Although it works for now, I'm still curious if someone knows a better way to export user variables.
240MB is still plenty, if your internet connection is fast.
Cheers! |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|