Utilizing all cores on Raspberry Pi 3

Utilizing all cores on Raspberry Pi 3

I was wondering if there is a simple way to "turn on" all 100% of the CPU so that I can run processes faster (such as python calculations).

1) Is this possible?

2) Is there an easy way to revert back to normal?

3) Is there a way to use less CPU if desired?

I'm thinking of a command line interaction like:

pi@raspberry:~ $ sudo turnOnFourCores python run.py



c&p - looking for answers ::


This is not how CPUs work... at all.

As it currently stands, your CPU is perfectly capable of running at 100% usage, assuming that it's not being throttled due to temperature related issues at 80 degrees Celsius or more. That being said, you don't (generally) want to see your CPU pegged at 100%. If you're routinely at 100% CPU utilization, you likely have too much for your processor to handle. This will cause stuttering and a generally unhappy user experience.

To compare with something more physical, your CPU utilization is a lot like a car. The car is likely capable of going 100 mph, but there's a good chance your speedometer reads something significantly under that. When in town, you may never be able to get about 25 mph. That doesn't however change that the car can go 100 mph. You simply haven't pushed on the accelerator hard enough.

If you simply make the RPi do more things (push more on the accelerator), you'll see the CPU utilization figure go up. For example, watch the CPU utilization when you run the command yes in a terminal window (Remember that ctrl+c ends terminal commands). This will increase your CPU by 25% as it maxes out one of your four CPU cores.

Utilizing all cores on Raspberry Pi 3



c&p - looking for answers ::

I think OP might not fully understand the concepts of multi-core/multi-thread programming and how difficult to fully utilize 100% of multi-core unless the algorithm can be easily made into an embarrassingly parallel problem.

For more info, you can read more about the well known article title "The Free Lunch Is Over" http://www.gotw.ca/publications/concurrency-ddj.htm


c&p - looking for answers ::

No comments:

Post a Comment

Note: only a member of this blog may post a comment.