Elon Sha
Topic Author
Posts: 16
Joined: 17 Aug 2020, 11:40

The CPU load is too high!

04 Nov 2020, 09:23

I use RevPi Core 3+ in a project. I use python to write my program file. However, when I execute the program, Python's CPU usage rate is close to 70% and the CPU load rate is as high as 6. The RevPi Core 3+ has a quad-core CPU. So if the cpu load average is less than 4, it is acceptable. But six is too high and the program crashes quickly. The cost of rewriting code in C or C++ is high. Besides, 8MB of data is exchanged in the processes per second. Is there any good solutions?
 
User avatar
dirk
KUNBUS
Posts: 1421
Joined: 15 Dec 2016, 13:19

Re: The CPU load is too high!

04 Nov 2020, 17:09

Hi Elon, well if you can post your program then maybe we are able to run it and maybe to provide further information.
What did you expect from your program?
 
Elon Sha
Topic Author
Posts: 16
Joined: 17 Aug 2020, 11:40

Re: The CPU load is too high!

05 Nov 2020, 02:40

This is a project of our customer, so it is not convenient to show the source code. Because the programs they wrote took up too much CPU, the system quickly crashed. We also asked customers to optimize the program, but it didn't bring much change. In addition to optimizing the program, are there other ways to help solve this problem?

If this project can be successfully implemented on RevPi, they will have more demand for RevPi in the future. If not, they may consider other options. I will continue to communicate and hope to get more information.
 
Elon Sha
Topic Author
Posts: 16
Joined: 17 Aug 2020, 11:40

Re: The CPU load is too high!

05 Nov 2020, 09:04

Customers are reluctant to provide source code because it is a trade secret. However, their project using RevPi is a handling robot for smart storage.
 
User avatar
dirk
KUNBUS
Posts: 1421
Joined: 15 Dec 2016, 13:19

Re: The CPU load is too high!

05 Nov 2020, 15:10

Elon, why is the assumption that RevPi platform is the problem and not the code?
 
Elon Sha
Topic Author
Posts: 16
Joined: 17 Aug 2020, 11:40

Re: The CPU load is too high!

05 Nov 2020, 15:29

I'm sorry to bring you such a misunderstanding. Maybe I didn't express it clearly before. I'm not suspecting that there is a problem with the RevPi platform. The high CPU usage is indeed caused by the code. I just want to know if there is another way to solve this problem besides optimizing the code. Is optimizing the code the only solution?
 
User avatar
dirk
KUNBUS
Posts: 1421
Joined: 15 Dec 2016, 13:19

Re: The CPU load is too high!

17 Nov 2020, 10:10

Hi Elon, well try debugging. Maybe you should work from the other side - what do you want to solve in which time? You can analyze your requirement i.e. run function every 1ms instead of 1us as you don't need it. So you may speed-up factor 1000. And so on.

Who is online

Users browsing this forum: No registered users and 4 guests