An open community 
of Macintosh users,
for Macintosh users.

FineTunedMac Dashboard widget now available! Download Here

Page 1 of 2 1 2 >
Topic Options
#16798 - 08/02/11 03:37 PM Safari 5.1 Thrashing
tacit Offline


Registered: 08/03/09
Loc: Portland, Oregon, USA
I've been using Safari 5.1 for a while now, and for the most part I like it, except for a memory/swap management problem I've been seeing whenever I start to tax it.

Safari 5.1 separates the renderer from the rest of the browser, and runs the renderer in its own process, sandboxed from the computer. This is a security change; if someone discovers and exploits a bug in the renderer, it can't be used to do things like execute code or download files.

The problem seems to be in how Safari manages memory for the renderer. When I open a lot of windows or tabs (I will often have 40-50 sites open at a time) and when I'm low on memory (for example, running Photoshop and InDesign at the same time as Safari), my disk use will skyrocket and Safari will slow to a crawl. And when I say "slow to a crawl," I mean put one word on the screen, then put up the spinning beachball for 15-20 seconds, then draw another word, then put up the beachball again.

Looking at Activity Monitor when this happens shows that Safari and Safari Web Content (the renderer) keep trading spots for the top CPU usage. The number of pageouts skyrockets. It seems that what is happening is the system is swapping the renderer into memory, rendering a small part of the page, swapping the renderer out to disk and swapping Safari into memory, displaying what it's rendered, swapping Safari out to disk and the renderer into memory, rendering the next bit of the page, and so on.

Anyone else noticed this issue?
_________________________
Photo gallery, all about me, and more: www.xeromag.com/franklin.html

Top
#16804 - 08/02/11 06:50 PM Re: Safari 5.1 Thrashing [Re: tacit]
MicroMatTech3 Offline


Registered: 08/04/09
Tacit,

I have seen odd and unexpected beachballs in Safari since I upgraded to Lion, with as few as four pages open. One of the additional pages is often www.msnbc.com, which may require more memory than most pages.

I have Safari configured to log in automatically at the MicroMat Forums at launch, and iCab configured to log in to the FineTunedMac Forums at launch. If I open additional pages in each browser, using bookmarks common to both, the responses of the browers are markedly different.

Now that you have posted your observations, I will check Activity Monitor and see if my experience is the same as yours, making use of the Disk Activity tab to check pageouts. There is definitely some new problem here.

Top
#17534 - 09/21/11 08:18 PM Re: Safari 5.1 Thrashing [Re: MicroMatTech3]
tacit Offline


Registered: 08/03/09
Loc: Portland, Oregon, USA
And it gets more interesting.

There definitely appear to be some issues in the Safari separation of the application from the sandboxed Web renderer. I've seen the renderer thrash or lock up even in non-low-memory conditions.

And here's something even more interesting. Every now and then, when the renderer thrashes, all my Safari windows will go blank, then reload. I assume this is the renderer either quitting and being restarted, or crashing and being restarted.

Either way, when this happens, all session information is lost. Web sites that I was logged into, I'm suddenly no longer logged into. Forms that I had filled out vanish--aggravating when it happens while I'm in the middle of doing something.

The first couple of times it happened, I wrote it off as an aberration, but these days, when I have about 30 windows open (which I usually do), it happens about once a day.

Anyone else notice this?
_________________________
Photo gallery, all about me, and more: www.xeromag.com/franklin.html

Top
#17537 - 09/22/11 06:55 AM Re: Safari 5.1 Thrashing [Re: tacit]
joemikeb Online
Moderator

Registered: 08/04/09
Loc: Fort Worth, Texas
As far as I know I have not encountered the blank and reload problem you describe but I often encounter page/window freezes where Safari refuses to accept any new input of any kind. In fact that happened just now as I was typing this post. The only "fix" I have found is to quit and restart Safari. There are several long threads about this on Apple's Safari Discussion.

Other than that I like Safari 5.1.
_________________________
joemikeb • moderator

Top
#17538 - 09/22/11 08:34 AM Re: Safari 5.1 Thrashing [Re: tacit]
ryck Offline


Registered: 08/04/09
Loc: Okanagan Valley
Originally Posted By: tacit
Anyone else noticed this issue?

I have not although it may have to do with the fact that I don't usually operate with many open windows (3 or 4 at most). If I'm working between more sites I make use of the new feature, Reading List, which I quite like.

ryck
_________________________
ryck

iMac (Retina 5K, 27", 2017), 3.4 GHz Intel Core i5, 8GB RAM, 2400 MHz DDR4
OS Mojave 10.14.6
Canon MX710 Printer
Epson Perfection V500 Photo Scanner
Time Machine on 1TB LaCie USB-C
Carbon Copy Clone on 500GB OWC Mercury OTG Pro

Top
#17556 - 09/23/11 12:18 AM Re: Safari 5.1 Thrashing [Re: tacit]
artie505 Online


Registered: 08/04/09
My main issue with Safari 5.1 is its memory leak.

> Every now and then, when the renderer thrashes, all my Safari windows will go blank, then reload.

I think I experienced that once, but the details of what happened are lost in time.

Edit: What happened was I all of a sudden realized that Safari's memory usage had dropped dramatically without my having quit an relaunched, and I think I lost my open windows as part of the deal. (I also think that both Safari's and the renderer's memory usage dropped.)


Edited by artie505 (09/23/11 12:54 AM)
_________________________
The new Great Equalizer is the SEND button.

In Memory Of Harv: Those who can make you believe absurdities can make you commit atrocities. ~Voltaire

Top
#17570 - 09/24/11 01:24 PM Re: Safari 5.1 Thrashing [Re: artie505]
tacit Offline


Registered: 08/03/09
Loc: Portland, Oregon, USA
That's interesting. I'll have to keep an eye on Safari's memory usage, but it certainly makes sense. If it's true, it suggests that the memory leak is in the renderer, and that if the renderer crashes or restarts, it reclaims the leaked memory at the cost of all current session information.
_________________________
Photo gallery, all about me, and more: www.xeromag.com/franklin.html

Top
#17572 - 09/24/11 02:40 PM Re: Safari 5.1 Thrashing [Re: tacit]
artie505 Online


Registered: 08/04/09
At the moment, Activity Monitor shows:

                                                 Real                        Virtual
                                              Memory                     Memory

Safari Web Content artie 0.0 301.2 MB Intel (64 bit) 341.4 MB 17091 6

and

Safari                      artie 0.3 147.9 MB Intel (64 bit) 223.3 MB 17090 11

My recollection is that "Web Content's" real memory usage always (Edit: greatly) exceeds "Safari's."


Edited by artie505 (09/24/11 03:05 PM)
_________________________
The new Great Equalizer is the SEND button.

In Memory Of Harv: Those who can make you believe absurdities can make you commit atrocities. ~Voltaire

Top
#17573 - 09/24/11 04:13 PM Re: Safari 5.1 Thrashing [Re: artie505]
dkmarsh Offline
Moderator

Registered: 08/04/09

You might want to provide some context for those figures by telling us how much installed RAM you have.
_________________________

dkmarsh • member, FineTunedMac Co-op Board of Directors

Top
#17575 - 09/24/11 06:16 PM Re: Safari 5.1 Thrashing [Re: dkmarsh]
artie505 Online


Registered: 08/04/09
Originally Posted By: dkmarsh

You might want to provide some context for those figures by telling us how much installed RAM you have.

4Gb RAM installed; thanks for thinking of that.

Edit: I should have supplemented that by mentioning that I had quit and relaunched Safari not too long before I took that Activity Monitor reading; immediately after launch, "Safari" uses less RAM than does "Web Content," but it doesn't take very long before they reverse positions. (When I quit Safari last night, WC and S were using around 870 and 170Mb of RAM, respectively.)

Note: Safari 5.1, in and of itself, makes MemoryStick* a useful desktop appurtenance; it's kinda fascinating watching the "Active" segment of the graph grow as quickly and as large as it does.


*) MemoryStick is no longer available at this location. The following direct download link still works: http://sbc.apeth.com/downloads/MemoryStick1.5.zip


Edited by alternaut (09/25/11 01:30 PM)
Edit Reason: Added footnote with current download link
_________________________
The new Great Equalizer is the SEND button.

In Memory Of Harv: Those who can make you believe absurdities can make you commit atrocities. ~Voltaire

Top
#17597 - 09/25/11 07:49 AM Re: Safari 5.1 Thrashing [Re: tacit]
artie505 Online


Registered: 08/04/09
OK... It happened again, and this time I've got a handle on what it was that happened:

1. I quit and restarted Safari, and "Safari"and "Safari Web Content" showed respective "Real Memory" usage of 94.5 and 44.2Mb.

2. 7 hours later, with "Safari"and "Safari Web Content" showing respective "Real Memory" usage of 199.1 and 423.6Mb (Note the reversal.), I put my MacBook (OS X 10.6.8/Safari 5.1) to sleep.

3. 3 hours later I woke my deuced Mac(hina) from sleep and hit control-S (my Safari hot key) to bring Safari to the front, and the open page (It happened to be the FTM Forums Index.) began to appear, then, all of a sudden, disappeared and was replaced by a new, empty page that turned into the FTM Forums Index.

4. Realizing what had happened, I immediately looked at Activity Monitor and saw that "Safari's" and "Safari Web Content's" respective "Real Memory" usage were 199.5 and 47.8Mb...that while "Safari's" was essentially unchanged, that of "Safari Web Content" had dropped to more or less its launch level...your renderer crash!

Edit: By the way... Remember that you can revert to Safari 5.0.5 by running the 10.6.8 Combo.


Edited by artie505 (09/25/11 08:12 AM)
_________________________
The new Great Equalizer is the SEND button.

In Memory Of Harv: Those who can make you believe absurdities can make you commit atrocities. ~Voltaire

Top
#17611 - 09/26/11 01:20 AM Re: Safari 5.1 Thrashing [Re: tacit]
artie505 Online


Registered: 08/04/09
I forgot to mention that that last incident occurred with only one window, with one tab, open.
_________________________
The new Great Equalizer is the SEND button.

In Memory Of Harv: Those who can make you believe absurdities can make you commit atrocities. ~Voltaire

Top
#17622 - 09/26/11 12:43 PM Re: Safari 5.1 Thrashing [Re: artie505]
tacit Offline


Registered: 08/03/09
Loc: Portland, Oregon, USA
Originally Posted By: artie505
OK... It happened again, and this time I've got a handle on what it was that happened:


Interesting. So that pretty much confirms what I'd suspected--when the renderer stops or crashes, memory is reclaimed, but all the session information is zapped into oblivion in the process.
_________________________
Photo gallery, all about me, and more: www.xeromag.com/franklin.html

Top
#17714 - 09/30/11 01:32 PM Re: Safari 5.1 Thrashing [Re: tacit]
Kevin M. Dean Offline


Registered: 08/04/09
Loc: Florida
When the Web Content Process crashes it will cause all open tabs to reload when viewed.

I don't often have that problem anymore but I use the Webkit Nightlies which may have resolved those crash issues. So if you have a lot of tab reload issues, you may want to download the latest to see if it improves things for you.

http://nightly.webkit.org/
_________________________
iMac 2.7 GHz Core i5, 12 GB RAM, OS X 10.9, Int SATA 1 TB, Ext Fire 2 TB / 1 TB / 1 TB / 500 GB / 300 GB
Former MacFixIt Forums member since 11/17/99
www.rhubarbproductions.com

Top
#17718 - 09/30/11 03:33 PM Re: Safari 5.1 Thrashing [Re: Kevin M. Dean]
artie505 Online


Registered: 08/04/09
Thanks for reminding me about that link.

I've only experienced the Safari Web Content crash twice, but I'm curious to see whether anything has been done about its memory leak.
_________________________
The new Great Equalizer is the SEND button.

In Memory Of Harv: Those who can make you believe absurdities can make you commit atrocities. ~Voltaire

Top
#17750 - 10/02/11 12:32 AM Re: Safari 5.1 Thrashing [Re: artie505]
artie505 Online


Registered: 08/04/09
I d/l'ed the WebKit Nightly Build that was available when you posted, and, although it appears that Apple has made headway in dealing with the Safari Web Content memory leak, I didn't run it for very long...

1. I guess it's a function of the way my system is set up, but I repeatedly wound up with duplicate processes, i.e. WebKit/Safari Web Content and Safari/Safari Web Content, with which I didn't care to deal.

2. Something kept messing with my AdBlock For Safari database in /Users/Your short name/Library/Safari/LocalStorage, almost costing me considerable time and effort. (I'm going to start a new thread about that.)
_________________________
The new Great Equalizer is the SEND button.

In Memory Of Harv: Those who can make you believe absurdities can make you commit atrocities. ~Voltaire

Top
#17826 - 10/03/11 11:00 AM Re: Safari 5.1 Thrashing [Re: artie505]
Kevin M. Dean Offline


Registered: 08/04/09
Loc: Florida
Originally Posted By: artie505
I d/l'ed the WebKit Nightly Build that was available when you posted, and, although it appears that Apple has made headway in dealing with the Safari Web Content memory leak, I didn't run it for very long...

1. I guess it's a function of the way my system is set up, but I repeatedly wound up with duplicate processes, i.e. WebKit/Safari Web Content and Safari/Safari Web Content, with which I didn't care to deal.

2. Something kept messing with my AdBlock For Safari database in /Users/Your short name/Library/Safari/LocalStorage, almost costing me considerable time and effort. (I'm going to start a new thread about that.)


1. That just sounds like you may have been running both Safari and Webkit at the same time. I don't see multiple Safari Web Content processes.

2. I'll be posting some further notes in your other thread.
_________________________
iMac 2.7 GHz Core i5, 12 GB RAM, OS X 10.9, Int SATA 1 TB, Ext Fire 2 TB / 1 TB / 1 TB / 500 GB / 300 GB
Former MacFixIt Forums member since 11/17/99
www.rhubarbproductions.com

Top
#17837 - 10/03/11 12:12 PM Re: Safari 5.1 Thrashing [Re: Kevin M. Dean]
artie505 Online


Registered: 08/04/09
> That just sounds like you may have been running both Safari and Webkit at the same time. I don't see multiple Safari Web Content processes.

Ultimately, I was, but I never started out that way... I'd launch WebKit, and later, by way of example, do a Google search that would, without my realizing it, launch Safari, thereby leaving me with four open processes when I only wanted two...free RAM doesn't last very long under those circumstances.
_________________________
The new Great Equalizer is the SEND button.

In Memory Of Harv: Those who can make you believe absurdities can make you commit atrocities. ~Voltaire

Top
#17839 - 10/03/11 12:46 PM Re: Safari 5.1 Thrashing [Re: artie505]
Kevin M. Dean Offline


Registered: 08/04/09
Loc: Florida
You may have clicked some externals links that launched your default browser of Safari. To get around that, just open Safari's preferences -> General and set the Default web browser to Webkit.
_________________________
iMac 2.7 GHz Core i5, 12 GB RAM, OS X 10.9, Int SATA 1 TB, Ext Fire 2 TB / 1 TB / 1 TB / 500 GB / 300 GB
Former MacFixIt Forums member since 11/17/99
www.rhubarbproductions.com

Top
#17847 - 10/03/11 03:40 PM Re: Safari 5.1 Thrashing [Re: Kevin M. Dean]
dkmarsh Offline
Moderator

Registered: 08/04/09

I think if you initiate a Google search by right-clicking on a highlighted word or phrase and then choosing Search with Google from the contextual menu, though, the search is carried out via Safari regardless of your default browser setting. That contextual menu command seems to be hard-wired to Safari.
_________________________

dkmarsh • member, FineTunedMac Co-op Board of Directors

Top
#17851 - 10/03/11 03:54 PM Re: Safari 5.1 Thrashing [Re: dkmarsh]
Kevin M. Dean Offline


Registered: 08/04/09
Loc: Florida
That's no the case on my end. It opens within Webkit and doesn't launch Safari.
_________________________
iMac 2.7 GHz Core i5, 12 GB RAM, OS X 10.9, Int SATA 1 TB, Ext Fire 2 TB / 1 TB / 1 TB / 500 GB / 300 GB
Former MacFixIt Forums member since 11/17/99
www.rhubarbproductions.com

Top
#17856 - 10/04/11 12:36 AM Re: Safari 5.1 Thrashing [Re: Kevin M. Dean]
artie505 Online


Registered: 08/04/09
Originally Posted By: Kevin M. Dean
You may have clicked some externals links that launched your default browser of Safari. To get around that, just open Safari's preferences -> General and set the Default web browser to Webkit.

Good thought; thanks.

I think, though, that I'll stick with Safari for the time being; WebKit's RAM usage didn't appear to have improved all that much, and my browsing habits make it a "no-hassle" to quit Safari periodically.

And, in a different vein, I know myself, and I don't want to get (neurotically, as I do) involved with anything that changes nightly unless it's an absolute necessity.
_________________________
The new Great Equalizer is the SEND button.

In Memory Of Harv: Those who can make you believe absurdities can make you commit atrocities. ~Voltaire

Top
#18232 - 10/12/11 04:11 PM Re: Safari 5.1 Thrashing [Re: artie505]
jchuzi Online


Registered: 08/04/09
Loc: New York State
Supposedly, Safari 5.1.1 addresses the memory issue.
_________________________
Jon

OS 10.15.3, iMac Retina 5K 27-inch, late 2014, 3.5 GHz Intel Core i5, 1 TB fusion drive, 16 GB RAM, Epson SureColor P600, Photoshop CC, Lightroom CC, MS Office 365

Top
#18243 - 10/13/11 01:24 AM Re: Safari 5.1 Thrashing [Re: jchuzi]
artie505 Online


Registered: 08/04/09
This is, of course, a pretty short-term observation, but Safari 5.1.1's memory usage has been reasonable so far...no evidence of a leak. smile

Edit: A coupl'a hours further down the road, and Safari 5.1.1 is still very well- behaved RAM-wise...exceptionally well-behaved, as a matter of fact.


Edited by artie505 (10/13/11 04:33 AM)
_________________________
The new Great Equalizer is the SEND button.

In Memory Of Harv: Those who can make you believe absurdities can make you commit atrocities. ~Voltaire

Top
#18255 - 10/13/11 07:10 AM Re: Safari 5.1 Thrashing [Re: artie505]
Pendragon Offline


Registered: 08/04/09
Loc: Georgetown, Texas, USA
Originally Posted By: artie505
This is, of course, a pretty short-term observation, but Safari 5.1.1's memory usage has been reasonable so far...no evidence of a leak. smile

Edit: A coupl'a hours further down the road, and Safari 5.1.1 is still very well- behaved RAM-wise...exceptionally well-behaved, as a matter of fact.


That's good to know Artie, thanks!

Now, I'll have to break the habit of relaunching Safari twice a day. cool
_________________________
Harv
27" i7 iMac (10.13.6), iPhone Xs Max (12.1)

Those who can make you believe absurdities can make you commit atrocities. ~Voltaire

Top
Page 1 of 2 1 2 >

Moderator:  alternaut, dianne, MacManiac