Subject: Phone performance

From: Daniel van Vugt <[email-masked]>
Date: Fri, 14 Aug 2015 16:48:34 +0800

Hi all,

In testing performance optimisations on various phones, I keep running 
into an annoying hurdle.

Although you can optimise your Mir server/clients in such a way that 
they're smoother more often, there's an additional variable outside of 
Mir and Unity that gets in the way. That seems to be frequency scaling 
done by the kernel. Sometimes on desktops too, but I'm mostly concerned 
about phones here.

I find it suspicious that on some devices you can turn stuttering into 
smoothness just but touching the screen a lot. But the smoothness soon 
goes away when you're not touching the screen. In the extreme case, if 
you're logged into the phone remotely you will also notice the system 
can become unusably slow when the screen has turned off. That's useful 
for a real phone's battery life, but it serves to illustrate that the 
kernel is doing a lot behind the scenes. I'm more concerned about how 
can we keep phone graphics performing as well as they do during touches, 
even when we're not touching them?

- Daniel

---

From: Daniel van Vugt <[email-masked]>
Date: Fri, 14 Aug 2015 16:55:49 +0800

It's not just frequency either. On arale (Meizu) for example, smoothness 
correlates directly with whether multiple CPU cores are online or not:

   cat /sys/devices/system/cpu/online

Usually the kernel only keeps one core online, which makes Unity8 
stutter. But if you touch it enough then the second core (out of eight) 
comes online and everything is smooth. I wonder if more aggressive use 
of threads might help...

---

From: Alberto Aguirre <[email-masked]>
Date: Fri, 14 Aug 2015 10:32:40 -0500

That will also be the result of the scaling governor. I was surprised too
that arale (Meizu) only has an interactive governor available.
It's quite hard to measure performance consistently and effectively with
such a governor (specially for comparison purposes).

>I'm more concerned about how can we keep phone graphics performing as well
as they do during touches, even when we're not touching them?
I don't think there's escaping the fact that we will need to tune the
governor to match the Ubuntu workload.

On Fri, Aug 14, 2015 at 3:55 AM, Daniel van Vugt <
[email-masked]> wrote:

> Usually the kernel only keeps one core online, which makes Unity8 stutter.
> But if you touch it enough then the second core (out of eight) comes online
> and everything is smooth. I wonder if more aggressive use of threads might
> help...
>
>
>
> --
> Unitymirteam mailing list
> [email-masked]
> Modify settings or unsubscribe at:
> https://lists.canonical.com/mailman/listinfo/unitymirteam
>

---

From: Chunsang Jeong <[email-masked]>
Date: Sun, 16 Aug 2015 20:17:04 +0900

On Sat, Aug 15, 2015 at 12:32 AM, Alberto Aguirre <
[email-masked]> wrote:

> >I'm more concerned about how can we keep phone graphics performing as
> well as they do during touches, even when we're not touching them?
>> comes online and everything is smooth. I wonder if more aggressive use of
>> threads might help...
>>
>>
>>
I'm not sure these are what you want to, but if you're testing on Arale,
you can enable cpus by
 /proc/hps/num_base_perf_serv [# of little] [# of bigs]
   ex) sudo /proc/hps/num_base_perf_serv 2 2 (2 littles and 2 bigs)
and also can set gpu with the max freq by
  echo 0 > /sys/module/pvrsrvkm/parameters/gpu_dvfs_enable
(though I'm recommending this only for testing.)

- Daniel
> Mir-devel mailing list
> [email-masked]
> https://lists.ubuntu.com/mailman/listinfo/mir-devel
>
>

-- 
Chunsang(Paul) Jeong

---

From: Chunsang Jeong <[email-masked]>
Date: Sun, 16 Aug 2015 20:23:25 +0900

>    ex) sudo /proc/hps/num_base_perf_serv 2 2 (2 littles and 2 bigs)
sorry, it works as;
sudo echo [# of little] [# of bigs]  > /proc/hps/num_base_perf_serv
      ex) sudo echo 2 2 /proc/hps/hum_base_perf_serv (2 littles and 2 bigs)

-- 
Chunsang(Paul) Jeong