Memory use in 2.22 with WebKitGTK 2.14

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Memory use in 2.22 with WebKitGTK 2.14

Michael Gratton

Hey all,

I feel like Epiphany's/WebKitGTK's memory use has substantially
increased with 3.22/2.14, under X11 on Ubuntu at least.

My current Epiphany session has ~70 tabs over two windows. If I quit
and restart it, such that only two of those tabs have actually loaded
any content, then the total memory consumption is ~7GB (as reported by
gnome-system-monitor total free before and after launching Ephy). This
seems to be a substantial increase over earlier versions.

Breaking that down, I am seeing the following approx Memory (from
g-s-m):
 - Epiphany: 100M
 - Network + DB processes: 40M
 - Single web process for loaded tabs: 250M (+ 10M XServer memory)
 - Single web process for not-yet-loaded tabs: 55M (+ 10M XServer
memory)

While that doesn't add up to ~7GB, adding up the RSS sizes as reported
by `ps aux` does.

Switching to a single-shared-process gives 6.4G used after launch, with
similar numbers for the aux processes, and the following for the single
web process:

 - Shared web process: 2.1G (+ 550Mb XServer memory)

This is in comparison to the honourable competition, both of which use
~1G after opening 70 blank tabs.

Is this to be expected? What's the best way to try to find out where
all this memory is going?

//Mike

--
⊨ Michael Gratton, Percept Wrangler.
⚙ <http://mjog.vee.net/>


_______________________________________________
epiphany-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/epiphany-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Memory use in 2.22 with WebKitGTK 2.14

Michael Catanzaro-2
On Fri, 2016-10-21 at 17:15 +1100, Michael Gratton wrote:
>  - Single web process for loaded tabs: 250M (+ 10M XServer memory)

That's about twice what I'm seeing here, but I think the memory
increase is indeed expected in 2.14 due to the switch to always-on
accelerated compositing. You can verify by re-rerunning your experiment
with WEBKIT_DISABLE_COMPOSITING_MODE=1.

The WebKitGTK+ mailing list would be a better place for this
discussion; there might already be plans to improve this.

Michael
_______________________________________________
epiphany-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/epiphany-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Memory use in 2.22 with WebKitGTK 2.14

Michael Gratton
On Fri, Oct 21, 2016 at 10:40 PM, Michael Catanzaro
<[hidden email]> wrote:
> That's about twice what I'm seeing here, but I think the memory
> increase is indeed expected in 2.14 due to the switch to always-on
> accelerated compositing. You can verify by re-rerunning your
> experiment
> with WEBKIT_DISABLE_COMPOSITING_MODE=1.

Re-running with compositing disabled does indeed reduce the memory use
by a factor of almost 4: to 2GB total. Individual web processes are now
being reported to use about ~1/5 of of the memory in g-s-m.

I wonder if my high-DPI display is causing the extra overhead when it
is enabled compared to what you are seeing?

> The WebKitGTK+ mailing list would be a better place for this
> discussion; there might already be plans to improve this.

Sure looks like it, I'll take it over there.

Cheers,
//Mike

--
⊨ Michael Gratton, Percept Wrangler.
⚙ <http://mjog.vee.net/>


_______________________________________________
epiphany-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/epiphany-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Memory use in 2.22 with WebKitGTK 2.14

Michael Catanzaro-2
On Sat, 2016-10-22 at 09:38 +1100, Michael Gratton wrote:
> Re-running with compositing disabled does indeed reduce the memory
> use 
> by a factor of almost 4: to 2GB total. Individual web processes are
> now 
> being reported to use about ~1/5 of of the memory in g-s-m.
>
> I wonder if my high-DPI display is causing the extra overhead when
> it 
> is enabled compared to what you are seeing?

Wow, that's really bad. :/

I'll pass this along to the relevant developers.
_______________________________________________
epiphany-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/epiphany-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Memory use in 2.22 with WebKitGTK 2.14

Michael Catanzaro-2
In reply to this post by Michael Gratton
On Sat, 2016-10-22 at 09:38 +1100, Michael Gratton wrote:
> Re-running with compositing disabled does indeed reduce the memory
> use 
> by a factor of almost 4: to 2GB total. Individual web processes are
> now 
> being reported to use about ~1/5 of of the memory in g-s-m.
>
> I wonder if my high-DPI display is causing the extra overhead when
> it 
> is enabled compared to what you are seeing?

I got a response already (you are "he"):

"""If he can build WebKit, ask him to try also with a build with the
threaded compositor disabled (cmake arg
-DENABLE_THREADED_COMPOSITOR=OFF )
and without disabling AC mode via this env variable."""

Up for giving this a try? I know it takes a while to build. :( It will
help determine whether the problem is actually accelerated compositing
mode, or threaded compositor. (Threaded compositor is new in 2.14 and
requires accelerated compositing. Accelerated compositing has been
around for a while, but disabled except on a few web pages; in 2.14
it's now used everywhere.)

Michael
_______________________________________________
epiphany-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/epiphany-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Memory use in 2.22 with WebKitGTK 2.14

Michael Gratton
On Sat, Oct 22, 2016 at 12:09 PM, Michael Catanzaro
<[hidden email]> wrote:

> I got a response already (you are "he"):
>
> """If he can build WebKit, ask him to try also with a build with the
> threaded compositor disabled (cmake arg
> -DENABLE_THREADED_COMPOSITOR=OFF )
> and without disabling AC mode via this env variable."""
>
> Up for giving this a try? I know it takes a while to build. :( It will
> help determine whether the problem is actually accelerated compositing
> mode, or threaded compositor. (Threaded compositor is new in 2.14 and
> requires accelerated compositing. Accelerated compositing has been
> around for a while, but disabled except on a few web pages; in 2.14
> it's now used everywhere.)

Thanks for that, yeah I will - might take a few days before I can get
to it though.

//Mike

--
⊨ Michael Gratton, Percept Wrangler.
⚙ <http://mjog.vee.net/>


_______________________________________________
epiphany-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/epiphany-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Memory use in 2.22 with WebKitGTK 2.14

Michael Catanzaro-2
On Sat, 2016-10-22 at 17:35 +1100, Michael Gratton wrote:
> Thanks for that, yeah I will - might take a few days before I can
> get 
> to it though.
>
> //Mike

OK some good news: don't bother! I'm told that you're expected to see
significantly higher memory use with a hidpi display, but it shouldn't
be this much. One of our engineers looked at this over the weekend and
found a problem that's causing excess memory use. For now you can use
WEBKIT_DISABLE_COMPOSITING_MODE as a workaround. Once 2.14.2 comes out
(I don't know when that will be) and you've had a chance to upgrade,
please let us know how much of an improvement you see.

Michael
_______________________________________________
epiphany-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/epiphany-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Memory use in 2.22 with WebKitGTK 2.14

Gianvito Cavasoli
Il giorno dom, 23/10/2016 alle 08.57 -0500, Michael Catanzaro ha
scritto:

> On Sat, 2016-10-22 at 17:35 +1100, Michael Gratton wrote:
> >
> > Thanks for that, yeah I will - might take a few days before I can
> > get 
> > to it though.
> >
> > //Mike
>
> OK some good news: don't bother! I'm told that you're expected to see
> significantly higher memory use with a hidpi display, but it
> shouldn't
> be this much. One of our engineers looked at this over the weekend
> and
> found a problem that's causing excess memory use. For now you can use
> WEBKIT_DISABLE_COMPOSITING_MODE as a workaround. Once 2.14.2 comes
> out
> (I don't know when that will be) and you've had a chance to upgrade,
> please let us know how much of an improvement you see.
>
> Michael
> _______________________________________________

Thanks to you, i also had this memory problem :)

--
Inviata con Evolution da GNOME
Profilo: https://it.gravatar.com/janvitus
«Lillo, la fine del mondo è vicina! Godiamocela!» 
                                                -- La bambina filosofica
_______________________________________________
epiphany-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/epiphany-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Memory use in 2.22 with WebKitGTK 2.14

Michael Gratton
In reply to this post by Michael Catanzaro-2
On Mon, Oct 24, 2016 at 12:57 AM, Michael Catanzaro
<[hidden email]> wrote:
> OK some good news: don't bother! I'm told that you're expected to see
> significantly higher memory use with a hidpi display, but it shouldn't
> be this much. One of our engineers looked at this over the weekend and
> found a problem that's causing excess memory use. For now you can use
> WEBKIT_DISABLE_COMPOSITING_MODE as a workaround. Once 2.14.2 comes out
> (I don't know when that will be) and you've had a chance to upgrade,
> please let us know how much of an improvement you see.

Great, thanks Michael!

--
⊨ Michael Gratton, Percept Wrangler.
⚙ <http://mjog.vee.net/>


_______________________________________________
epiphany-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/epiphany-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Memory use in 2.22 with WebKitGTK 2.14

Michael Catanzaro-2
On Tue, 2016-10-25 at 10:01 +1100, Michael Gratton wrote:
>
> Great, thanks Michael!

Ah, unfortunately I might have been too optimistic, I'm not sure if it
will be fixed in 2.14.2 or not. Somebody forgot to test if pages still
display after fixing the huge memory issue (they don't). I'll keep you
posted. :-)

Michael
_______________________________________________
epiphany-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/epiphany-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Memory use in 2.22 with WebKitGTK 2.14

Michael Catanzaro-2
In reply to this post by Michael Gratton
On Tue, 2016-10-25 at 10:01 +1100, Michael Gratton wrote:

> On Mon, Oct 24, 2016 at 12:57 AM, Michael Catanzaro 
> <[hidden email]> wrote:
> > OK some good news: don't bother! I'm told that you're expected to
> see
> > significantly higher memory use with a hidpi display, but it
> shouldn't
> > be this much. One of our engineers looked at this over the weekend
> and
> > found a problem that's causing excess memory use. For now you can
> use
> > WEBKIT_DISABLE_COMPOSITING_MODE as a workaround. Once 2.14.2 comes
> out
> > (I don't know when that will be) and you've had a chance to
> upgrade,
> > please let us know how much of an improvement you see.

FYI: this is still a work in progress, sorry.

Michael
_______________________________________________
epiphany-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/epiphany-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Memory use in 2.22 with WebKitGTK 2.14

Michael Gratton
On Tue, Nov 8, 2016 at 9:21 PM, Michael Catanzaro
<[hidden email]> wrote:
> FYI: this is still a work in progress, sorry.

No problem, aside from videos not playing properly with
WEBKIT_DISABLE_COMPOSITING_MODE=1 it otherwise is a reasonable
workaround. Thanks for the update.

//Mike

--
⊨ Michael Gratton, Percept Wrangler.
⚙ <http://mjog.vee.net/>


_______________________________________________
epiphany-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/epiphany-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Memory use in 2.22 with WebKitGTK 2.14

Michael Catanzaro-2
You can follow progress in

https://bugs.webkit.org/show_bug.cgi?id=164049

On Mon, 2016-11-14 at 23:54 +1100, Michael Gratton wrote:
> No problem, aside from videos not playing properly with 
> WEBKIT_DISABLE_COMPOSITING_MODE=1 it otherwise is a reasonable 
> workaround. Thanks for the update.

Hm, that's a bug. I think it's been fixed on trunk; you could file a
WebKit bug report to make sure it's backported.

Michael
_______________________________________________
epiphany-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/epiphany-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Memory use in 2.22 with WebKitGTK 2.14

Michael Gratton

Subscribed to 164049 and reported the video issue as:
<https://bugs.webkit.org/show_bug.cgi?id=164748>

Cheers!

--
⊨ Michael Gratton, Percept Wrangler.
⚙ <http://mjog.vee.net/>


On Tue, Nov 15, 2016 at 1:37 AM, Michael Catanzaro
<[hidden email]> wrote:

> You can follow progress in
>
> https://bugs.webkit.org/show_bug.cgi?id=164049
>
> On Mon, 2016-11-14 at 23:54 +1100, Michael Gratton wrote:
>>  No problem, aside from videos not playing properly with
>>  WEBKIT_DISABLE_COMPOSITING_MODE=1 it otherwise is a reasonable
>>  workaround. Thanks for the update.
>
> Hm, that's a bug. I think it's been fixed on trunk; you could file a
> WebKit bug report to make sure it's backported.
>
> Michael

_______________________________________________
epiphany-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/epiphany-list
Loading...