ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

MicroSD Read/Write Speed Factor in ROS / RPi Performance?

asked 2017-01-11 10:29:36 -0500

tommytwoeyes gravatar image

I'm sure I/O speed is a factor, of course; but I'm trying to determine if the difference in Micro SD card Class (used to designate write speed only), say Class 4 vs Class 10, would have a significant impact (such as to be an impede robot operation) on ROS performance. I'm sure ROS does some writing, but from what (little) I know, it seems most I/O is conducted over a network. I'm not sure what a ballpark ratio of reading to writing during ROS runtime might be.

Does anyone know if saving a few bucks by buying a Class 4 or Class 6 MicroSD card would be a mistake? Some people say Class 4 is actually faster in applications with a high read-to-write ratio, because the faster write speed of the later Class 10 comes at the cost of slower read speeds. I don't know if that's true or accurate; sounds a bit unlikely to me.


edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2017-01-11 16:39:22 -0500

tfoote gravatar image

This is going to completely depend on your application and how you use ROS. If you're logging bag files onto the uSD card write speed will be a large factor. Read speed can greatly affect your overall system performance, boot up time etc. Many ROS nodes don't have significant disk IO but the only guidance I can give is to estimate your IO load for each node and add it up. But in reality you won't know until you try it for your specific application.

edit flag offensive delete link more


@tfoote Thanks! I'm barely past the beginner stage in my ROS experience, so any packages I build for my Wild Thumper-based, rover-type robot will be quite rudimentary for some time, I'm sure. I may log bag files for debugging. Can I ask: if you were in my shoes, doing nothing more intense with ROS

tommytwoeyes gravatar image tommytwoeyes  ( 2017-01-11 17:14:27 -0500 )edit

@tfoote than following the tutorials, a book or two; DC motor controller & servo the only actuators; ultrasonic distance sensor or two, would you think an 8GB Class SD card would be adequate? I'll upgrade later; I'm just really eager to get started, but on a very tight student budget. Thanks again!

tommytwoeyes gravatar image tommytwoeyes  ( 2017-01-11 17:16:17 -0500 )edit

Certainly if you have one in hand, start with that. At some point you may find it's limiting you and then you can choose how much to upgrade.

tfoote gravatar image tfoote  ( 2017-01-11 17:33:29 -0500 )edit

@tfoote: what about read performance and the impact on rospkg crawling / caching? I'm not sure, but I seem to remember questions about how to disable as much as possible those parts of the infrastructure to reduce node startup time and IO overhead.

gvdhoorn gravatar image gvdhoorn  ( 2017-01-11 17:34:02 -0500 )edit

If you're compiling on your SD card, the read and write speed has a moderate impact on the build time too. I usually spend the extra $ on a Class 10 or Class UHS-I card

ahendrix gravatar image ahendrix  ( 2017-01-11 18:19:27 -0500 )edit

@gvdhoorn Not sure how much credibility to give this, but a couple posts on the RPi forum and Adafruit said the I/O rate designated by the SD card "Class" denotes only write speed, and that write speed is inversely proportional to read speed; e.g. Class 10 card may not read as quickly as Class 6

tommytwoeyes gravatar image tommytwoeyes  ( 2017-01-11 18:47:31 -0500 )edit

@ahendrix Based on all the comments and replies, it sounds like it's worth it for sure. I'm now beginning to think the reason I had so much trouble getting ROS working properly on my Pi 2 was because of the Class 4 card I was using. Thanks everyone.

tommytwoeyes gravatar image tommytwoeyes  ( 2017-01-11 19:07:06 -0500 )edit

answered 2017-01-12 00:04:34 -0500

Humpelstilzchen gravatar image

updated 2017-01-12 00:05:48 -0500

If you buy the rpi3, also buy a class 10/UHS 1, all lower speeds are wasted on a quad core Cortex-A53. I recommend san disk ultra or extreme.

When developing you will need to do lots of r/w operations like opening a configuration file in an editor, writing this file in the editor etc. With slower SD-cards all these will take longer, and you will want to change your files a lot.

As for the read/write/class-speeds, do not take them seriously. Search the internet for benchmarks instead. Most vendors define the speed for sequential write or read, that is e.g. writing e.g. a video block after block. On a computer (rpi3) you do mainly random read/writes: Read a file from /etc, next a lib from /lib, which are located in different locations of the sd.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2017-01-11 10:29:36 -0500

Seen: 362 times

Last updated: Jan 12 '17