Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

How to: Decrease memory usage in Safari for 30% and more

Hi guys!

Here is my personal tip on how to decrease the (sometimes enormous) amount of memory Safari eats on OS X Lion.


One of the reasons Safari eats so much memory is because it's running in 64-bit mode by default and that can be easily tweaked.


You can set Safari to run in 32-bit mode, thus it will be able to access up to 4 Gb of RAM - which is more than enough for daily use.


How to do that:


1) Open Applications folder in Finder, find Safari app


2) Right-click (or Ctrl-click) on Safari


3) Select Get Info from popup menu


4) Enable "Open in 32-bit mode" checkbox


5) That's not all, you'll also need to set the WebProcess app to run in 32-bit mode - that's a sandboxed application for Safari pages and is actually the main memory hog. Snow Leopard has WebProcess.app only on the latest versions of Safari.


6) Right-click Finder icon in Dock, select Go To Folder..


7) Copy and paste this string:

/System/Library/StagedFrameworks/Safari/WebKit2.framework/

- that's for Lion


(in Snow Leopard and Mountain Lion - /System/Library/PrivateFrameworks/WebKit2.framework/ )


8) In a new window find WebProcess.app and set it to run in 32-bit mode like you just did with Safari


9) That's all - now make sure that Safari and WebProcess are showing like "Intel" instead of "Intel 64 bit" in System Monitoring app.


The memory usage decreased in about 30% in my case, I didn't test it alot though! Good luck!

Posted on Jun 18, 2012 3:53 AM

Reply
12 replies

Jun 18, 2012 4:41 AM in response to DizzyDown

That's not exactly truth - on systems with 2 Gb and even 4 Gb of memory and Lion your webpages will eventually be sent to a swap file on your HDD, so the performance will be decreased. Or you claim that 2 Gb and 8 Gb system will work equally fast with many webpages opened because of "good memory management"?

Also Lion eventually tends to use all the avilable memory even on 16 Gb systems. I don't know whether it's called a good memory management. Maybe yes.

Jun 18, 2012 5:10 AM in response to DizzyDown

I am a retired webmaster and don't have Lion but I am impressed by your tip. Well written and researched. I think we should all do our bit to educate and encourage others to open applications and use the Terminal.


For some years I have tried to get younger family members to turn off tabs when they complain that browsing is slow on their recent laptops. Tabs consume a lot of memory and soon result in memory swapping which slows everything considerably.


Here is a slightly risky tip of mine which did not get the stick you are getting:

https://discussions.apple.com/thread/3001798?answerId=18629128022#18629128022

I have not yet noticed any unfortunate consequences so perhaps the warning was not necessary.

Jun 18, 2012 6:35 AM in response to Neville Hillyer

Hello Neville:


I seem to be coming off as negative - not my usual approach. However.......


I am a retired webmaster and don't have Lion but I am impressed by your tip. Well written and researched. I think we should all do our bit to educate and encourage others to open applications and use the Terminal.



a different point of view from someone who has been posting in these forums for many years.


Almost all of the people who seek help here are not:


1. Retired webmasters.


2. Know anything about the arcane terminal commands and, more importantly, how much damage they can cause their system by a missing space or character. Apple has spent a lot of time to develop OS X to a point where people do not need to learn about or understand Unix-like command language.


I salute people who are technical enough to use terminal commands. It is, however, IMHO, a real disservice to suggest to non-tecchie people that it is ever necessary (or desirable) to operate at that level.


Having said all that, I respect your comment and point of view. 😀 I would reiterate, however, that solving non-existent problems is a waste of time. By non-existent, I mean that if there are no performance problems, it is irrelevant how much memory a program uses. My current base-level iMac has 4 GB of memory and a Terabyte of HD space.


Barry


Message was edited by: Barry Hemphill

Jun 18, 2012 10:01 AM in response to Barry Hemphill

Barry, you did not read my tip at all. It's not a hack - 32-bit architecture is fully supported by Apple in OS X Lion as every app is compiled in both 32-bit and 64-bit versions. Even Adobe flash and other plugins are coming the same way. And it can be easily switched back if you don't like it. But surely it will free alot of memory when you have many tabs opened because it also automatically loads Adobe Flash in 32-bit mode.


Regarding newbies and housewifes - they will not be interested to follow this tip for sure.

Sep 18, 2013 7:55 AM in response to DizzyDown

Dizzy, I was having the same problem with Safari (6.0.5) consuming enormous amounts of system memory over time when browsing numerous pages. It would grow to 2GB+ on my 4GB iMac under Lion (10.7.5) and slow performance to a halt forcing me to quit Safari in order to reset the processes. (I hate the spinning wheel as much as I did the hour glass in Windows.) The Safari (PID 410) and Safari Web Content (PID 412) processes were the cuprits and your tip, when implemented, did just as you stated - it cut the memory consumption significantly. Thus far, it appears that memory management is considerably better now that those processes are in 32bit mode. I agree with you that this problem should not occur and that Apple needs to relook its mem mgt architecture with respect to Safari if not OS X in total. Thanks for your help!!

How to: Decrease memory usage in Safari for 30% and more

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.