1
\$\begingroup\$

It was a vague title, let me explain:) Some cameras for example Nikon D-610 and D-810 that I have used have two slots for memory cards and in settings you can tell it to use Slot2 as a mirror for the card in slot1 , so whatever shot you take on Slot1, it also saves it on card in slot2. One thing came to my mind was that what is the "Source" for Slot2? Does it copy from Slot1 to Slot2 or camera writes at the same time to both slots? Reason for asking about this is that I want to see if it is a good idea to do mirroring option as a backup solution in case files on card1 in slot1 get corrupted, I will still have correct file on card2 in slot2 but if the corrupted file from slot1 is getting overwritten to slot2 then it is garbage in, garbage out.

\$\endgroup\$

2 Answers 2

4
\$\begingroup\$

Yes, it is a good idea to use the configuration you describe for mirroring/backup.

The general algorithm is (unfortunately) in many models single-threaded in its storage part (IOW from step3 onward) and is as follows:

  1. The picture is shot and is placed in camera's internal buffer in a queue structure.
  2. The storage's subsystem I/O listener checks if the buffer's queue is (not) empty and if it isn't, it sets a picture pointer P0 to the first item (picture) from there
  3. The picture referenced by P0 is saved to Slot1 with the format specified
  4. When the step 3 finishes successfully - check the settings for backup/mirroring. If the appropriate setting is "ON", then save on Slot2 the picture referenced by P0 with the appropriate format
  5. If the step 4 finishes successfully then mark the memory space referenced by P0 (our picture) as free. The camera 'sees' that the picture was 'deleted' from buffer.

The I/O (storage) layer is single-threaded - or, using your words, "the camera does NOT write at the same time on cards but sequentially" because it is easier to implement it like this (no need for inter-thread communications, listeners, more complex/expensive hardware etc.)

Of course, there are cameras which have multi-threaded I/O - or, using your words "the camera writes at the same time on both cards" - like my Canon 5D3 and, I presume, other top-of-the line Canon models (1DX, 7D2 etc.). Dunno about Nikon. For a multi-threaded approach the steps 3 and 4 above are executed simultaneously while in step 5 we have a listening thread which waits for 3 and 4 to signal their success in order to mark the space referenced by P0 as free and signal 'Ok, Terminated.' to the camera's main processing loop.

In any case, the second slot is written from buffer and not read from S1 not only because of readability/reliability factors as you noted but also because of speed considerations: camera's internal buffers are in fact very very quick cache memory chips which are many orders of magnitude faster than any CF or SD storage chain (controller+card) available.

\$\endgroup\$
3
  • \$\begingroup\$ I can't speak for Canons - if that's how they do it that would seem a bit daft - it wouldn't make sense to copy from main memory into a cache when the D600 (for example) sports a DDR3 main memory that can easily satisfy the needs of a dual channel UHS-I controller at full-bore and receive data from the Expeed without breaking much of a sweat... If they wanted to - though it looks like from another answer that they choose not to. \$\endgroup\$ Commented Aug 25, 2015 at 9:00
  • \$\begingroup\$ But if they did that James, then the camera would have to wait to take the next frame until the previous read operation from the main memory had been completed. And the bottleneck isn't in the difference between the main memory read speed and the buffer memory write speed, it is the memory card write speed (unless they are willing to make a camera not compatible with the vast majority of SD cards in the wild, which are slower than dual channel UHS-I) \$\endgroup\$
    – Michael C
    Commented Aug 25, 2015 at 18:12
  • \$\begingroup\$ Perhaps I wasn't clear: I didn't say that camera copies the image "from main memory into a cache" but FOR the main memory it uses memory chips which are speed comparable with cache chips. Perhaps my use of therm 'buffer' for Main Memory is a little bit misleading... \$\endgroup\$ Commented Aug 26, 2015 at 7:07
1
\$\begingroup\$

I'm guessing, I don't know the internals, but stop and think about it...

The camera clearly already has the file buffered in its memory, from which it writes the first card. Why would it would it take the time to read it back (to write the second card), when it already has it buffered in memory? It is possibly multi-threaded, and writes both at the same time? Things like focus or metering and continuous shutter are surely multi-threaded.

EDIT: I just checked my D800, and the write time is about twice as long with two cards. But not three times as long.

\$\endgroup\$
1
  • \$\begingroup\$ The concept of threading is really rather moot in embedded systems as DSLR's have multiple discrete processors optimised for certain tasks but the result from your testing is useful information. \$\endgroup\$ Commented Aug 25, 2015 at 9:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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