Safari memory usage question

nope7308

macrumors 65816
Original poster
Oct 6, 2008
1,040
537
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)?

Thanks

P.S. I have one extension installed (Ad-Block).
 

GGJstudios

macrumors Westmere
May 16, 2008
44,419
768
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.
 

nope7308

macrumors 65816
Original poster
Oct 6, 2008
1,040
537
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).
 

Corrosive vinyl

macrumors 6502
Sep 22, 2006
473
0
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.
 

nope7308

macrumors 65816
Original poster
Oct 6, 2008
1,040
537
Ontario, Canada
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.
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).
 

macpro2000

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

Catfish_Man

macrumors 68030
Sep 13, 2001
2,579
1
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 :)
 

seleneS

macrumors member
Jul 28, 2010
37
0
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?
 

clevin

macrumors G3
Aug 6, 2006
9,095
1
safari memory usage and management is tested to be bad. 300-400mb is quite normal.
 

elill

macrumors newbie
Aug 10, 2010
1
0
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.
 

mijail

macrumors 6502a
Oct 31, 2010
547
125
Wtf??

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.

What surprised me was the low phys memory usage versus the high virtual memory usage - being an old Unix guy, virtual memory = badness.
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)

(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.
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)

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.
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...
 

Similar threads

  • brewmonkey
1
Replies
1
Views
291
  • priorytools
6
Replies
6
Views
445
Replies
2
Views
385
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.