SD info and benchmarks (was Re: EOS M3 porting) - page 2 - DryOS Development - CHDK Forum

SD info and benchmarks (was Re: EOS M3 porting)

  • 62 Replies
  • 23373 Views
*

Offline Ant

  • ****
  • 473
Re: SD info and benchmarks (was Re: EOS M3 porting)
« Reply #10 on: 11 / April / 2017, 02:30:34 »
Advertisements
Continuous shooting:
80D: 7 FPS
M3:  4.2 FPS
RAM size
80D: 1024 MB
M3:  512 MB

*

Offline srsa_4c

  • ******
  • 4396
Re: eos M10 port
« Reply #11 on: 11 / April / 2017, 13:03:15 »
I tried Ant's trick, calling the firmware's SD card information function.
Had to actually add the upper level routine back (it's missing from the firmware), and use console redirection
kingston 16gb uhs-1 u1 45w/90r, looks like this
Code: [Select]
MEDIA_TYPE_SD:HighCapacity Support

--------------CID Information--------------
Manufacturer ID       = 0x41
OEM/Application ID    = 0x3432
Product name          = 'SD16G'
Product revision      = '3.0'
Product Serial Number = 0x005*****
Manufacturing date    = '2000/06'
--------------CSD Information--------------
CSD_STRUCTURE = 1
TAAC = 14
NSAC = 0
max. data transfer rate = 50
CCC:card common classes=1461
READ_BL_PARTIAL=0
read block misalignment = 0,  write block misalignment = 0
DSR implement=0
C_SIZE = 29695
TotalSectors = 30408704
TotalSectors(from CSD) = 0x1D00000
ERASE_BLK_EN = 1
ERASE_SCT_SIZE=127, SectorSize = 128
BlockLength = 512
EraseSize = 128
WP_GRP_SIZE = 0
WP_GRP_ENABLE = 0
R2W_FACTOR=2
WRITE_BL_LEN=9
WRITE_BL_PARTIAL=0
copy flag(OTP)=0
Permanent Write Protection=0
Temporary Write Protection=0
File Format Group=0  File Format=0:Hard disk-like file system with partition table
CRC=93
--------------SCR Register--------------
SCR_STRUCTURE = 00h
SD_SPEC_VERS = 02h
DATA_START_AFTER_ERASE = 00h
SD_SECURITY = 03h
SD_BUS_WIDTH = 05h
SD_SPEC3 = 1h
CMD_SUPPORT = 2h
--------------SD Status--------------
DAT_BUS_WIDTH = 2
SECURED_MODE  = 0
SD_CARD_TYPE  = 0x0000
SIZE_OF_PROTECTED_AREA = 0x04000000
SPEED_CLASS   = 0x04 ==> CLASS(10)
PERFORMANCE_MOVE  = 0x00
AU_SIZE       = 0x9
UNIT_OF_ERASE_AU  = 0x0200
ERASE_TIMEOUT = 42
ERASE_OFFSET  = 0x2
EraseSize = 0x2000
UHS_SpeedGrade = 1h (10MB/sec and above)
UHS_AuSize = Fh (64MB)
 80 00 00 00 04 00 00 00 04 00 90 02 00 AA 1F 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

-------------------------------------------

sandisk ultra uhs-1 u1 48mb/s (looks almost like Ant's card, but has 48MB/s written on it)
Code: [Select]
MEDIA_TYPE_SD:HighCapacity Support

--------------CID Information--------------
Manufacturer ID       = 0x03
OEM/Application ID    = 0x5344
Product name          = 'SL16G'
Product revision      = '8.0'
Product Serial Number = 0x84B*****
Manufacturing date    = '2000/03'
--------------CSD Information--------------
CSD_STRUCTURE = 1
TAAC = 14
NSAC = 0
max. data transfer rate = 50
CCC:card common classes=1461
READ_BL_PARTIAL=0
read block misalignment = 0,  write block misalignment = 0
DSR implement=0
C_SIZE = 30386
TotalSectors = 31116288
TotalSectors(from CSD) = 0x1DACC00
ERASE_BLK_EN = 1
ERASE_SCT_SIZE=127, SectorSize = 128
BlockLength = 512
EraseSize = 128
WP_GRP_SIZE = 0
WP_GRP_ENABLE = 0
R2W_FACTOR=2
WRITE_BL_LEN=9
WRITE_BL_PARTIAL=0
copy flag(OTP)=1
Permanent Write Protection=0
Temporary Write Protection=0
File Format Group=0  File Format=0:Hard disk-like file system with partition table
CRC=9
--------------SCR Register--------------
SCR_STRUCTURE = 00h
SD_SPEC_VERS = 02h
DATA_START_AFTER_ERASE = 00h
SD_SECURITY = 03h
SD_BUS_WIDTH = 05h
SD_SPEC3 = 1h
CMD_SUPPORT = 3h
--------------SD Status--------------
DAT_BUS_WIDTH = 2
SECURED_MODE  = 0
SD_CARD_TYPE  = 0x0000
SIZE_OF_PROTECTED_AREA = 0x04000000
SPEED_CLASS   = 0x04 ==> CLASS(10)
PERFORMANCE_MOVE  = 0x00
AU_SIZE       = 0x9
UNIT_OF_ERASE_AU  = 0x000F
ERASE_TIMEOUT = 1
ERASE_OFFSET  = 0x1
EraseSize = 0x2000
UHS_SpeedGrade = 0h (Less than 10MB/sec)
UHS_AuSize = Ah (8MB)
 80 00 00 00 04 00 00 00 04 00 90 00 0F 05 0A 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

-------------------------------------------
Benchmark speed test remains below ~21MB/s, with both cards.

*

Offline srsa_4c

  • ******
  • 4396
Re: SD info and benchmarks (was Re: EOS M3 porting)
« Reply #12 on: 11 / April / 2017, 13:21:33 »
What's prominently missing from the Canon function's output (tested 2 cards in M10) is this:
"1.8V Support"
AFAIK UHS cards are required to support that (1.8V signal level).

I'm curious how reyalp's card looks like when using this card information function. (function address for g7x 100d is 0x10e7e7a, thumb)
Using CHDK patched with the console redirection patch, I did the following in CHDKPTP in order to get the function's output:
Code: [Select]
con 1> =return call_func_ptr(<card info func address>,0)
2:return:45
con 2> mcamcon

*

Offline Ant

  • ****
  • 473
Re: SD info and benchmarks (was Re: EOS M3 porting)
« Reply #13 on: 11 / April / 2017, 16:25:53 »
"1.8V Support"
AFAIK UHS cards are required to support that (1.8V signal level).

At least support for CMD11 is present in firmware(0x010EEAC8)
Do you have an idea how to get debug messages from this function?

P.S. my another UHS I card (Transcend 200x 30MB/s):
Code: [Select]
MEDIA_TYPE_SD:HighCapacity Support

--------------CID Information--------------
Manufacturer ID       = 0x74
OEM/Application ID    = 0x4A45
Product name          = 'SDC  '
Product revision      = '0.2'
Product Serial Number = 0x49D3A***
Manufacturing date    = '2014/06'
--------------CSD Information--------------
CSD_STRUCTURE = 1
TAAC = 14
NSAC = 0
max. data transfer rate = 50
CCC:card common classes=1461
READ_BL_PARTIAL=0
read block misalignment = 0,  write block misalignment = 0
DSR implement=0
C_SIZE = 60413
TotalSectors = 61863936
TotalSectors(from CSD) = 0x3AFF800
ERASE_BLK_EN = 1
ERASE_SCT_SIZE=127, SectorSize = 128
BlockLength = 512
EraseSize = 128
WP_GRP_SIZE = 0
WP_GRP_ENABLE = 0
R2W_FACTOR=2
WRITE_BL_LEN=9
WRITE_BL_PARTIAL=0
copy flag(OTP)=0
Permanent Write Protection=0
Temporary Write Protection=0
File Format Group=0  File Format=0:Hard disk-like file system with partition table
CRC=23
--------------SCR Register--------------
SCR_STRUCTURE = 00h
SD_SPEC_VERS = 02h
DATA_START_AFTER_ERASE = 00h
SD_SECURITY = 03h
SD_BUS_WIDTH = 05h
SD_SPEC3 = 1h
CMD_SUPPORT = 3h
--------------SD Status--------------
DAT_BUS_WIDTH = 2
SECURED_MODE  = 0
SD_CARD_TYPE  = 0x0000
SIZE_OF_PROTECTED_AREA = 0x05000000
SPEED_CLASS   = 0x04 ==> CLASS(10)
PERFORMANCE_MOVE  = 0x00
AU_SIZE       = 0x9
UNIT_OF_ERASE_AU  = 0x0008
ERASE_TIMEOUT = 4
ERASE_OFFSET  = 0x1
EraseSize = 0x2000
UHS_SpeedGrade = 1h (10MB/sec and above)
UHS_AuSize = 9h (4MB)
 80 00 00 00 05 00 00 00 04 00 90 00 08 11 19 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

-------------------------------------------
The results are:
Card write (RAW):   11430 Kb/s     
Card write (MEM):   17554 Kb/s     
Card write (64k):    9416 Kb/s     
Card read  (64k):   18832 Kb/s
« Last Edit: 11 / April / 2017, 16:46:36 by Ant »


*

Offline srsa_4c

  • ******
  • 4396
Re: SD info and benchmarks (was Re: EOS M3 porting)
« Reply #14 on: 11 / April / 2017, 18:40:24 »
At least support for CMD11 is present in firmware(0x010EEAC8)
Do you have an idea how to get debug messages from this function?
0x010EEAC8 is in RAM, so you can modify it as you like...

*

Offline reyalp

  • ******
  • 13139
Re: SD info and benchmarks (was Re: EOS M3 porting)
« Reply #15 on: 11 / April / 2017, 22:15:46 »
I'm curious how reyalp's card looks like when using this card information function. (function address for g7x 100d is 0x10e7e7a, thumb)
Using CHDK patched with the console redirection patch, I did the following in CHDKPTP in order to get the function's output:
Code: [Select]
con 1> =return call_func_ptr(<card info func address>,0)
2:return:45
con 2> mcamcon
Thanks
Code: [Select]
MEDIA_TYPE_SD:1.8V Support
HighCapacity Support

--------------CID Information--------------
Manufacturer ID       = 0x28
OEM/Application ID    = 0x4245
Product name          = '00000'
Product revision      = '1.0'
Product Serial Number = 0x000049A0
Manufacturing date    = '2015/11'
--------------CSD Information--------------
CSD_STRUCTURE = 1
TAAC = 14
NSAC = 0
max. data transfer rate = 50
CCC:card common classes=1461
READ_BL_PARTIAL=0
read block misalignment = 0,  write block misalignment = 0
DSR implement=0
C_SIZE = 60879
TotalSectors = 62341120
TotalSectors(from CSD) = 0x3B74000
ERASE_BLK_EN = 1
ERASE_SCT_SIZE=127, SectorSize = 128
BlockLength = 512
EraseSize = 128
WP_GRP_SIZE = 0
WP_GRP_ENABLE = 0
R2W_FACTOR=2
WRITE_BL_LEN=9
WRITE_BL_PARTIAL=0
copy flag(OTP)=0
Permanent Write Protection=0
Temporary Write Protection=0
File Format Group=0  File Format=0:Hard disk-like file system with partition table
CRC=42
--------------SCR Register--------------
SCR_STRUCTURE = 00h
SD_SPEC_VERS = 02h
DATA_START_AFTER_ERASE = 01h
SD_SECURITY = 03h
SD_BUS_WIDTH = 05h
SD_SPEC3 = 1h
CMD_SUPPORT = 2h
--------------SD Status--------------
DAT_BUS_WIDTH = 2
SECURED_MODE  = 0
SD_CARD_TYPE  = 0x0000
SIZE_OF_PROTECTED_AREA = 0x05000000
SPEED_CLASS   = 0x04 ==> CLASS(10)
PERFORMANCE_MOVE  = 0x04
AU_SIZE       = 0x9
UNIT_OF_ERASE_AU  = 0x0008
ERASE_TIMEOUT = 2
ERASE_OFFSET  = 0x2
EraseSize = 0x2000
UHS_SpeedGrade = 0h (Less than 10MB/sec)
UHS_AuSize = 9h (4MB)
 80 00 00 00 05 00 00 00 04 04 90 00 08 0A 09 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

-------------------------------------------
I believe the card is https://www.newegg.com/Product/Product.aspx?Item=N82E16820220767

Running the benchmark a few times (current svn) I got results between 23,000 and 35,000 (!)  for both raw and mem write tests.
Don't forget what the H stands for.

*

Offline reyalp

  • ******
  • 13139
Re: SD info and benchmarks (was Re: EOS M3 porting)
« Reply #16 on: 12 / April / 2017, 01:01:50 »
So I tested a bunch of cards I had lying around...

That one patriot card is the only one that shows "MEDIA_TYPE_SD:1.8V Support" and also the only one that benchmarks significantly over 20 MB/s. That I bought this particular cheapo card and used in my g7x for development is pure coincidence.

SD card info output and benchmark results attached. I formatted in camera before  testing (low level for all but the 16gb sandisk). All tests in playback mode.

Cards tested

Patriot LX Series 32GB Class 10 Micro SDHC Model PSF32GMCSHC10UK (the one reported above)
patriot-32g-2015.txt
https://www.newegg.com/Product/Product.aspx?Item=N82E16820220767
RAW 17-35 MB/s
MEM 24-33 MB/s

Patriot LX Pro 32GB microSDHC Model PSF32GMCSHC10BK
patriot-32g-2014.txt
https://www.newegg.com/Product/Product.aspx?Item=N82E16820220878
Looks exactly like the previous card, but...
RAW 14-16 MB/s
MEM 13-16 MB/s
On SX160, this card gave
RAW 11 MB/s
MEM 6-10 MB/s

16 GB Sandisk Ultra Class 10 UHS
sandisk-ultra-16g.txt
https://www.amazon.com/gp/product/B009QZH7D8/ref=oh_aui_search_detailpage?ie=UTF8&psc=1
RAW 9-18 MB/s
MEM 7-13 MB/s

16 GB Team 16GB microSDHC UHS-I/U1 Class 10
team-16g-2016.txt
https://www.newegg.com/Product/Product.aspx?Item=N82E16820313308
RAW 6-11 MB/s
MEM 4-15 MB/s

Wintec Filemate Professional Plus 32GB Model 3FMSD32GBU1PI-R (purchased in 2013)
wintec-32g-2012.txt
https://www.newegg.com/Product/Product.aspx?Item=N82E16820161571
RAW 18-21 MB/s
MEM 16-20 MB/s

Wintec Filemate Professional Plus 32GB Model 3FMSD32GBU1PI-R (purchased in 2015)
wintec-32g-2015.txt
(same newegg item as above, but probably different hardware based on sd info)
RAW 20 MB/s
MEM 20 MB/s
On elph130, this card gave
RAW 11-13 MB/s
MEM 13-14 MB/s


Observations:
I expected cheapo "UHS-1" cards would probably all be about the same, and that name brands like Sandisk would probably be better than off brand ones. Neither seems to be correct.

The spread in the benchmark numbers is alarmingly large. I'm not too confident that this is a very real measure, but I expect they are broadly indicative. There doesn't seem to be a correlation with how much the card has been used: Both the 16 GB cards were basically unused, while wintec-32g-2015 has been used for timelapse.
« Last Edit: 12 / April / 2017, 13:16:04 by reyalp »
Don't forget what the H stands for.

*

Offline c_joerg

  • *****
  • 1068
Re: SD info and benchmarks (was Re: EOS M3 porting)
« Reply #17 on: 12 / April / 2017, 03:53:02 »
The spread in the benchmark numbers is alarmingly large. I'm not too confident that this is a very real measure, but I expect they are broadly indicative. There doesn't seem to be a correlation with how much the card has been used: Both the 16 GB cards were basically unused, while wintec-32g-2015 has been used for timelapse.

No matter which of my cameras I use or which SD I use. I always have a very large variance of results in the benchmark test.
In my S110 I get at RAW write mostly 21MB / s. Sometimes only 7MB or 12MB ...
M100 100a, M3 101a, G9x II (1.00c), 2*G1x (101a,100e), S110 (103a), SX50 (100c), SX230 (101a), S45,
Flickr https://www.flickr.com/photos/136329431@N06/albums
YouTube https://www.youtube.com/channel/UCrTH0tHy9OYTVDzWIvXEMlw/videos?shelf_id=0&view=0&sort=dd


*

Offline Ant

  • ****
  • 473
Re: SD info and benchmarks (was Re: EOS M3 porting)
« Reply #18 on: 12 / April / 2017, 06:52:20 »
The spread in the benchmark numbers is alarmingly large. I'm not too confident that this is a very real measure, but I expect they are broadly indicative.
At least results in playback mode are better.

*

Offline reyalp

  • ******
  • 13139
Re: SD info and benchmarks (was Re: EOS M3 porting)
« Reply #19 on: 12 / April / 2017, 13:50:04 »
At least results in playback mode are better.
FWIW, all the tests I did above were in playback mode.

A more real world test would be to shoot say 10 CHDK raws (not DNG) and measure the write time. The "show raw save time" records it in the console, which you can display later in misc/ display last console.

On g7x in continuous mode, I get between 1.2 and 1.9 and average around 1.4 seconds for a 30 MB raw (=~21 MB/s). Most of the variation seems to happen in the first few shots.
Canon raw is notably faster (~1 FPS shooting), likely because it uses lossless compression which typically results in < 20 MB files.
Don't forget what the H stands for.