Allocate more CPU to Project/Programs SBC4

General PhidgetSBC Discussion.
Post Reply
llarkin
Fresh meat
Posts: 2
Joined: Sat Mar 19, 2022 4:58 pm
Contact:

Allocate more CPU to Project/Programs SBC4

Post by llarkin »

Hello,

I am utilizing your SBC4 as a MQTT client device for supplemental command and control of an AGV. It essentially reads incoming traffic it is subscribed to and pushes that information to a second script that then interprets and changes applicable variables the servo controller picks up each loop and commands the AGV accordingly; IE turn left, turn right, spin, stop, etc. While I am sure my code needs some optimization I was also wondering if you could suggest a means to give the Project and its subsequent programs more CPU. Is LINIX nice() and renice() a possibility? IF SO what root and directory would I target? Do you have an alternative less "brute" force method?

Regards,

Liam Larkin
FRED Automation Inc.
llarkin
Fresh meat
Posts: 2
Joined: Sat Mar 19, 2022 4:58 pm
Contact:

Re: Allocate more CPU to Project/Programs SBC4

Post by llarkin »

######UPDATE######
I was able to nice my .py via the putty linux terminal. At first I set it to -20 and a bit to much slowed everything else way down eventually the processor would puke. Anyway backed that off -10 and it appears to be able to handle that as well as other process's. Looking at a live $top its eating up about 80% of the CPU. Still looking for better suggestions if anyone has any. Also so you know my code is written in python and as said before two loops run 1 that handles the broker MQTT side and the other that handles the servo communication via serial.

Still seeing a buildup of messages that the processor has a tough time dealing with
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests