intel / ozone-wayland

Wayland implementation for Chromium Ozone classes
BSD 3-Clause "New" or "Revised" License
219 stars 82 forks source link

The render process uses more than 40% of CPU power when running CSS 3D transforms with animations on Tizen IVI #282

Open joone opened 10 years ago

joone commented 10 years ago

When we run WebGL or CSS animations on Tizen IVI, the GPU process uses more than 40% of CPU usage. The UI process and browser process also use about 20% of CPU usage.

GpuCommandBufferStub::OnAsyncFlush is 266 times slower than Chromium X11 version on my Linux desktop. This looks like the main reason.

sjnewbury commented 10 years ago

I'm using Weston (Intel IvyBridge), so I don't know about Tizen IVI, but don't get accelerated 2d_canvas which can't help with CPU usage.

kalyankondapally commented 10 years ago

@sjnewbury Accelerated 2d canvas is disabled by default on Linux(blacklisted). You can go to chrome://flags and enable it.

sjnewbury commented 10 years ago

@kalyankondapally I have it enabled in chrome://flags

In chrome://gpu I get:

Accelerated 2d canvas is unavailable: either disabled at the command line or not supported by the current system.

I've also tried removing the blacklist entries relating to my system, I have everything "Hardware accelerated" except for "Canvas".

I can't remember if it used to work with Ozone-Wayland previously. Should I create a new Issue?

kalyankondapally commented 10 years ago

@sjnewbury I can see the same thing here. Probably something changed in Chromium. I will take a look.

ghost commented 10 years ago

Hi Kalyan, is there an update to this bug yet please?

kalyankondapally commented 10 years ago

@uhofemei This function simply calls glflush (Atleast from what I looked at). On x11(glx), we have support for partial updates and we don't have equivalent support for it with EGL. So, we are doing more work in oz-wl case depending on resolution of the window.

ghost commented 10 years ago

That explains why. Are you working on improving the situation so that using Wayland will be less expensive on the CPU? I think for Crosswalk to fare well in benchmarks it's rather important to optimize it.

joone commented 10 years ago

The GPU process shows 31~33% CPU usage, which is a bit better than the previous measurement. Comparing to Chromium X11 on desktop, it usually uses 3 times more CPU.

It was done on tizen-ivi_20141011.1_ivi-efi-i586

joone commented 10 years ago

The CPU usage of other processes such as the browser process and render process is also high: they use 2~ 3 times more CPU than Chromium X11 on desktop. I think ozone-wayland uses more CPU resource than Chromium X11 overall.

kalyankondapally commented 10 years ago

@uhofemei I am not working on this. I quickly looked at this to provide feedback for Joone.

kalyankondapally commented 10 years ago

@joone Can we either do a Desktop comparison of x11 and wayland or a Tizen comparison ?

ghost commented 10 years ago

@kalyankondapally would you be interested in working on this if there is an apple to apple comparison showing a significant difference in performance?

joone commented 10 years ago

@kalyankondapally Could you share the cpu usage of Ozone-Wayland on Desktop?

kalyankondapally commented 10 years ago

@joone As we discussed offline, lets get the data from same hardware. @uhofemei Sorry for the delay in respose, I cannot at this point of time. I will be closely following Joone work though.

joone commented 10 years ago

I checked the CSS 3D transforms/animations on Chromebook. Chromebook also uses more CPU power than desktop, but a bit better than Tizen IVI box. Here are more details: https://bugs.tizen.org/jira/browse/TC-1984

ds-hwang commented 9 years ago

First of all, WebGL or CSS animations is not related to accelerated 2d canvas.

Second, IMO it make sense. more pure cpu, more high usage. In WebKit leaves case, GPU process draws same number of leaves by 60FPS, which means GPU process must call same GL operations no matter what cpu. Calling GL operations is not free for cpu. GPU driver needs to use cpu heavily.

If machine running Tizen IVI is worse than chromebook, higher cpu usage makes sense.

joone commented 9 years ago

@ds-hwang
Acer 720P: Celeron (1.4G) 2 cores , 2048KB cache size VTC-1010: Atom (1.74G) 2 core, 512KB cache size

The chromebook is faster than my IVI box so the performance result seems to make sense.

joone commented 9 years ago

Currently, the GPU process's CPU usage is not bad. It usually uses 23~25%, but the render process can use more than 40% of CPU power in some cases.

ds-hwang commented 9 years ago

Render process uses 40%, not Browser process, isn't it? The first painting can use 40% cpu in render process, because Blink needs dom construction, layout, render tree construction, animiation construction, etc. However, if 40% peak happens repeatedly, some bad thing might happen.