Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Boost Logger CPU Usage #3709

Open
Jack-Byrne opened this issue May 24, 2021 · 1 comment
Open

Boost Logger CPU Usage #3709

Jack-Byrne opened this issue May 24, 2021 · 1 comment
Labels

Comments

@Jack-Byrne
Copy link
Collaborator

Bug Report

When comparing the default log4cxx build of SDL Core with the Boost logger configured build, the Boost build of SDL Core uses a lot more CPU during video streaming.

Reproduction Steps
  1. Build SDL Core with boost logger
  2. Connect HMI and app and start video stream
  3. Monitor system resource usage in htop.
Expected Behavior

Boost logger build of SDL Core uses a comparable amount of CPU as the LOG4CXX build.

Observed Behavior

Boost build of SDL Core uses over 100% of system CPU when video streaming.

OS & Version Information
  • OS/Version: Ubuntu 16
  • SDL Core Version: 7.1.1
  • Testing Against: SDL Java Suite
@Jack-Byrne Jack-Byrne changed the title Boost Logger CPU Usagee Boost Logger CPU Usage May 24, 2021
@ShobhitAd
Copy link
Contributor

ShobhitAd commented Aug 26, 2022

#3941 improves the CPU usage but is only a partial fix. The CPU usage of the boost build for video streaming logs is still much higher than that of the log4cxx build.

Some other ways to improve CPU usage would be to:

  • Use a different approach to process the timestamp. Currently BoostLogger::GetLocalPosixTime is used for every PushLog to convert the timestamp into a format the boost logger can use (boost::posix_time::ptime).
  • Find an alternative to the boost add_attribute method. I believe this is main cause of the higher CPU usage. Unfortunately, I wasn't able to find an alternative in the documentation which would work with the boostconfig.ini file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants