Browsers Slowing CentOS 7 Installation To A Crawl

Home » CentOS » Browsers Slowing CentOS 7 Installation To A Crawl
CentOS 36 Comments

My video problems mentioned in a previous thread are gone, though I do not know why.

Now my problem is that whenever I have a browser open and an internet connection, my CentOS 7 slows to a crawl. Chromium seems to be the least bad. Sometimes it slows to the point that I cannot even move the mouse. Even switching between virtual terminals takes a while sometimes. When I get there, top generally shows me between two and five D states. I’ve changed service providers lately. The problem survived the change. Some sites seem to aggravate the problem. Most recently, a site tried to connect to c.amazon.adsystem.com . I got the message waiting for c.amazon.adsystem.com . I have that address in my hosts file as 127.0.0.1 . ping finds it and pings. nslookup does not:

Whether the slow-to-crawl problem is related to the failure to redirect, I do not know. The former is clearly more important. Any suggestions on how to diagnose it?
Any ideas on why chromium is waiting for c.amazon.adsystem.com and how I can fix it?

36 thoughts on - Browsers Slowing CentOS 7 Installation To A Crawl

  • What happens if you try downloading a large file with wget?

    What happens if you try browsing some websites with elinks?

  • I’ll try it. My expectation is that it will work just fine *once it starts*. That is my experience with downloading using a browser. In the case of wget, the issue will be typinng the command. Suggestion for a file? A CentOS iso perhaps?
    I’d look for it with a browser, but it might take a while.

    What is an elink?

    To handle my CentOS mail, I SSH to the server with my mail and run alpine as the ordinary user that I am. ssh is running from virtual teminal 2
    while virtual terminal 1 is crawling.

  • This, with your earlier complaints about resolving Amazon ad service DNS, makes me think it’s DNS-related.

    Are you using your ISP’s DNS servers? Are all of them correct? You mentioned you changed ISPs recently, did you switch to the new ISP’s DNS? What happens if you set your DNS to the Quad9[1] DNS server, 9.9.9.9?

    1. https://www.quad9.net/


    Jonathan Billings

  • elinks does not seem to be working for me. I typed in google.com as my first url. There seems to be no way out of google, nor any way further in. No place to type a url. What appears to be the search window is black and does not accept input. Oops. Now I seem to have clicked on google help or something. There seems no way to back up. Ok. Found the left arrow. Still no way to search or to get out of google (except quit).

    How do I adjust my DNS?
    As noted, my problem has survived a change in ISPs, but they could both be wrong.

  • Found g.

    I’m finding elinks hard to navigate, but at least it’s not slowing stuff to a crawl either.

  • Might have written too soon. elinks is starting to slow down, e.g. down arrow sometimes takes a full minute to respond.

  • your DNS settings are in /etc/resolv.conf, just like every other unix system since forever.

  • Are you sure you don’t have other processes or users running on the system? It only happens when you have a network connection? It might also be swapping heavily, check to see how much RAM you have. Check the output of ‘free’.

    Look at the syslogs/journal when you’re logged in (in a terminal, run ’sudo journalctl -xfl’). You will see a lot of stuff printed, but it might give you an idea of what’s going on.


    Jonathan Billings

  • Pretty sure. I rebooted this morning.

    top – 17:32:20 up 15:47, 6 users, load average: 1.12, 2.55, 1.56
    Tasks: 238 total, 3 running, 235 sleeping, 0 stopped, 0 zombie
    %Cpu(s): 21.5 us, 3.5 sy, 0.0 ni, 74.1 id, 0.8 wa, 0.0 hi, 0.0 si, 0.0 st KiB Mem : 2020144 total, 80436 free, 1416824 used, 522884 buff/cache KiB Swap: 4883724 total, 3887864 free, 995860 used. 149092 avail Mem

    PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
    27121 hennebry 20 0 1636444 218240 49920 R 29.2 10.8 1:31.01 chromium-b+
    27132 hennebry 20 0 1673932 213652 55576 S 7.3 10.6 1:01.19 chromium-b+
    26614 hennebry 20 0 1871712 104840 41084 S 3.7 5.2 0:26.78 chromium-b+
    27186 hennebry 20 0 1495336 109988 47176 S 3.3 5.4 0:16.55 chromium-b+
    27423 hennebry 20 0 1431484 87076 45928 S 2.3 4.3 0:08.33 chromium-b+
    26647 hennebry 20 0 2685156 188444 27308 S 1.0 9.3 2:19.84 chromium-b+
    5962 hennebry 20 0 3617336 111096 19404 S 0.7 5.5 2:25.24 gnome-shell
    27174 hennebry 20 0 1481508 114332 48276 S 0.7 5.7 0:07.88 chromium-b+
    27257 hennebry 20 0 1439148 96572 52020 S 0.7 4.8 0:05.98 chromium-b+
    3483 root 20 0 374444 20432 13732 S 0.3 1.0 0:42.88 X
    23824 hennebry 20 0 753956 18272 6488 S 0.3 0.9 0:13.63 gnome-term+
    1 root 20 0 128404 4376 2484 S 0.0 0.2 0:07.65 systemd

    Usually when I’m having trouble, there are at least two D’s. Of course, ’tain’t as crawly as it often gets.

    Mem: 2020144 1454904 76140 204764 489100 135004
    Swap: 4883724 978480 3905244

    I think this qualifies as interesting. I have rather a lot of it:
    Aug 04 17:28:20 localhost.localdomain chromium-browser.desktop[26614]: [26647:26728:0804/172820.614816:ERROR:latency_info.cc(149)] Surface::TakeLatencyInfoFromFrame, LatencyInfo vector size 102 is too big.

    I found it with google, but all the entries froze chromium.

  • Much to my surprise, I found this:
    # Generated by NetworkManager search midcoip.net nameserver 192.168.0.1
    nameserver 2001:48f8:3004:2ce:5a19:f8ff:fe9e:a4bc

    I doubt it’s the source of my problems, but the second line looks like something midco did to me somehow. I have noticed a midco search when I wasn’t expecting one. My problems predate midco.

  • Something I just remembered because I saw it again:
    When I start chromium, I keep getting pop-ups to enter the password to unlock my login keyring. Me no have keyring, except the metal things in my pockets.

  • Infected Chromium apps are all over the place now. They auto-install and make themselves preferred browsers that auto-start after reboots.

    Very bad.

    Cheers, Bee

  • Sounds like you need to go through your packages and uninstall everything not essential!!!

    Jay

  • I expect that that is in the box with midco’s router. Do not know about the ipv6 address. I was about to show to what I had changed resolv.conf, but something changed it back. Grrrr. I know I didn’t just forget to save it:
    I tested it with nslookup:

    Here is the current resolv.conf:

    When I point elinks at 192.168.0.1
    I get http://192.168.0.1/login.php above a big blank window.

  • So you need to modify the source file that NetworkManager is using. somewhere in /etc/network or /etc/networking-scripts, a config file has DNS02.168.0.1 or sokmething, or your system is getting that from DHCP

    the web login on 192.168.0.1 is undoubtably your modem/router.

  • free -h is generally more readable, but…

    It’s RAM. You basically have a total of 2G ram on the system, you have less than 500M available and are into swap by nearly 1G, so you’re swapping heavily. 2G is enough for a minimal install but browsers such as firefox and chrome can easily use a lot of memory fast and trying to run one on a 2G system while doing an install at the same time will get you swapping and slow the system to a crawl.

    Peter

  • Agreed, 2G of RAM for graphical logins and web browsers is not nearly enough. I was using 4G on a system running C7 and it was unusable, I can’t imagine 2G.


    Jonathan Billings

  • To be clear, by “CentOS 7 installation”, I meant a PC on which CentOS 7 was installed.

    In any case, CentOS 7 has not always been this slow. Presumably something has changed. I’ve been living with this for several months, but not forever. I can run compilers and stuff without an internet connection, so I could get some work done.

    To get that output, I had free running in a loop and waited for the freeze before copy and pasting.

    I wasn’t surprised by the result. Occasionally top shows kswap0 (I think) in a D state.


    Michael hennebry@web.cs.ndsu.NoDak.edu
    “Sorry but your password must contain an uppercase letter, a number, a haiku, a gang sign, a heiroglyph, and the blood of a virgin.”
    — someeecards

  • Does the system slow down when you have your internet connection enabled, but aren’t explicitly using it (i.e., not using a browser)?
    If so, look at the netstat output (as root) to see what’s going on. You may have some process that runs when the connection is enabled that is taking up system/network resources.

    Separately, turn off javascript in the browser you are using and see if that has an effect.

    – Richard

  • Websites have gotten more resource-intensive. You’ve run “yum updates”
    and now have a newer version of Firefox and/or Chrome. Your browsing habits have changed and you browse with more tabs open now.

    Firefox for me has always had some amount of RAM leakage and when I used to run with 4G of RAM I had to restart it frequently (but I browse with a lot of tabs open). I currently have my system maxed at 8G and still have to restart FF every couple of days or so to stop the system from swapping. 2G wouldn’t even give me enough RAM to not run a browser on my system, so I can only imagine that your usage to date has been extremely simple.

    I have two suggestions for you:

    1. Run a lightweight desktop such as XFCE instead of Gnome or KDE.

    2. Run out and buy more RAM. Max your system out at 4G or 8G or whatever it will take. You will need it and appreciate it.

    Good Luck,

    Peter

  • This will cause almost complete breakage of an increasing number of modern websites. The vast majority of sites nowadays absolutely rely on JS and will not run or display correctly without it.

    Peter

  • Richard wrote:

    Right… but it also prevents the site’s javascript from loading 15 other pages, including doubleclick, or gigya (really?) or adserver….

    mark

  • Peter wrote:

    Horse hockey. I read a lot of news, and other stuff. Lessee, slashdot, I
    enable itself, and fsdn, I think it is, and I’m fine. WaPo is fine.

    Just pick and choose. I will admit to being aggravated since google
    *requires* gstatic to be enabled – I assume that’s where they’re tracking me.

    mark

  • Firefox especially, and to some extent Chrome, have both started using much more memory recently (as in the last six months or so). I run 50+
    desktops on CentOS and I’ve noticed more and more of them getting low on memory more often and almost always Firefox is the culprit. These are systems with 8Gb that are struggling.

    P.

  • The slowdown only happens when the browser is open, but I do not have to be using it.

  • More bloated browsers are not hard to believe in. My habits haven’t change much, though. Mostly I use a browser for things I want to read and things I want to download. Maybe that is why I’d been getting along with 2GB.

    I’ll try it.

    Maybe. I open the case with fear and trepidation. The first time I opened a PC case, I zapped my video card installing a disk drive. Under the impressing that memory was the most ststic-sensitive thing in a PC, I had a friend install the DDR2 memory I’d bought.
    ‘Twas frightening to watch: like wathing The Cat in the Hat play with one’s grandmother’s favorite china. So far as I could tell, he totally ignored the possbility that static could do bad things. It worked and I did not have a heart attack.

    Also, what is it with DDR2 prices?
    When I bought DDR2, DDR3 was the norm and I paid hundreds of dollars for DDR2. Do not remember for how much. Now I suspect DDR4 is the norm and am seeing 8GB of DDR2 for less than $30. Huh? DDR3 isn’t much more.

    I’ll need to do some digging to discover whether my box needs DDR2 or DDR3.DDR3
    I doubt it’s DDR4.

  • In article , Michael Hennebry wrote:

    Do:

    # dmidecode | less

    and look for the entries for the existing RAM you have. It will also tell you if you have any unpopulated RAM slots (“No module installed”).

    It won’t tell you the maximum size RAM each slot will take. For that, you would need to look up the specs for the motherboard or system (you can find the model number in the dmidecode output too).

    Or you can go to the website for a memory vendor such as Crucial or Kingston and enter your model number, and it will tell you what RAM is compatible and what it costs.

    Cheers Tony

  • In the mean time you could enable zswap[1] to make the most out of the ram and swap you do have. according to [2] either add ‘zswap.enabled=1’ to the boot line or ‘echo 1 > /sys/module/zswap/parameters/enabled’

    On an EL6 system with 512M of ram (yes that is correct, .5GB, actually ~.4GB because some is shared with the intel video) I use up-to-date EL6 firefox reasonably comfortably at home using zswap, setting max_pool_percent to 40.

    I am trying to remember which kernel 7 is running (I tend to use the elrepo LT kernel on EL6) and if it has zswap or only zram.

    before switching to the LT kernel I used zram [3] on the machine as swap space (pretending to be 90% of ram) instead and it works very fast, but when it runs out (say on a site with lots of JPGs) and you hit real swap again performance tanks VERY badly. EL7 may have zram setup to swap in such a way that you can ‘sysctl start zram’ and try it out.

    Good luck.

    [1] https://en.wikipedia.org/wiki/Zswap
    [2] https://www.kernel.org/doc/html/latest/vm/zswap.html
    [3] https://en.wikipedia.org/wiki/Zram

  • My fears and trepidations have been realized.

    I finally got around to trying to install the memory I bought. No go. The first card seems like it’s in almost ok, but will not go far enough down to be latched. The notches seem correct. I cannot even replace the memory I removed. Grrr. The net result seem to be that I destroyed my computer.

    Any thoughts on how to undestroy my computer?

  • There might be dirt plugging up the slot. Try vacuuming the slot out (carefully) and see if it fits after that.

  • The process gave me a better look at the mechanics of latching. Apparently the latches are supposed to activate as one pushes the cards down. Pushing in the middle did not give me enough leverage to activate stiff latches. Once I realized that, pushing on the ends did the trick

    It boots and notices 8GB.