Firefox Stutter / Lag - SSD Light on

Discussion in 'Linux' started by bob535, Sep 15, 2008.

  1. bob535

    bob535

    Joined:
    Sep 15, 2008
    Messages:
    9
    Likes Received:
    0
    Anyone else having issues with firefox stuttering/lagging? When doing so, the SSD HD light is always on, and the system is fine again when it goes off.

    I tried reducing the cache to 0MB, but that doesn't seem to have helped.

    Oh, in addition, I do have the fast SSD, but only 512mb of ram.
     
    bob535, Sep 15, 2008
    #1
  2. bob535

    macles

    Joined:
    Jul 22, 2008
    Messages:
    198
    Likes Received:
    0
    It's not an easy problem to solve, you can read this for a start.
     
    macles, Sep 15, 2008
    #2
  3. bob535

    bob535

    Joined:
    Sep 15, 2008
    Messages:
    9
    Likes Received:
    0
    That appears to be related to linpus, afaik ubuntu does not use yum.
    Please correct me if i'm wrong.
     
    bob535, Sep 15, 2008
    #3
  4. bob535

    axcairns

    Joined:
    Aug 8, 2008
    Messages:
    92
    Likes Received:
    0
    I run the 'disk' cache on a ramdisk (I have 1.5GB mem)
     
    axcairns, Sep 16, 2008
    #4
  5. bob535

    daymz

    Joined:
    Jul 28, 2008
    Messages:
    44
    Likes Received:
    0
    Location:
    Montreal, QC, Canada
    Try disabling malware and phishing protection off (about:config) if using FF3. I can't remember the exact settings string names, so may be do a serach on google for the exact strings, should be very easy to find.
     
    daymz, Sep 16, 2008
    #5
  6. bob535

    jbernardo

    Joined:
    Aug 17, 2008
    Messages:
    45
    Likes Received:
    0
    I was running Intrepid on the AA1 on a external usb drive. Yesterday I decided to install on the SSD, and now firefox is atrociously slow. I've tried the usual stuff - pointing the cache to /tmp (mounted as tmpfs), disabling phishing and malware detection, etc. Still no luck, it just hangs 2-3 seconds at a time, with the ssd light on, almost every minute. This didn't happen on the external usb hdd, so I assume it is sdd related.
    Any other ideas? I have /tmp, /var/log, and /var/tmp as tmpfs:
    Code:
    tmpfs      /var/log/apt    tmpfs        defaults,noatime           0    0
    tmpfs      /var/log        tmpfs        defaults,noatime           0    0
    tmpfs      /tmp            tmpfs        defaults,noatime,mode=1777           0    0
    tmpfs      /var/tmp        tmpfs        defaults,noatime           0    0
    
    My 1.5GB ram isn't full:
    Code:
    free
                 total       used       free     shared    buffers     cached
    Mem:       1544404    1066204     478200          0     265372     332640
    -/+ buffers/cache:     468192    1076212
    Swap:            0          0          0
    
    I have swap disabled to reduce wear and tear on the ssd and to try to improve speed. Now, what else can I do to have firefox responding as it did on hdd?
     
    jbernardo, Sep 18, 2008
    #6
  7. bob535

    macles

    Joined:
    Jul 22, 2008
    Messages:
    198
    Likes Received:
    0
    That's true but the other things still apply.
     
    macles, Sep 18, 2008
    #7
  8. bob535

    Hultan

    Joined:
    Aug 12, 2008
    Messages:
    8
    Likes Received:
    0
    Location:
    Bengtsfors, Sweden
    I had the same problems and tried a bunch of tips without success, so I simply installed FF2 instead.
     
    Hultan, Sep 18, 2008
    #8
  9. bob535

    teewee

    Joined:
    Sep 2, 2008
    Messages:
    7
    Likes Received:
    0
    Location:
    Lyon, France
    i did have the same problem, with Fx 3 or Fx 2...

    the only good way to resolve this bug is to use Opera... If someone finds any other way to solve this, please share ;)
     
    teewee, Sep 18, 2008
    #9
  10. bob535

    janss

    Joined:
    Jul 23, 2008
    Messages:
    220
    Likes Received:
    0
    I did the following steps to get my Firefox 3 to work smoothly.

    Go to Ff's cong by typing about:config on the address bar

    set network.prefetch-next to false
    set browser.cache.disk.capacity to 0
    set browser.cache.disk.enable to false
    set browser.cache.offline.capacity to 0
    set browser.cache.offline.enable to false

    Make sure browser.cache.memory.enable is set to true.

    When you've made all those fixes, Ff's disk usage is minimal and it almost never accesses the SSD. Browser cache is in the memory (as in RAM) and it does not use disk cache (SSD) at all. Disabling the network.prefetch will decrease Ff's bandwidth usage and makes the browser only load the links you actually click.

    And on a sidenote, I'm using Xubuntu, not the stock Linpus, so I can't say if those modifications will affect Linpus or will they be reversed on next update or something.
     
    janss, Sep 18, 2008
    #10
  11. bob535

    jbernardo

    Joined:
    Aug 17, 2008
    Messages:
    45
    Likes Received:
    0
    I did that, and the responsiveness is much improved. Infortunately, I still have lots of frequent SSD accesses (1 every 4-5 seconds). I removed update-motd and everything landscape related, and things improved a lot, but are still not perfect. When writing something, I have to disable the dictionary and even then it lags and lags.
     
    jbernardo, Sep 19, 2008
    #11
  12. bob535

    jango

    Joined:
    Aug 2, 2008
    Messages:
    307
    Likes Received:
    0
    I only see one solution.... OPERA is very, very fast :D
     
    jango, Sep 19, 2008
    #12
  13. bob535

    macles

    Joined:
    Jul 22, 2008
    Messages:
    198
    Likes Received:
    0
    I have no lag at all, see the link i posted. It's a bit tedious to set up but ultimately worth it. Try shrinking the sqlite files first.
     
    macles, Sep 19, 2008
    #13
  14. bob535

    jbernardo

    Joined:
    Aug 17, 2008
    Messages:
    45
    Likes Received:
    0
    Shirinking the sqlite files helped a little, but there is still a lag.

    The link you posted is for linpus, not for ubuntu. Ubuntu doesn't use yum, so doesn't have the conflict problems with sqlite.
    I am using your dmesg loop to try to understand what is going on with the disk writes, and it seems it is firefox, doing writes.
     
    jbernardo, Sep 19, 2008
    #14
  15. bob535

    jbernardo

    Joined:
    Aug 17, 2008
    Messages:
    45
    Likes Received:
    0
    And after three days, it seems that shrinking the sqlite databases does indeed fix most of the lag, it is still present but now it is in the order of the 10ths of a second, instead of the 4-5 seconds I had before. What I did, copied from macles blog, is the following:

    Code:
    sudo -s
    find $HOME -name \*sqlite -exec sqlite3 {} 'VACUUM;' \;
     
    jbernardo, Sep 22, 2008
    #15
  16. bob535

    bob535

    Joined:
    Sep 15, 2008
    Messages:
    9
    Likes Received:
    0
    I couldn't get the sqlite shrinking to work, errors ranging from access denied, to being unable to locate files.
    Tried running in various forms of sudo -s, sudo, etc.

    Anyways, Reducing your history keep time to only a few days, and turning off the two "remember" options seems to help a little bit. Still problems, but slightly reduced delays.
     
    bob535, Sep 22, 2008
    #16
  17. bob535

    jbernardo

    Joined:
    Aug 17, 2008
    Messages:
    45
    Likes Received:
    0
    Did you try copy/paste directly the two lines I posted above? That worked for me.
     
    jbernardo, Sep 22, 2008
    #17
  18. bob535

    bob535

    Joined:
    Sep 15, 2008
    Messages:
    9
    Likes Received:
    0
    I get the following response from direct copying

    chris@AspireOne:~$ sudo -s
    [sudo] password for chris:
    root@AspireOne:~# find $HOME -name \*sqlite -exec sqlite3 {} 'VACUUM;' \;
    find: /home/chris/.gvfs: Permission denied

    I made sure to close firefox before executing this command.
     
    bob535, Sep 23, 2008
    #18
  19. bob535

    jbernardo

    Joined:
    Aug 17, 2008
    Messages:
    45
    Likes Received:
    0
    I don't have any .gvfs dir, maybe because I am running KDE 4.1 and it probably is created by gnome, but I don't think that dir would have any of the firefox sqlite databases. To make sure they are being found and optimized, you could use this command instead:
    Code:
    find $HOME -name \*sqlite -print -exec sqlite3 {} 'VACUUM;' \;
    Notice the extra "-print", it will show you which databases it found and optimized.
     
    jbernardo, Sep 23, 2008
    #19
  20. bob535

    bob535

    Joined:
    Sep 15, 2008
    Messages:
    9
    Likes Received:
    0
    That worked, thanks
     
    bob535, Sep 24, 2008
    #20
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.