0

I am trying to quickly download images from a USB digital camera to a hard drive disk attached by USB to my raspberry pi. I want to minimize the time the camera needs to be connected to the pi during the download.

At the moment it seems to copy over to the hard drive at a rate of about 3-5MB/s depending on image size (I use gphoto2 for grabbing the images off the camera), which is OK but a little slow. I wanted to check what the speed was to copy just to the Pi's RAM, at which point I can disconnect the camera and later on move the files from the RAM to the hard drive at leisure.

Could anyone advise how I might be able to copy to RAM? I couldn't find a clear explanation anywhere...

Thanks for your help!

  • It might help if we knew what the goal of this was? Why is minimizing the time the camera is connected etc. – Steve Robillard Jul 4 '14 at 13:49
  • for a project taking a long stream of photos (more than I can fit on an SD card) in periodic bursts, where the time between bursts (when I can transfer the data) needs to be minimized. – LPlates Jul 4 '14 at 14:25
  • Just note that the Pi has limited RAM. A few photos is okay, but you can't fit an entire SD card. – Gerben Jul 4 '14 at 19:56
2

One method would be to create a RAM disk.

I use one simply to save wear and tear on the SD card.

Create a mount point on the SD card, e.g. /ram

mkdir /ram

The following command allocates a 100 MB ram disk and mounts it at /ram

sudo mount -osize=100m tmpfs /ram -t tmpfs

You could add the command (without the sudo) to the root crontab.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.