Safari memory usage question

Discussion in 'Mac Apps and Mac App Store' started by nope7308, Aug 2, 2010.

  1. nope7308 macrumors 65816


    Oct 6, 2008
    Ontario, Canada
    I installed the latest Safari update, but I'm still experiencing performance issues. I just checked the activity monitor and it says that Safari is using over 800MB of 'real memory' and about 600MB of 'virtual memory', even though I only have two tabs open (both of which are text only).

    These numbers do not seem normal compared to other running processes. I suspect that the memory usage has jumped due to previous browsing sessions, but would correct itself with a full quit/relaunch.

    Can someone please tell me if these numbers are normal and, if not, what might be causing them? Is there anyway to prevent Safari from having this sort of performance issue (if it is one)?


    P.S. I have one extension installed (Ad-Block).
  2. GGJstudios macrumors Westmere


    May 16, 2008
    Safari uses a lot of memory. The amount depends more on the content of the pages you're viewing than how many tabs you have open.
  3. nope7308 thread starter macrumors 65816


    Oct 6, 2008
    Ontario, Canada
    Content isn't really demanding. I was just reading an article with one picture (no embedded video). Is the memory usage cumulative? That is, does it compile over the course of my browsing session?

    Is there any way to reduce the amount of memory that Safari uses? At present Firefox 3.6.6 (or whatever the latest version is) is considerably faster when browsing (but much slower at startup).
  4. Corrosive vinyl macrumors 6502

    Corrosive vinyl

    Sep 22, 2006
    I think that it is cumulative. Reset Safari by going to Safari>Reset Safari and then quit and restart it. You will see a great deal of both HDD space and RAM magically come back.
  5. nope7308 thread starter macrumors 65816


    Oct 6, 2008
    Ontario, Canada
    Before I do that, two quick questions:
    1) What does 'Reset Safari' actually do? It won't erase any preferences, will it?
    2) Is there any way to avoid doing this in the future? It seems immensely counterproductive to have to continually restart Safari due to normal browsing.

    Argh, the more I use Safari 5, the more I miss Firefox... perhaps I should switch back (I still find Firefox to be faster for browsing).
  6. macpro2000 macrumors 6502a

    Apr 20, 2005
    It won't delete your prefs. Best way is to restart your computer say once a week and clean out any memory leaks.
  7. Catfish_Man macrumors 68030


    Sep 13, 2001
    Portland, OR
    Safari shouldn't be hitting 800MB real memory on small amounts of regular content. If you can figure out concrete steps to reproduce the issue, please let me know and I'll go ask the webkit developers about it :)
  8. seleneS macrumors member

    Jul 28, 2010
    My safari normally uses 300-400Mb of real memory and 1.2-1.5Gb of virtual memory. Right now I have two tabs of macrumors forum and it is 252Mb (real) and 1.53Gb (virtual). I do shut down the computer every night. Is this strange or normal safari memory usage?
  9. clevin macrumors G3


    Aug 6, 2006
    safari memory usage and management is tested to be bad. 300-400mb is quite normal.
  10. elill macrumors newbie

    Aug 10, 2010
    What surprised me was the low phys memory usage versus the high virtual memory usage - being an old Unix guy, virtual memory = badness.

    I had (operative word is "had") the same problem until I bought iDefrag for $29.95 & ran it.

    After the defrag safari performance is no comparison; things are peppy

    Here is my theory:

    (1) iDefrag reported the files with the greatest fragmentation were user unique safari files

    (2) It looks like on my 1 GB RAM G4 mini MacOS makes swap = 30 GB, and places several swap files on the disk with were fragmented as well.

    Although Apple would like us to believe that their extents-based filesystem is not prone to fragmentation, iDefrag found otherwise

    Being a Storage consultant by profession I really like the iDefrag product.
    It has an option to build a custom boot dvd which is pretty useful.
  11. mijail macrumors 6502a

    Oct 31, 2010

    Found this thread looking for possible solutions for Safari´s memory usage, and found this last load of crap. I'll try to fix it to avoid problems to unsuspecting newbies who come across it.

    Unixes have always used virtual memory - for good effect. That sounds more like some opinion from some "classic Mac OS" (pre-OS X) user. (Classic Mac OS had crappy and antiquated memory management; unlike OS X, which is much, much better)

    Any user minimally familiar with OS X knows that it doesn't have a fixed amout of swap; it grows and shrinks as needed. (and if you only have 1 GB RAM, I very much doubt the swapping can grow to anything close to 30 GB)

    Any filesystem is prone to fragmentation. Some filesystems/OSes try to minimize the effect. OS X in particular does on-the-fly defragmentation (and more) when it makes sense (see here)
    iDefrag defrags; but the effect of that is negligible for most people, and I guess that could be even counterproductive for some (since it will surely undo the more intelligent defragging that OS X does by itself). iDefrag is intended mostly as the first step for changing partition sizes with iPartition, from the same company.

    I would steer clear from any "consultant" like this one!!

    And going back to Safari´s memory: with latest WebKit (Safari's nightly builds) I am seeing the same kind of memory usage that has been reported here: 2 days, not particularly heavy usage (about 30 tabs), and virtual memory is around 2.7 GB, real 1.2 GB. Painful! vmmap reports that 2 GB are being used for "JS JIT generated code", so... maybe it is a conscious decision by the developers? I will try disabling all extensions, ... but am considering switching to Chrome, which at least reports lots of info about how is it using its memory...

Share This Page