[yocto] CPU Load

Jussi Laako jussi.laako at linux.intel.com
Wed Mar 28 23:42:04 PDT 2018


On 29.03.2018 04:24, Andre McCurdy wrote:
> On Tue, Mar 27, 2018 at 4:44 AM, Ryan Meulenkamp
> <Ryan.Meulenkamp at nedap.com> wrote:
>> Hi y'all,
>>
>> I have some questions about CPU load and performance, but first some
>> background information.
>>
>> We have small embedded system running an openembedded classic (Angström)
>> distro. Now to get ourselves up-to-date we started working on a new
>> iteration of the OS based on openembedded core and Yocto. It is nearly
>> finished now, if it weren't for one problem: The CPU load (/proc/loadavg) of
>> the core/yocto based OS is more than double that of the classic/Angström OS.
>>
>> So the way I see it this could be caused by a number of factors:
>>
>>  - loadavg's calculation changed
>>  - certain newer versions of applications run heavier
>>  - The kernel itself is heavier (we upgraded from 2.6.35.14+ to 4.9.28+)
>>   - Possibly caused by some configs
>>  - ...
>>
>> My question: is there something that changed since OE-classic that you know
>> could be the cause of this? If not, how would I go about finding the cause?
>> I don't think the top command is sufficient for this, because it's precision
>> is such that many processes' CPU usage just become 0%.
>
> You don't say what the CPU doubled from or too. 1% to 2%, or 50% to
> 100% ? Unless the absolute increase is very small, you can probably
> ignore the processes which top reports as 0%.
>
> Does the new build have any significant processes running which
> weren't there in the old build? Or is it the same basic set of apps
> running in each?

Changes in really small loads could change even due to differences in 
kernel process accounting. For example if timer granularity has changed.

IIRC, for Meltdown/Spectre mitigations, there have been changes in use 
of TSC for timing (depending on which CPU model and microcode level is 
being used).

So it is good to at least check which clock source is being used by 
kernel in each case. Because the accounting values are at least rounded 
to the timer granularity.




More information about the yocto mailing list