1

Specs: RPi 2, not overclocked, did rpi-upgrade, using ssh to run vnc on laptop.

CPU cores.

Ram usage via free -h -s 1

I've got a face tracking algorithm that is working fine on the Pi (and my PC). Problem is it has a lag of about 2 seconds on the Pi which is workable but not great. I'm running the program out of the lxterminal via python (2).

When the program is running, /sudo top shows the program using 99.2% CPU and the percentage on the top right shows 25%.

Ram usage via /free shows a usage of 229/927MB when the program is on and 192/927MB when the program is off.

Is there some way I can speed it up?

  • Are all the cores busy? In top press 1 to get stats for each core. – joan Mar 17 '15 at 17:08
  • @joan, I've edited the screenshot, I don't know how to interpret this data. – azazelspeaks Mar 17 '15 at 17:17
  • It looks like all the work is being done by one core (cpu2). The rest appear pretty much idle (central column). I suppose the question becomes can openCV be told to make use of the other cores. I don't know the answer to that. – joan Mar 17 '15 at 17:26
  • @joan I found information about the RAM as well, does that help in any way? Also, the cpu usage was dynamically changing amoung all 4 cores. – azazelspeaks Mar 17 '15 at 17:27
  • 1
    I don't know how openCV works. top shows that almost all of the RAM appears to be dedicated to the CPU. I'd be tempted to at least try allocating half to the GPU (top shows the RAM isn't being used). It probably won't make any difference but there is no harm in finding out. – joan Mar 17 '15 at 17:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.