Posts Tagged ‘optimization’

Google Introduces Android 8.1 Go Edition for Low End Smartphones

December 5th, 2017 13 comments

With Android 8.1 preview release, we already knew Google was working on optimizations for Android Go for devices with 512MB to 1GB memory, and a new Neural Networks API to accelerate on-device machine intelligence.

Android 8.1 will be released tomorrow, and Google has now officially introduced Android Oreo Go Edition that will be part of the release tomorrow.

Optimizations cover three main components

  • Operating System – Performance and storage improvements with data management features and security benefits built-in. The company now claims the operating system will take much less space, and actually double free space on a typical 8GB eMMC flash.
  • Google Apps – New set of Google apps designed to be lighter and relevant to people who are coming online for the first time. App size will be reduced by around 50% on Android Go.
  • Google Play Store – A tuned version of the Google Play Store that works with any apps, but also highlights the apps designed to work best on low-end devices.

Apps are said to be around 15% faster on average on low end devices running Android 8.1 Go Edition instead of Android 8.1.

Android Go also comes with Google’s data saver features turned on by default, and appears to include the same security as Android 8.1 including Google Play Protect. GMS apps have been optimized for Go, and will have “Go” appended to their name for example Google Go, YouTube Go, Gmail Go, Google Maps Go, and so on. The apps are smaller and faster to run on memory constrained devices, and consume less data. File Go is a new file management app which can help users clean up space and organize their files and folders, and I could install it on my Android 7.1 phone.

Android Oreo GO Edition will be launched tomorrow, but it’s unclear whether any current device will get the optimized OS at that time, and Google instead refers to partners that will soon ship the new release on their entry-level devices in the coming months. Visit Android Oreo Go Edition product page for more details.

Embedded Linux Conference & Open Source Summit Europe 2017 Schedule

August 27th, 2017 4 comments

The Embedded Linux Conference & IoT summit 2017 took place in the US earlier this year in February, but there will soon be a similar event with the Embedded Linux Conference *& Open Source Summit Europe 2017 to take up in Europe on October 23 – 25 in Prague, Czech Republic, and the Linux Foundation has just published the schedule. It’s always useful to find out what is being discussed during such events, even if you are not going to attend, so I went through the different sessions, and compose my own virtual schedule with some of the ones I find the most interesting.

Monday, October 23

  • 11:15 – 11:55 – An Introduction to SPI-NOR Subsystem – Vignesh Raghavendra, Texas Instruments India

Modern day embedded systems have dedicated SPI controllers to support NOR flashes. They have many hardware level features to increase the ease and efficiency of accessing SPI NOR flashes and also support different SPI bus widths and speeds.

In order to support such advanced SPI NOR controllers, SPI-NOR framework was introduced under Memory Technology Devices (MTD). This presentation aims at providing an overview of SPI-NOR framework, different types of NOR flashes supported (like SPI/QSPI/OSPI) and interaction with SPI framework. It also provides an overview of how to write a new controller driver or add support for a new flash device.

The presentation then covers generic improvements done and proposed while working on improving QSPI performance on a TI SoC, challenges associated when using DMA with these controllers and other limitations of the framework.

  • 12:05 – 12:45 – Free and Open Source Software Tools for Making Open Source Hardware – Leon Anavi, Konsulko Group

The open source hardware movement is becoming more and more popular. But is it worth making open source hardware if it has been designed with expensive proprietary software? In this presentation, Leon Anavi will share his experience how to use free and open source software for making high-quality entirely open source devices: from the designing the PCB with KiCAD through making a case with OpenSCAD or FreeCAD to slicing with Cura and 3D printing. The talk will also provide information about open source hardware licenses, getting started guidelines, tips for avoiding common pitfalls and mistakes. The challenges of prototyping and low-volume manufacturing with both SMT and THT will be also discussed.

  • 14:20 – 15:00 – Introduction to SoC+FPGA – Marek Vašut, DENX Software Engineering GmbH

In this talk, Marek introduces the increasingly popular single-chip SoC+FPGA solutions. At the beginning, the diverse chip offerings from multiple vendors are introduced, ranging from the smallest IoT-grade solutions all the way to large industrial-level chips with focus on their software support. Mainline U-Boot and Linux support for such chips is quite complete, and already deployed in production. Marek demonstrates how to load and operate the FPGA part in both U-Boot and Linux, which recently gained FPGA manager support. Yet to fully leverage the potential of the FPGA manager in combination with Device Tree (DT) Overlays, patches are still needed. Marek explains how the FPGA manager and the DT Overlays work, how they fit together and how to use them to obtain a great experience on SoC+FPGA, while pointing out various pitfalls.

  • 15:10 – 15:50 – Cheap Complex Cameras – Pavel Machek, DENX Software Engineering GmbH

Cameras in phones are different from webcams: their main purpose is to take high-resolution still pictures. Running preview in high resolution is not feasible, so resolution switch is needed just before taking final picture. There are currently no applications for still photography that work with mainline kernel. (Pavel is working on… two, but both have some limitations). libv4l2 is doing internal processing in 8-bit, which is not enough for digital photography. Cell phones have 10 to 12-bit sensors, some DSLRs do 14-bit depth.

Differences do not end here. Cell phone camera can produce reasonable picture, but it needs complex software support. Auto-exposure / auto-gain is a must for producing anything but completely black or completely white frames. Users expect auto-focus, and it is necessary for reasonable pictures in macro range, requiring real-time processing.

  • 16:20 – 17:00 – Bluetooth Mesh with Zephyr OS and Linux – Johan Hedberg, Open Source Technology Center, Intel

Bluetooth Mesh is a new standard that opens a whole new wave of low-power wireless use cases. It extends the range of communication from a single peer-to-peer connection to a true mesh topology covering large areas, such as an entire building. This paves the way for both home and industrial automation applications. Typical home scenarios include things like controlling the lights in your apartment or adjusting the thermostat. Although Bluetooth 5 was released end of last year, Bluetooth Mesh can be implemented on any device supporting Bluetooth 4.0 or later. This means that we’ll likely see very rapid market adoption of the feature.

The presentation will give an introduction to Bluetooth Mesh, covering how it works and what kind of features it provides. The talk will also give an overview of Bluetooth Mesh support in Zephyr OS and Linux and how to create wireless solutions with them.

  • 17:10 – 17:50 – printk() – The Most Useful Tool is Now Showing its Age – Steven Rostedt, VMware

printk() has been the tool for debugging the Linux kernel and for being the display mechanism for Linux as long as Linux has been around. It’s the first thing one sees as the life of the kernel begins, from the kernel banner and the last message at shutdown. It’s critical as people take pictures of a kernel oops to send to the kernel developers to fix a bug, or to display on social media when that oops happens on the monitor on the back of an airplane seat in front of you.

But printk() is not a trivial utility. It serves many functionalities and some of them can be conflicting. Today with Linux running on machines with hundreds of CPUs, printk() can actually be the cause of live locks. This talk will discuss all the issues that printk() has today, and some of the possible solutions that may be discussed at Kernel Summit.

  • 18:00 – 18:45 – BoF: Embedded Linux Size – Michael Opdenacker, Free Electrons

This “Birds of a Feather” session will start by a quick update on available resources and recent efforts to reduce the size of the Linux kernel and the filesystem it uses.

An ARM based system running the mainline kernel with about 3 MB of RAM will also be demonstrated. If you are interested in the size topic, please join this BoF and share your experience, the resources you have found and your ideas for further size reduction techniques!

Tuesday, October 24

  • 10:55 – 11:35 – Introducing the “Lab in a Box” Concept – Patrick Titiano & Kevin Hilman, BayLibre

Continuous Integration (CI) has been a hot topic for long time. With the growing number of architectures and boards, it becomes impossible for maintainers to validate a patch on all configurations, making it harder and harder to keep the same quality level without leveraging CI and test automation. Recent initiatives like LAVA,, Fuego, (…) started providing a first answer, however the learning curve remains high, and the HW setup part is not covered.

Baylibre, already involved in, decided, as part of the AGL project, to go one step further in CI automation and has developed a turnkey solution for developers and companies willing to instantiate a LAVA lab; called “Lab in a Box”, it aims at simplifying the configuration of a board farm (HW, SW).

Motivations, challenges, benefits and results will be discussed, with a demo of a first “Lab in a Box” instantiation.

  • 11:45 – 12:25 – Protecting Your System from the Scum of the Universe – Gilad Ben-Yossef, Arm Holdings

Linux based systems have a plethora of security related mechanisms: DM-Crypt, DM-Verity, Secure Boot, the new TEE sub-system, FScrypt and IMA are just a few examples. This talk will describe these the various systems and provide a practical walk through of how to mix and match these mechanisms and design them into a Linux based embedded system in order to strengthen the system resilience to various nefarious attacks, whether the system discussed is a mobile phone, a tablet, a network attached DVR, a router, or an IOT hub in a way that makes maximum use of the sometime limited hardware resources of such systems.

  • 14:05 – 14:45 – Open Source Neuroimaging: Developing a State-of-the-Art Brain Scanner with Linux and FPGAs – Danny Abukalam, Codethink

Neuroimaging is an established medical field which is helping us to learn more about how the human brain works, the most complex human organ. This talk aims to cover neuroimaging systems, from hobbyist to professional, and how open source has been used to build state-of-the-art systems. We’ll have a look the general problem area, why open source was a good fit, and some examples of solutions including a commercial effort that we have been involved in bringing to market. Typically these solutions consist of specialist hardware, a bespoke software solutions stack, and a suite to manage and process the vast amounts of data generated during the scan. Other points of interest include how we approached building a maintainable and upgradeable system from the outset. We’ll also talk about future plans for neuroimaging, future ideas for hardware & discuss areas lacking good open source solutions.

  • 14:55 – 15:35 – More Robust I2C Designs with a New Fault-Injection Driver – Wolfram Sang, Renesas

It has its challenges to write code for certain error paths for I2C bus drivers because these errors usually don’t happen on the bus. And special I2C bus testers are expensive. In this talk, a new GPIO based driver will be presented which acts on the same bus as the bus master driver under inspection. A live demonstration will be given as well as hints how to handle bugs which might have been found. The scope and limitations of this driver will be discussed. Since it will also be analyzed what actually happens on the wires, this talk also serves as a case study how to snoop busses with only Free Software and OpenHardware (i.e. sigrok).

  • 16:05 – 16:45 – GStreamer for Tiny Devices – Olivier Crête, Collabora

GStreamer is a complete Open Source multimedia framework, and it includes hundreds of plugins, including modern formats like DASH, HLS or the first ever RTSP 2.0 implementation. The whole framework is almost 150MB on my computer, but what if you only have 5 megs of flash available? Is it a viable choice? Yes it is, and I will show you how.

Starting with simple tricks like only including the necessary plugins, all the way to statically compiling only the functions that are actually used to produce the smaller possible footprint.

  • 16:55 – 17:35 – Maintaining a Linux Kernel for 13 Years? You Must be Kidding Me. We Need at Least 30? – Agustin Benito Bethencourt, Codethink Ltd

Industrial grade solutions have a life expectancy of 30+ years. Maintaining a Linux kernel for such a long time in the open has not been done. Many claim that is not sustainable, but corporations that build power plants, railway systems, etc. are willing to tackle this challenge. This talk will describe the work done so far on the kernel maintenance and testing front at the CIP initiative.

During the talk it will be explained how we decide which parts of the kernel to cover – reducing the amount of work to be done and the risk of being unable to maintain the claimed support. The process of reviewing and backporting fixes that might be needed on an older branch will be briefly described. CIP is taking a different approach from many other projects when it comes to testing the kernel. The talk will go over it as well as the coming steps. and the future steps.

Wednesday, October 24

  • 11:05 – 11:45 – HDMI 4k Video: Lessons Learned – Hans Verkuil, Cisco Systems Norway

So you want to support HDMI 4k (3840×2160) video output and/or video capture for your new product? Then this is the presentation for you! I will describe the challenges involved in 4k video from the hardware level, the HDMI protocol level and up to the kernel driver level. Special attention will be given to what to watch out for when buying 4k capable equipment and accessories such as cables and adapters since it is a Wild, Wild West out there.

  • 11:55 – 12:35 – Linux Powered Autonomous Arctic Buoys – Satish Chetty, Hera Systems 

In my talk/presentation, I cover the technical, and design challenges in developing an autonomous Linux powered Arctic buoy. This system is a low cost, COTS based, extreme/harsh environment, autonomous sensor data gathering platform. It measures albedo, weather, water temperature and other parameters. It runs on a custom embedded Linux and is optimized for efficient use of solar & battery power. It uses a variety of low cost, high accuracy/precision sensors and satellite/terrestrial wireless communications.

I talk about using Linux in this embedded environment, and how I address and solve various issues including building a custom kernel, Linux drivers, frame grabbing issues and results from cameras, limited power challenges, clock drifts due to low temperature, summer melt challenges, failure of sensors, intermittent communication issues and various other h/w & s/w challenges.

  • 14:15 – 14:55 – Linux Storage System Bottleneck for eMMC/UFS – Bean Huo & Zoltan Szubbocsev, Micron

The storage device is considered a bottleneck to the system I/O performance. This thinking drives the need for faster storage device interfaces. Commonly used flash based storage interfaces support high throughputs, eg. eMMC 400MB/s, UFS 1GB/s. Traditionally, advanced embedded systems were focusing on CPU and memory speeds and these outpaced advances in storage speed improvements. In this presentation, we explore the parameters that impact I/O performance. We describe at a high level how Linux manages I/O requests coming from user space. Specifically, we look into system performance limitations in the Linux eMMC/UFS subsystem and expose bottlenecks caused by the software through Ftrace. We show existing challenges in getting maximum performance of flash-based high-speed storage device. by this presentation, we want to motivate future optimization work on the existing storage stack.

  • 15:05 – 15:45 – New GPIO Interface for User Space – Bartosz Golaszewski

Since Linux 4.8 the GPIO sysfs interface is deprecated. Due to its many drawbacks and bad design decisions a new user space interface has been implemented in the form of the GPIO character device which is now the preferred method of interaction with GPIOs which can’t otherwise be serviced by a kernel driver. The character device brings in many new interesting features such as: polling for line events, finding GPIO chips and lines by name, changing & reading the values of multiple lines with a single ioctl (one context switch) and many more. In this presentation, Bartosz will showcase the new features of the GPIO UAPI, discuss the current state of libgpiod (user space tools for using the character device) and tell you why it’s beneficial to switch to the new interface.

  • 16:15 – 16:55 – Replace Your Exploit-Ridden Firmware with Linux – Ronald Minnich, Google

With the WikiLeaks release of the vault7 material, the security of the UEFI (Unified Extensible Firmware Interface) firmware used in most PCs and laptops is once again a concern. UEFI is a proprietary and closed-source operating system, with a codebase almost as large as the Linux kernel, that runs when the system is powered on and continues to run after it boots the OS (hence its designation as a “Ring -2 hypervisor”). It is a great place to hide exploits since it never stops running, and these exploits are undetectable by kernels and programs.

Our answer to this is NERF (Non-Extensible Reduced Firmware), an open source software system developed at Google to replace almost all of UEFI firmware with a tiny Linux kernel and initramfs. The initramfs file system contains an init and command line utilities from the u-root project, which are written in the Go language.

  • 17:05 – 17:45 – Unikernelized Real Time Linux & IoT – Tiejun Chen, Vmware

Unikernel is a novel software technology that links an application with OS in the form of a library and packages them into a specialized image that facilitates direct deployment on a hypervisor. But why these existing unikernels have yet to gain large popularity broadly? I’ll talk what challenges Unikernels are facing, and discuss exploration of if-how we could convert Linux as Unikernel, and IoT could be a valuable one of use cases because the feature of smaller size & footprint are good for those resource-strained IoT platforms. Those existing unikernels are not designed to address those IoT characters like power consumption and real time requirement, and they also doesn’t support versatile architectures. Most existing Unikernels just focus on X86/ARM. As a paravirtualized unikenelized Linux, especially Unikernelized Real Time Linux, really makes Unikernels to succeed.

If you’d like to attend the real thing, you’ll need to register and pay a registration fee:

  • Early Registration Fee: US$800 (through August 27, 2017)
  • Standard Registration Fee: US$950 (August 28, 2017 – September 17, 2017)
  • Late Registration Fee: US$1100 (September 18, 2017 – Event)
  • Academic Registration Fee: US$200 (Student/Faculty attendees will be required to show a valid student/faculty ID at registration.)
  • Hobbyist Registration Fee: US$200 (only if you are paying for yourself to attend this event and are currently active in the community)

There’s also another option with the Hall Pass Registration ($150) if you just want to network on visit with sponsors onsite, but do not plan to attend any sessions or keynotes.

Make-WiFi-Fast Project Massively Improves WiFi Performance of Busy WiFi Routers

November 16th, 2016 7 comments

WiFi is a great way to add connectivity to a large group of people, but once everybody tries to connect at the same time, the network often becomes unusable due to very high latency, a problem that can occur on servers on the ISP side too, and that’s usually caused by excessive buffering, Bufferbloat. The Bufferbloat project aims to resolve this issue with both routers using CoDel and fq_codel algorithms, as well as WiFi  via Make-WiFi-Fast project.

Dave Täht gave a presentation of his work on Make-WiFi-Fast project entitled “Fixing WiFi Latency… Finally“showing how latency was reduced from seconds to milliseconds. It’s quite technical, but two slides of the presentation clearly shows the progress made.

Click to Enlarge

Click to Enlarge

The first chart shows 100 stations connecting to a website using unpatched code with the top of the chart showing the bandwidth per node in MBits/s, while the lower part showing latency in ms. We can see that about 5 stations can download data at up to 100 Mbps, but 95 stations need to wait, many give up, and after two minutes some other stations start to download again. Average bandwidth is 20 Mbits/s and not exactly evenly distributed among stations. Latency is about 15 seconds based on that chart.

Click to Enlarge

Click to Enlarge

The second chart shows the same test with make-wifi-fast patch to the Linux kernel, mainly improving queue handling. Both chart shows many more stations are served with an average of 1 Mbits/s, and latency is slashed to about 150 ms, meaning the vast majority of users get a much better user experience with that “airtime fairness” solution

I understand the tool used to test network connectivity and generate data for the charts above is flent, the FLExible Network Tester. The video below discusses benchmark, make-wifi-fast, and TCP BBR using the presentation slides shared above.

There’s also an article on discussing about this very topic. Make-wifi-fast project patchsets are queued for  Linux 4.9 and 4.10 already, and yet-to-be submitted patchsets for LEDE (OpenWrt fork) can be found here.

Thanks to Zoobab for the tip.

Embedded Linux Conference and OpenIoT Summit Europe 2016 Videos are Now Available Online

November 8th, 2016 1 comment

The Embedded Linux Conference and OpenIoT Summit Europe 2016 conferences took place on October 11 – 13 in Berlin, Germany, with many interesting talks about Linux, development boards, power management, embedded systems, software optimization, tools, and so on, as well as a few keynotes.


The Linux Foundation has recorded most talks and keynotes, and made the videos available on their website. A free registration is required, and will redirect you to the full unlisted playlist on YouTube.

Tim Bird keynote can be watch directly without registration.

You can also download the slides for each presentation.

Thanks to Harley for the tip.

How to Resolve Slow Boot Times in Ubuntu 16.04

August 9th, 2016 9 comments

I’ve recently upgraded my machine from Ubuntu 14.04.4 to Ubuntu 16.04.1, but while my computer used to boot in about 40 seconds, after the upgrade boot times increased considerably to 2 to 3 minutes.
Ubuntu_16.04_Boot_timesThe first easy check was to look at dmesg:

There’s a bit 87 seconds gap between checking for the floppy, and VirtualBox drivers loading. So there’s definitely an issue here, but the log does not exactly give a clear queue.

I’ve read you could use systemd-analyze to find which process(es) may be slowing down your computer at boot time:

Two processes are taking close to 8 seconds, but those 16 seconds still do not explain why it takes 2 minutes more to boot…Eventually, I realized systemd-analyze has a few more tricks up its sleeves:

The first command shows there’s no problem with the kernel itself, and something is slow in user space. The second command draws a huge boot chart (SVG), whose shape looks like the picture below.

ubuntu_16.04_BootchartSo we have something to look at, namely the area just before the large gap… I’ve zoomed in on it:

Ubuntu_16.04_Bootchart_ProlificThere are a few things there including the DVDROM drive, and “Prolific Technology Serial Controller” connected to /dev/ttyUSB0. The latter is a USB to TTL debug board based on PL2303, so I removed it and rebooted my machine, and miracle! Boot time was reduced to just 17 seconds:

Ubuntu_16.04_Fast_Boot_TimeThe SVG chart shape, shown on the right, also changed completely as it booted most of the same services in much less time. So since I don’t use the debug board everyday, I’ll make sure I only connect it when needed.  Ideally, I suppose a bug should be filled, but I’m not sure which package cause the issue.

On a rather unrelated note, yesterday I also decided to look into Firefox performance issues (switching or closing tabs would take 2 to 3 seconds), and I discovered recent versions of Firefox browser (47+ and greater) include support for “about:performance” tab showing which add-on(s), plugin(s), or page(s) may be problematic. Just let it run for a while, and go about your business browsing the web, and then come back to the tab to check if any has many alerts. It helped me find an add-on slowing down browsing considerably, so I disabled it, and performance is now much better.

Android N Developer Preview 3 Adds VR Support, Instant Apps, and Sustainable Performance Mode

May 19th, 2016 2 comments

Google has also unveiled the third Android N Developer Preview at Google I/O 2016, and the first “beta quality” release, available on Nexus 6, 9, 5X, 6P, Nexus Player, Pixel C, and Android One as a “seamless updates” if you opt-in to the Android Beta Program in order to get an over-the-air update with the very latest firmware.


Google wants Android N to be faster, safer and more productive. The first two previews addressed performance with a new JIT compiler and Vulkan 3D graphics API support, productivity with multi-window support and direct reply from notifications, as well as security thanks to seamless updates bringing the latest security patchsets to your phones in a timely manner.Google_Daydream_VR

The third preview brings fixes, and some interesting new features:



  • VR Mode in Android – Google has modified and augmented the Android stack in N to reduce lag between sensor data readings (e.g. head motion) and sending pixels to the display. Motion-to-photon latency on Nexus 6P is now less than 20 ms, a required to make the user feel he/she is really in the rendered scene. You can read Imagination Tech blog post for more details about low latency implementation. Google has now two VR kits: the good old Cardboard and  a new platform called Daydream, just like Android screensaver, that’s virtual reality kit with a two button motion controller that will be available in fall 2016, and work with upcoming Android N smartphones.
  • Android Instant Apps – So far if you want to install and an app, you need to go to Google Play, search for it, install it after agreeing to permissions, and finally you can tap to run it. Google has decided to develop a faster way with Android Instant Apps which let you skip the installation part. You just need to tap to run the app as you would do when you click a link on your web browser. Android Instant Apps are compatible with Android 4.1+ using Google Play services.
  • Sustained Performance Mode – Most recent devices will throttle under heavy load, leading to dramatic performance fluctuation of long-running apps. To address these limitations, Android N includes support for sustained performance mode, enabling OEMs to provide hints about device-performance capabilities for long-running apps. App developers can use these hints to tune apps for a predictable, consistent level of device performance over long periods of time. The new API is currently only enabled on Nexus 6P device.

You can get a complete list of API changes for Android N (all preview versions) on Google Developer’s Android N page. Google has still not decided about the actual name for Android N, so they’re asking for your help.

Software Matters, or How SinoVoIP Crippled Banana Pi M2+ Performance.

April 15th, 2016 5 comments

The most common way to use a development board is to simply go to the manufacturer website, and download the images from there. They are the ones who made the hardware after all, and they should be the most knowledgeable about their platform. But it may not always be true as tkaiser found out when he ran some Phoronix benchmarks on Banana Pi M2+ (aka BPI M2+) board with SinoVoIP (the manufacturer), Armbian, and Raspbian images. The results speak for themselves.

Banana_Pi-M2+_BenchmarkThe last three columns are what is of interest here, and in some benchmark Banana Pi M2+ is about 3 times slower with SinoVoIP image compared to Armbian, while with others the performance is quite similar. John The Ripper password cracker benchmark shows a massive difference between distributions…

Click to Enlarge

Click to Enlarge

… while FLAC audio encoding not so much.

Click to Enlarge

Click to Enlarge

So what’s going on here? First Jon the Ripper is a multi-threaded applications, while FLAC audio encoding works mostly on one thread, so SinoVoIP image does not seem to be negatively impacted by tasks using a single core. More clues comes with one comment, after SinoVoIP released a new Android 4.4 firmware on April 11:

the maximum clockspeed for bpi m+ is just 1Ghz not 1.2 as advertised and cpu cores stops after full load

So the massive performance degradation in multicore benchmarks appears to be related to the CPU throttling implementation, with the SinoVoIP image simply killing cores instead of decreasing frequency in order to manage the CPU temperature. That means multi-threaded tasks may run on a single core after a short time with SinoVoIP image, instead of the 4 cores on Allwinner H3 processor on Armbian and Raspbian images. The small performance difference is also explained by the lower maximum CPU frequency, as Allwinner H3 is rated to run at 1.2 GHz, but SinoVoIP decreased that to about 1 GHz.

tkaiser explains further:

Unfortunately SinoVoip again tries very hard to ignore any bug fixes or improvements which will lead to the BPi M2+ being the slowest H3 board ever. Their THS settings limit the CPU clockspeed to 1008 MHz (compare with the 1.2GHz they advertise with) and to killed CPU cores instead of lowering the CPU clockspeed. So chances are great that you end up with H3 running just at 1008 MHz and only one active CPU core after running heavy stuff on the board.

While Armbian already takes special precautions for the M2+ to bring back killed CPU cores and implements sane throttling (240MHz to 1200MHz) SinoVoip chose to ignore all of this.

What’s even more frustrating is that, as I understand it, all what is needed are some modifications of script.bin (aka FEX file) – Allwinner configuration files -, and specifically the cooler_table and dvfs_table sections of the file. Hopefully, SinoVoIP, and potentially other manufacturers, will read this post so that they can provide optimized images for their Allwinner boards and devices. In the meantime, you’d be better served by using Armbian images, unless you need to run Android, although simply replacing script.bin should help.

Android N Developer Preview Released with Multi-Window Support, PiP, Background Apps Optimizations…

March 10th, 2016 6 comments

Google has just released an early developer preview of Android 7.0 N (Nutella?) before the OS officially launched later this summer with new features such s multi-window support, TV recording,  Picture-in-picture, bundled notifications, and efficiency improvements.

Multi-window Support in Android N

Multi-window Support in Android N

So let’s have a look at some of improvements:

  • Multi-window – A new manifest attribute called android:resizableActivity is available for apps targeting N and beyond, allowing your activity to be launched in split-screen modes on phones and tablets. In addition, activities can also go into picture-in-picture mode on devices like TVs by setting android:supportsPictureInPicture to true.
  • Direct reply notifications: Initially an Android Wear only features, the RemoteInput notification API has now been added for smartphones and tablets, and allows user to reply directly within the notification shade.
  • Bundled notifications – The Notification.Builder.setGroup() method can be used to bundle notifications from the same app together.
  • Efficiency Improvements – Doze has been further improved to save battery whenever the screen turns off, and work is still being done on Project Svelte to reduce memory usage so allow Android to runs on more devices, and in Android N they’ve made background work more efficient using JobScheduler.
  • Improved Java 8 language support – Google has brough Java 8 language features to Android, and Jack compiler (Java Android Compiler Kit) can use many Java 8 features in Android 2.3 and greater.
  • Data Saver – Users can enable Data Saver in order to use less data with the system blocking background data usage and signalling apps to use less data in the foreground wherever possible. Users can also whitelist specific apps to allow background metered data usage even when Data Saver is turned on.
  • TV Recording Improvements – TV input services let the user pause and resume channel playback via time-shifting APIs. Android N expands on time-shifting by letting the user save multiple recorded sessions. Users can schedule recordings in advance, or start a recording as they watch a program. Once the system has saved a recording, the user can browse, manage, and play back the recording using the system TV app
Picture-in-Picture in Android N

Picture-in-Picture in Android N

You can try the N Developer Preview on the Android emulator, Nexus 6, Nexus 5X, Nexus 6P, Nexus Player, Nexus 9, and Pixel C devices, with the latter being sold at a $150 discount. To get Android N SDK, you’ll also need to install Android Studio 2.1, because the new version of Android required Jack compiler not supported in earlier versions.

Android N Preview in Android Studio 2.1 (Click to Enlarge)

Android N Preview in Android Studio 2.1’s SDK Manager (Click to Enlarge)

I’ve just been informed Android N source code is, or soon will be in AOSP, since android-n-preview-1 tag has been spotted, and that’s the way to get the source: