The CPU load is too high!
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?
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?
What did you expect from your program?
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.
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.
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.
Elon, why is the assumption that RevPi platform is the problem and not the code?
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?
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.