TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: WLFRAED@IX.NETCOM.COM
from: JAN PANTELTJE
date: 2018-07-23 06:55:00
subject: Re: Create NDIF disk imag

On a sunny day (Sun, 22 Jul 2018 17:43:33 -0400) it happened Dennis Lee Bieber
 wrote in :

>        I wouldn't consider read timings to be of significance.

Do not move the goal posts.

First, to MAKE a backup you need to read the card.
~ # dd if=/dev/sdc of=/dev/zero
16003072+0 records in
16003072+0 records out
8193572864 bytes (8.2 GB) copied, 472.769 s, 17.3 MB/s
dd if=/dev/sdc of=/dev/zero  4.94s user 24.64s system 6% cpu 7:52.81 total

~ # dd if=/dev/sdc of=/dev/zero bs=1M
7814+0 records in
7814+0 records out
8193572864 bytes (8.2 GB) copied, 474.15 s, 17.3 MB/s
dd if=/dev/sdc of=/dev/zero bs=1M  0.07s user 16.86s system 3% cpu 7:54.45
total

No difference whatsoever, set by the card's specified read speed
if on a good system like this one, with nothing else running:
~ # hdparm -t /dev/sdc
/dev/sdc:
 Timing buffered disk reads:  50 MB in  3.03 seconds =  16.48 MB/sec

That read happens (if things are done right) much more often than a 'restore'
where you write the backup back to the card..
The restore may even never happen if things are done right.

On the write timing issue, it will very likely just be limited by he specified
card write speed,
if it is a half way decent card it will take care of the allocation.



>As has been
>mentioned, SD cards -- to write to a block -- have to have an erased (all
>1s) block available. However, erasure takes place in allocation units which
>are larger than file-system blocks. So before a "random" write can occur,
>the card has to erase a complete allocation unit, copy over data "before"
>the block to be written, write the new block, and if the I/O now shifts to
>another random block, copy the rest of the old allocation unit into the new
>one -- then put the old allocation unit into the free list.
>
>        Class-10 cards are rated for streaming a single (video) file to a
>freshly formatted card, and may be totally trashed by small random (photo
>creation/deletion) files. Oh, and that is FAT file system -- just the open
>file and the open FAT area, for two allocation units at a time.

Straw man
Note that writing an image back to a card is totally unrelated to what sort of
filesystem is in use.


>        The better cards (and most Class-2/4/6) are capable of maintaining
>(buffering) 4-8 open allocation units, which much better supports random
>I/O and usage of non-FAT (eg; journal ling) file systems. Things like
>alternating writes to two files -- both files can be in separate open
>allocation units without triggering unit closure, erasure, rewrite...

Well, I recently bought let me see,
MB-MC32DA/EU Samsung Evo+ 32 GB Micro SD class 10 met adapter
That was in March, is used in my drone, and in my video camera.
read speed up to 80 MB/sec.
write speed up top  20 MB/sec..
UHS-I-speed class 1 (U1), class 10

https://www.samsung.com/nl/memory-storage/evo-plus-microsd-card-with-sd-adapter
/MB-MC32DAEU/
Best ones I could find.


I have some older 8 GB and 16 GB cards in the raspis,
but I am sure as I just went for the best in those days
that those have a decent control chip.

Also have a bunch (from ebay) 2 GB cards for things that do not support > 2 GB,
or do not need that and the speed, such as auto-pilot drone:
 http://panteltje.com/panteltje/quadcopter/index.html
old WiFi webserver, etc.

And of course I wrote the software to read / write to some of those cards
myself in asm actually
All sector based... :-)

You can use hdparm to get some info on the cards you have.
Not sure you can still get older cards, the old 2 GB ones I got from ebay ware
almost more expensive
than the new fast ones.. getting rare for people who do not want to dump old
equipment,
sellers can ask what they want, like for antiques
:-)

OK,

But next time I need to write back a raspi backup image (hope it never happens)
I will show the write timings with - and without bs=1M.

:-)

--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.