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

Higher CPU usage across the board #12

Open
jallwine opened this issue May 18, 2021 · 5 comments
Open

Higher CPU usage across the board #12

jallwine opened this issue May 18, 2021 · 5 comments

Comments

@jallwine
Copy link

I've been working on making the switch from the archived version of Machinekit (pre HAL/CNC split) to Machinekit-HAL+EMCApplication on the Beaglebone Black. Besides the differences in implementation, there are a number of changes involved in my setup including upgrading to Debian Buster (from Stretch), Python 3 vs 2 and a newer kernel (though still 4.19). Across the board, I'm seeing higher CPU usage for key processes such as the rtapi, milltask, halui and other Python processes. I went from a system that is >90% idle when LinuxCNC is running but not doing anything, to a system that is <60% idle in a similar state. I know there could be a number of contributing factors, but I wanted to reach out and see if anyone had any thoughts on any obvious things to check that could improve performance. milltask seems to be the greatest offender going from ~2% CPU usage to ~17% CPU usage. rtapi went from about 16% up to 21%. halui from ~.5% to ~3%. Any ideas?

@cerna
Copy link
Contributor

cerna commented May 19, 2021

I have been scratching my head about this report, but I have no idea.

My first reaction would be to blame the system upgrade (which is unfortunate, as I will need to deprecate the Debian Stretch sooner than later because of the Python 3.5 end of life) or the Python. (I guess that you are not modifying the EMCApplication Debian packaging and thus using the Python2, right?)

@jallwine
Copy link
Author

I built EMCApplication from source using this configure command in order to get it working with Python 3:

./configure --with-hal=machinekit-hal --with-python=python3 --with-boost-python=boost_python-py37

@jallwine
Copy link
Author

I'm also using this version of machinekit-hal in order to use Python 3: machinekit-hal=0.4.21020-1.git941bffc90~buster

@jallwine
Copy link
Author

I'm trying to simply install the emcapplication packages to test Python 2, but I'm getting these errors:

emcapplication : Depends: machinekit-hal (= 0.4.20868-1.gitc2e248500~buster) but 0.4.21020-1.git941bffc90~buster is to be installed
              Recommends: linuxcnc-doc-en but it is not installable or
                          linuxcnc-doc but it is not installable
              Recommends: machinekit-hal-dev (= 0.4.20868-1.gitc2e248500~buster) but it is not going to be installed

@jallwine
Copy link
Author

Ok, after manually installing those specific versions of machinekit-hal and machinekit-hal-dev, I was able to start LinuxCNC and the idle time seems to have improved by a couple percent. Don't see exactly where the improvements are, probably miscellaneous lower CPU usage python tasks. rtapi, milltask, and halui still seem be about the same and seem to be the main performance hit.

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

No branches or pull requests

2 participants