zaal3595
Posts: 1
Joined: Tue Oct 10, 2017 9:09 pm

Processing Capacity of Raspberry Pi 3 Model B

Tue Oct 10, 2017 11:22 pm

Hello Pi users,

I am uncertain of the Raspberry Pi 3 model B's processing capability.

I will be reading and writing:
1. 8 8-byte floats every second
2. a 5 megapixel image every 10 seconds
3. data will be written to 3.0 USB

PID control system at once every 30 seconds

Then, I will be performing a measurement scan.
1. Reading 4 8-byte float every .1 seconds
2. Compute 3 numbers
a. 6 ADD, 1 SUB, 1 DIV
b. 6 ADD, 1 SUB, 1 DIV
c. 2 MUL, 1 ADD, 1 SQRT

1 PID controller at .1 secs with these numbers

Read and Write: 10 kilobytes per second

I see possible concurrency issues. But a team partner and our adviser seem to think the quad core 64-bit ARM cortex at 1.2 GHz could handle all this reads and writes and computation. Could we achieve the control rates prescribed above or what would some estimates be?

Thanks for your opinion and time!

User avatar
rpdom
Posts: 11865
Joined: Sun May 06, 2012 5:17 am
Location: Essex, UK

Re: Processing Capacity of Raspberry Pi 3 Model B

Wed Oct 11, 2017 4:24 am

That should be trivial to do on the Pi 3 running Raspbian with Python or even C.

By the way you've worded the questions it look like you're thinking at a lower level than you need to. The Pi is a moderately powerful computer, not a microcontroller like an Arduino.

For example, you said:
zaal3595 wrote:
Tue Oct 10, 2017 11:22 pm
3. data will be written to 3.0 USB
Written to what? A memory stick? Hard disk? Not another computer because the Pi's USB runs in Host mode, not Client. Other options to send to another computer are via network of course.

You can run multiple tasks, so the taking of the pictures could be run by one program and the taking and processing readings by another one.

Where would you be reading the data from? What sort of device and how does it connect? I2C is good, parallel connections can be done via GPIO, but will take a little bit of coding.

User avatar
FTrevorGowen
Forum Moderator
Forum Moderator
Posts: 4152
Joined: Mon Mar 04, 2013 6:12 pm
Location: Bristol, U.K.
Contact: Website

Re: Processing Capacity of Raspberry Pi 3 Model B

Wed Oct 11, 2017 8:53 am

rpdom wrote: ...
By the way you've worded the questions it look like you're thinking at a lower level than you need to. The Pi is a moderately powerful computer, not a microcontroller like an Arduino.
For example, you said:
zaal3595 wrote:
Tue Oct 10, 2017 11:22 pm
3. data will be written to 3.0 USB
Written to what? A memory stick? Hard disk? Not another computer because the Pi's USB runs in Host mode, not Client. Other options to send to another computer are via network of course.
You can run multiple tasks, so the taking of the pictures could be run by one program and the taking and processing readings by another one.
Where would you be reading the data from? What sort of device and how does it connect? I2C is good, parallel connections can be done via GPIO, but will take a little bit of coding.
+1 and I would add that the Pi's USB ports are USB 2.0 (bandwidth shared with the wired ethernet network) so there's little (or nothing) to be gained by using a USB 3.0 memory stick. I would not write/save data to the main uSDHC card (on which all the O.S. & programs will reside) - for my wiki/webpages I use a 32GB USB 2.0 flash drive.
Trev.
Usually running Raspbian Jessie on up to 9 of 13 Pi's (an A, B1, B2, B+, P2B, 3xP0, P0W) and Stretch on my P3B, B+, A+ and a B2. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 18216
Joined: Sat Jul 30, 2011 7:41 pm

Re: Processing Capacity of Raspberry Pi 3 Model B

Wed Oct 11, 2017 8:55 am

The Pi3 is a quad core ARM53 running at 1.2GHz, that is a lot of processing power!
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Please direct all questions to the forum, I do not do support via PM.

ghans
Posts: 7441
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Processing Capacity of Raspberry Pi 3 Model B

Wed Oct 11, 2017 9:00 am

I just want to congratulate OP to a first post where the problem has been specified with hard unambigous numbers. Most people omit this information.

The Pi only support USB 2.0 , USB 3.0 devices may work due to backward compatibility but only with reduced speed.

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

User avatar
OutoftheBOTS
Posts: 442
Joined: Tue Aug 01, 2017 10:06 am

Re: Processing Capacity of Raspberry Pi 3 Model B

Fri Oct 13, 2017 5:23 am

I will be reading and writing:
1. 8 8-byte floats every second
2. a 5 megapixel image every 10 seconds
3. data will be written to 3.0 USB

PID control system at once every 30 seconds

Then, I will be performing a measurement scan.
1. Reading 4 8-byte float every .1 seconds
2. Compute 3 numbers
a. 6 ADD, 1 SUB, 1 DIV
b. 6 ADD, 1 SUB, 1 DIV
c. 2 MUL, 1 ADD, 1 SQRT

1 PID controller at .1 secs with these numbers

Read and Write: 10 kilobytes per second
You need to understand the difference between computing and I/O busing. Nearly everything you have described isn't processing but rather I/O busing it so even a super slow computer from the 80's is probably capable of doing the processing you want, on the other hand your wanting to move around a reasonable amount of data. The biggest chunk of data being the 5 megapixel image every 10 seconds. A 5 mega pixel is 2580 x 2048 x 3bytes/pixel for a total of over 15MB of raw data and this gets moved twice, once from the camera memory to the RPi memory then from the RPi memory to the USB.

When I want to optimize my programs I time each part of the process to see what is bogging down and what isn't even being a drop in the ocean. I will normally break the program apart into lots of little parts then time each part. For example just have a small program that reads then image from the camera then writes it to the usb and just have it looping around for say 30 secs. Have a counter that counts how many cycles it did in the 30 secs then divide the counter by the 30 secs and this will give you the completed processes/sec

Return to “Advanced users”

Who is online

Users browsing this forum: No registered users and 19 guests