Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
My killer optimizations for Gentoo on Raspberry Pi 3 B+.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM
View previous topic :: View next topic  
Author Message
crocket
Guru
Guru


Joined: 29 Apr 2017
Posts: 558

PostPosted: Tue Mar 26, 2019 2:39 am    Post subject: My killer optimizations for Gentoo on Raspberry Pi 3 B+. Reply with quote

Reducing Writes

  • Disable anacron USE flag in cronie because anacron writes to disk. Cronie doesn't write to disk.
  • Don't run an SMTP server because it keeps its states on disk. An SMTP client like msmtp doesn't keep its runtime states on disk.
  • Redirect non-essential writes to RAM through /etc/fstab
    Code:
    tmpfs /tmp tmpfs mode=1777,noatime 0 0
    tmpfs /var/tmp tmpfs mode=1777,noatime 0 0
    tmpfs /var/log tmpfs mode=0755,noatime 0 0
    tmpfs /var/cache tmpfs mode=0755,noatime 0 0
    tmpfs /var/lib/dhcpcd tmpfs mode=0755,noatime 0 0
    tmpfs /var/lib/ntp tmpfs mode=0755,uid=ntp,gid=ntp,noatime 0 0
    tmpfs /var/lib/misc tmpfs mode=0755,noatime 0 0
    tmpfs /var/lib/run tmpfs mode=0755,noatime 0 0
    tmpfs /var/lib/syslog-ng tmpfs mode=0700,noatime 0 0

  • Set sync=disabled and logbias=throughput in the root ZFS dataset so that ZIL is disabled. ZIL doubles write amplification factor.
  • Keep /usr/portage empty on raspberry pi because updating portage tree on raspberry pi consumes precious microSD write cycles. I can build everything in an arm64 chroot.
  • You can batch writes by updating everything in a ZFS arm64 chroot, taking a ZFS snapshot, and sending the ZFS snapshot to Raspberry Pi.
  • Set SAVE_ON_STOP="no" in /etc/conf.d/alsasound to prevent /etc/init.d/alsasound from writing to disk during shutdown.
  • Disable less history logging in ~/.bash_profile. With loksh, it's ~/.profile
    Code:
    export LESSHISTFILE="-"

  • Disable bash history logging in ~/.bashrc. With loksh, you don't need to unset HISTFILE.
    Code:
    unset HISTFILE

  • Disable shada and swapfile in ~/.config/nvim/init.vim
    Code:
    set shada=""
    set noswapfile


Other optimizations

  • /etc/local.d/turn-off-wifi-power-saving.start disables wifi power saving which can lead to frequent WiFi disconnections. Install net-wireless/iw to get iw.
    Code:
    #!/bin/sh

    iw dev wlan0 set power_save off

  • Use net-misc/ntp instead of net-misc/openntpd
    • Because Raspberry Pi doesn't save time in hardware clock, time needs to be set after boot. net-misc/openntpd waits for only 15 seconds for an internet connection. After 15 seconds, openntpd fails to set the time automatically forever. It can often take more than 15 seconds for dhcpcd to fetch an IP address. On the other hand, net-misc/ntp waits for an internet connection in the background and sets the time properly in a few minutes.

  • /boot/cmdline.txt
    Code:
    rootwait rootfstype=zfs root=ZFS=rpi/ROOT/gentoo zfs.zfs_arc_max=67108864 dwc_otg.lpm_enable=0 console=tty1 console=ttyAMA0,115200

    • zfs.zfs_arc_max=67108864 limits the maximum size of ZFS ARC to 64MB because Raspberry Pi 3 B+ has only 1GB of RAM.
    • dwc_otg.lpm_enable=0 disables USB controller power management which can lead to unexpected problems.
    • console=tty1 console=ttyAMA0,115200 displays kernel messages on both tty1 and UART console and shows OpenRC messages only on UART console. UART console is a lot more convenient than an HDMI cable and a USB keyboard.

  • /boot/config.txt
    Code:
    # have a properly sized image
    disable_overscan=1

    # Disable sound over HDMI
    hdmi_drive=2

    # gpu_mem is for closed-source driver only; since we are only using the
    # open-source driver here, set low
    gpu_mem=16

    initramfs initramfs-4.19.30-v8+.img followkernel

    dtparam=audio=on

    dtoverlay=pi3-disable-bt

    • dtoverlay=pi3-disable-bt disables bluetooth and assigns PL011 module to GPIO UART pins because miniUART and bluetooth suck.
    • dtparam=audio=on enables audio.
    • initramfs initramfs-4.19.30-v8+.img followkernel makes linux kernel use initramfs-4.19.30-v8+.img as the initial ramdisk. This initial ramdisk contains ZFS kernel modules needed for booting ZFS root.
    • gpu_mem=16 because I don't need a graphical user interface from Raspberry Pi.

Back to top
View user's profile Send private message
erm67
l33t
l33t


Joined: 01 Nov 2005
Posts: 653
Location: EU

PostPosted: Tue Mar 26, 2019 11:52 pm    Post subject: Reply with quote

I don't know if ZFS on linux now has finally a working zero copy mechanism between linux file cache and ARC, once upon a time it didn't and copying stuff between the 2 caches wasn't a great idea ...
I guess you can make the ARC even smaller, I remember that 40mb ARC was actually faster and worked, you can't turn it off completely however.
Maybe you have read on ZFS documentation that the ARC is a lot more efficient than LRU caches, but they forgot to tell you that linux doesn't use LRU caches since version 2.2 and the algorithms used by recent linux are more efficient than the ARC.

zfs has a property called volblocksize and you should probably tune it carefully for an sd card since often there is an optimal blocksize to use. I don't know what is the equivalent of the stripe size for ZFS but other filesystem let specify an optimal size to be used for io and setting it to the value of the erase block size, or the best performing block size found by flashbench, will improve performance and reduce write amplification.
https://raspberrypi.stackexchange.com/questions/32884/why-does-the-sd-card-random-write-performance-for-record-size-8-128-kb-drops-bel
The internals of SD cards are top secret and not disclosed by manufacturer so the kernel uses fixed values for sd cards that are often not optimal:
https://www.kernel.org/doc/Documentation/mmc/mmc-dev-attrs.txt

linaro has developed a tool to benchmark sd cards using different block sizes to find the optimal block size and the erase block size for your card:
https://github.com/bradfa/flashbench

There is also a good tool called sdinfo
https://github.com/johnlane/sdinfo

that will decode some registers provided by the card to print some useful information.

Also the readahead to be tuned to the best performing block size (the erase block size) determined by flashbench.

For example on my card:

Code:
erm67 ~/flashbench # ./flashbench -a /dev/mmcblk0  --blocksize=1024
align 4294967296   pre 1.22ms   on 1.58ms   post 836µs   diff 552µs
align 2147483648   pre 1.22ms   on 1.57ms   post 836µs   diff 545µs
align 1073741824   pre 1.22ms   on 1.57ms   post 835µs   diff 545µs
align 536870912   pre 1.23ms   on 1.58ms   post 837µs   diff 548µs
align 268435456   pre 1.22ms   on 1.57ms   post 836µs   diff 545µs
align 134217728   pre 1.21ms   on 1.59ms   post 847µs   diff 555µs
align 67108864   pre 1.21ms   on 1.58ms   post 841µs   diff 551µs
align 33554432   pre 1.23ms   on 1.59ms   post 847µs   diff 554µs
align 16777216   pre 1.22ms   on 1.58ms   post 846µs   diff 549µs
align 8388608   pre 1.22ms   on 1.57ms   post 845µs   diff 538µs
align 4194304   pre 1.22ms   on 1.57ms   post 835µs   diff 547µs
align 2097152   pre 1.22ms   on 1.58ms   post 844µs   diff 545µs
align 1048576   pre 840µs   on 1.01ms   post 844µs   diff 166µs
align 524288   pre 838µs   on 1.01ms   post 844µs   diff 166µs
align 262144   pre 829µs   on 1.01ms   post 854µs   diff 166µs
align 131072   pre 841µs   on 997µs   post 834µs   diff 160µs
align 65536   pre 840µs   on 1.01ms   post 845µs   diff 165µs
align 32768   pre 841µs   on 1.01ms   post 843µs   diff 166µs
align 16384   pre 832µs   on 999µs   post 842µs   diff 161µs
align 8192   pre 833µs   on 830µs   post 832µs   diff -2756ns
align 4096   pre 832µs   on 831µs   post 832µs   diff -666ns
align 2048   pre 831µs   on 832µs   post 831µs   diff 554ns

The card performs best using a 2MB stride and probably uses 8k block size internally
_________________
Ok boomer
True ignorance is not the absence of knowledge, but the refusal to acquire it.
Ab esse ad posse valet, a posse ad esse non valet consequentia

My fediverse account: @erm67@erm67.dynu.net
Back to top
View user's profile Send private message
crocket
Guru
Guru


Joined: 29 Apr 2017
Posts: 558

PostPosted: Wed Mar 27, 2019 1:40 am    Post subject: Reply with quote

erm67 wrote:
zfs has a property called volblocksize and you should probably tune it carefully for an sd card since often there is an optimal blocksize to use. I don't know what is the equivalent of the stripe size for ZFS but other filesystem let specify an optimal size to be used for io and setting it to the value of the erase block size, or the best performing block size found by flashbench, will improve performance and reduce write amplification.


volblocksize is a property of zvol. I don't have a zvol. I have zfs datasets. ZFS datasets have recordsize. As far as I know, ZFS cannot batch writes in erase blocks.

erm67 wrote:

For example on my card:

Code:
erm67 ~/flashbench # ./flashbench -a /dev/mmcblk0  --blocksize=1024
align 4294967296   pre 1.22ms   on 1.58ms   post 836µs   diff 552µs
align 2147483648   pre 1.22ms   on 1.57ms   post 836µs   diff 545µs
align 1073741824   pre 1.22ms   on 1.57ms   post 835µs   diff 545µs
align 536870912   pre 1.23ms   on 1.58ms   post 837µs   diff 548µs
align 268435456   pre 1.22ms   on 1.57ms   post 836µs   diff 545µs
align 134217728   pre 1.21ms   on 1.59ms   post 847µs   diff 555µs
align 67108864   pre 1.21ms   on 1.58ms   post 841µs   diff 551µs
align 33554432   pre 1.23ms   on 1.59ms   post 847µs   diff 554µs
align 16777216   pre 1.22ms   on 1.58ms   post 846µs   diff 549µs
align 8388608   pre 1.22ms   on 1.57ms   post 845µs   diff 538µs
align 4194304   pre 1.22ms   on 1.57ms   post 835µs   diff 547µs
align 2097152   pre 1.22ms   on 1.58ms   post 844µs   diff 545µs
align 1048576   pre 840µs   on 1.01ms   post 844µs   diff 166µs
align 524288   pre 838µs   on 1.01ms   post 844µs   diff 166µs
align 262144   pre 829µs   on 1.01ms   post 854µs   diff 166µs
align 131072   pre 841µs   on 997µs   post 834µs   diff 160µs
align 65536   pre 840µs   on 1.01ms   post 845µs   diff 165µs
align 32768   pre 841µs   on 1.01ms   post 843µs   diff 166µs
align 16384   pre 832µs   on 999µs   post 842µs   diff 161µs
align 8192   pre 833µs   on 830µs   post 832µs   diff -2756ns
align 4096   pre 832µs   on 831µs   post 832µs   diff -666ns
align 2048   pre 831µs   on 832µs   post 831µs   diff 554ns

The card performs best using a 2MB stride and probably uses 8k block size internally


I think your microSD card has 16kb pages 2MB erase blocks.
-2756ns is -2.756µs because 1µs = 1 microsecond = 1000ns = 1000 nanoseconds.
161µs is a lot larger than 2.8µs.

According to flashbench, there are boundaries at 16KB and 16MB on my Samsung microSD card. I thought ashift=14(16kb blocks) would be ideal, but other ZFS users told me to use ashift=12(4kb blocks) to save space.
ashift is the minimum record size. Files larger than 8KB would have the minimum record size of 16KB.
I'm worried that if ashift is smaller than 16KB, some or many files smaller than 8KB might cross page boundaries and cause write amplification when those files are modified.
Back to top
View user's profile Send private message
erm67
l33t
l33t


Joined: 01 Nov 2005
Posts: 653
Location: EU

PostPosted: Wed Mar 27, 2019 8:12 pm    Post subject: Reply with quote

crocket wrote:

I think your microSD card has 16kb pages 2MB erase blocks.

It has 8k pages but can readahed another one (like most SDs) :-) It is not important a lot of HDD have 4k sector size (internally) and most modern FS are optimized sector/block size larger than the traditional 512.

crocket wrote:

According to flashbench, there are boundaries at 16KB and 16MB on my Samsung microSD card. I thought ashift=14(16kb blocks) would be ideal, but other ZFS users told me to use ashift=12(4kb blocks) to save space.
ashift is the minimum record size. Files larger than 8KB would have the minimum record size of 16KB.
I'm worried that if ashift is smaller than 16KB, some or many files smaller than 8KB might cross page boundaries and cause write amplification when those files are modified.


SD cards are not real drives so what is good for ssd and hard disk probably doesn't apply.

A guy in another forum was able to contact some engineers at kingston that explained that SD are engineered to be used mainly on digital cameras and optimized for a specific use case: the storage of pictures, that is why they perform optimally when chunks of a certain size (2MB for my old card and 16MB for your that is probably more recent) are written to it, it's a reasonable size for JPG pictures. They did not reveal wether this optimal size is the erase block size of the card (likely) but the goal is to make the file system write out things in chunks of that size. Basically let's suppose that you have a hardware RAID controller that uses a stripe size of 16MB and you want to use ZFS on top of it, how would tune the filesystem? I haven't used ZFS in ages and only did on freebsd so I cannot help, but basically it is the same problem that SD cards have. ext4, xfs at least let the user specify the optimal stripe size of an underlaying hw raid, I bet there's way with zfs as well :-)

I am curious what is the content of your CSD register (Card-Specific Data) printed by sdinfo?
_________________
Ok boomer
True ignorance is not the absence of knowledge, but the refusal to acquire it.
Ab esse ad posse valet, a posse ad esse non valet consequentia

My fediverse account: @erm67@erm67.dynu.net
Back to top
View user's profile Send private message
crocket
Guru
Guru


Joined: 29 Apr 2017
Posts: 558

PostPosted: Thu Mar 28, 2019 1:29 am    Post subject: Reply with quote

erm67 wrote:
It has 8k pages but can readahed another one (like most SDs) :-)


Here's my flashbench result.

Code:
$ sudo flashbench -a /dev/mmcblk0 -b 1024
align 8589934592        pre 461µs       on 560µs        post 354µs      diff 153µs
align 4294967296        pre 469µs       on 660µs        post 468µs      diff 191µs
align 2147483648        pre 468µs       on 658µs        post 467µs      diff 191µs
align 1073741824        pre 469µs       on 657µs        post 462µs      diff 192µs
align 536870912 pre 474µs       on 658µs        post 465µs      diff 189µs
align 268435456 pre 474µs       on 658µs        post 464µs      diff 189µs
align 134217728 pre 472µs       on 659µs        post 465µs      diff 191µs
align 67108864  pre 474µs       on 660µs        post 468µs      diff 189µs
align 33554432  pre 471µs       on 656µs        post 465µs      diff 188µs
align 16777216  pre 471µs       on 657µs        post 464µs      diff 190µs
align 8388608   pre 476µs       on 596µs        post 456µs      diff 129µs
align 4194304   pre 477µs       on 605µs        post 457µs      diff 138µs
align 2097152   pre 477µs       on 595µs        post 457µs      diff 129µs
align 1048576   pre 479µs       on 597µs        post 456µs      diff 129µs
align 524288    pre 474µs       on 597µs        post 455µs      diff 132µs
align 262144    pre 468µs       on 597µs        post 456µs      diff 135µs
align 131072    pre 471µs       on 596µs        post 465µs      diff 128µs
align 65536     pre 472µs       on 595µs        post 468µs      diff 125µs
align 32768     pre 470µs       on 594µs        post 466µs      diff 125µs
align 16384     pre 470µs       on 507µs        post 467µs      diff 37.7µs
align 8192      pre 472µs       on 472µs        post 470µs      diff 1.32µs
align 4096      pre 471µs       on 472µs        post 467µs      diff 2.58µs
align 2048      pre 470µs       on 469µs        post 465µs      diff 1.02µs


Do you think my microSD card has 16KB pages and 16MB erase blocks?

erm67 wrote:
I am curious what is the content of your CSD register (Card-Specific Data) printed by sdinfo?


Code:
------------------------------------------------------------
CID : Card Identification : 1b534d4a4231525430f29a61f1012a05

MID : Manufacturer ID : 27

OID : OEM/Application ID : SM : 0x534d

PNM : Product Name : JB1RT

PRV : Product Revision : 3.0

PSN : Product Serial Number : f29a61f1

MDT : Maunfacturing Date : 2018.10

CRC : CRC : 2
------------------------------------------------------------
CSD : Card-Specific Data : 400e00325b590000ee7f7f800a404055

CSD_STRUCTURE: 1
CSD Version : 2

TAAC: data read access time : 14 : 0xe
                       unit : 1000000
                      value : 1 => 1.000000
                            : 1000000.000000 (nanoseconds)

NSAC: data read access time (in clock cycles) : 0

TRAN_SPEED : max data transfer rate : 50
                               unit : 10
                              value : 6 => 2.500000
                                    : 25.000000 (Mbit/s)

CCC : card command classes : 1461
                           : class 0
                           : class 2
                           : class 4
                           : class 5
                           : class 7
                           : class 8
                           : class 10

READ_BL_LEN : max read data block length : 9
LEN_BL_READ : max read block data length : 512 bytes ( 2^9)

READ_BL_PARTIAL : partial blocks for read allowed : no (0)

WRITE_BLK_MISALIGN : write block misalignment : no (0)

READ_BLK_MISALIGN : read block misalignment : no (0)

DSR_IMP : DSR implemented : no (0)

C_SIZE : device size : 61055 : 0xee7f
         user data area capacity : 31260672 KiB
                                 : 30528 MiB
                                 : 29 GiB

ERASE_BLOCK_EN : erase single block enable : yes (1)

SECTOR_SIZE : erase sector size : 128 : 0x80 (write blocks)
                                : 65536 B
                                : 64 KiB

WP_GRP_SIZE : write protect group size : 1
                                       : 128 (KiB)

WP_GRP_ENABLE : write protect group enable : no (0)

R2W_FACTOR : write speed factor : 4
                                : writing is 4 times slower than reading

WRITE_BL_LEN : max write block data length : 9
LEN_BL_WRITE : max write block data length : 512 bytes ( 2^9)

WRITE_BL_PARTIAL : partial blocks for write allowed : no (0)

FILE_FORMAT_GRP : file format group : 0

COPY : copy flag : 1

PERM_WRITE_PROTECT : permanent write protection : no (0)

TMP_WRITE_PROTECT : temporary write protection : no (0)

FILE_FORMAT : file format : 0 : Hard disk-like file system with partition table

CRC : CRC : 42

------------------------------------------------------------
SCR : SD Card Configuration Register : 2b5800200000000

SCR_STRUCTURE : SCR Structure Version : 0 : SCR version 1.0

SD_SPEC : SD Memory Card - Spec. Version : 2
SD_SPEC3 : Spec. Version 3.00 or higher : 1
SD_SPEC: SD Memory Card - Spec. Version : Version 3.0X

DATA_STAT_AFTER_ERASE : data status after erases : 1

SD_SECURITY : CPRM Security Support : 3 : SDHC Card (Security Version 2.00)

SD_BUS_WIDTHS : DAT Bus widths supported : 5
                                         : 1 bit (DAT0)
                                         : 4 bit (DAT0-3)

EX_SECURITY : Extended Security Support : 0 (not supported)

CMD_SUPPORT : Command Support bits : 2
                                   : Set Block Count (CMD23)

------------------------------------------------------------
Preferred Erase Size : 4194304
                     : 4 MiB

------------------------------------------------------------
Erase Size : 512 KiB

------------------------------------------------------------
Derived Data

LBA Sector Alignment
--------------------

Align each partition with the preferred erase size
    4194304 / 512 = 8192 sectors
Back to top
View user's profile Send private message
erm67
l33t
l33t


Joined: 01 Nov 2005
Posts: 653
Location: EU

PostPosted: Fri Mar 29, 2019 8:37 am    Post subject: Reply with quote

Sorry for the delay but I was busy ..

It looks like it is more or less like mine ... different cards same values, I am starting to think it is useless or filled with the same values for all sd cards ...

Don't forget to tune for your card /sys/block/mmcblk0/queue/max_sectors_kb in theory it should be equal to the erase sector size but linux uses the same values for all cards. Your CCD suggest to use 64kb (erase sector size) but again it's the same as mine, and maybe the same for all sd cards .....

Code:
./sdinfo.py mmcblk0
------------------------------------------------------------
CID : Card Identification : 41343253443136473044d2d95700f100

MID : Manufacturer ID : 65

OID : OEM/Application ID : 42 : 0x3432

PNM : Product Name : SD16G

PRV : Product Revision : 3.0

PSN : Product Serial Number : 44d2d957

MDT : Maunfacturing Date : 2015.1

CRC : CRC : 0
------------------------------------------------------------
CSD : Card-Specific Data : 400e00325b590000751f7f800a400000

CSD_STRUCTURE: 1
CSD Version : 2

TAAC: data read access time : 14 : 0xe
                       unit : 1000000
                      value : 1 => 1.000000
                            : 1000000.000000 (nanoseconds)

NSAC: data read access time (in clock cycles) : 0

TRAN_SPEED : max data transfer rate : 50
                               unit : 10
                              value : 6 => 2.500000
                                    : 25.000000 (Mbit/s)

CCC : card command classes : 1461
                           : class 0
                           : class 2
                           : class 4
                           : class 5
                           : class 7
                           : class 8
                           : class 10

READ_BL_LEN : max read data block length : 9
LEN_BL_READ : max read block data length : 512 bytes ( 2^9)

READ_BL_PARTIAL : partial blocks for read allowed : no (0)

WRITE_BLK_MISALIGN : write block misalignment : no (0)

READ_BLK_MISALIGN : read block misalignment : no (0)

DSR_IMP : DSR implemented : no (0)

C_SIZE : device size : 29983 : 0x751f
         user data area capacity : 15351808 KiB
                                 : 14992 MiB
                                 : 14 GiB

ERASE_BLOCK_EN : erase single block enable : yes (1)

SECTOR_SIZE : erase sector size : 128 : 0x80 (write blocks)
                                : 65536 B
                                : 64 KiB

WP_GRP_SIZE : write protect group size : 1
                                       : 128 (KiB)

WP_GRP_ENABLE : write protect group enable : no (0)

R2W_FACTOR : write speed factor : 4
                                : writing is 4 times slower than reading

WRITE_BL_LEN : max write block data length : 9
LEN_BL_WRITE : max write block data length : 512 bytes ( 2^9)

WRITE_BL_PARTIAL : partial blocks for write allowed : no (0)

FILE_FORMAT_GRP : file format group : 0

COPY : copy flag : 0

PERM_WRITE_PROTECT : permanent write protection : no (0)

TMP_WRITE_PROTECT : temporary write protection : no (0)

FILE_FORMAT : file format : 0 : Hard disk-like file system with partition table

CRC : CRC : 0

------------------------------------------------------------
SCR : SD Card Configuration Register : 2b5800200000000

SCR_STRUCTURE : SCR Structure Version : 0 : SCR version 1.0

SD_SPEC : SD Memory Card - Spec. Version : 2
SD_SPEC3 : Spec. Version 3.00 or higher : 1
SD_SPEC: SD Memory Card - Spec. Version : Version 3.0X

DATA_STAT_AFTER_ERASE : data status after erases : 1

SD_SECURITY : CPRM Security Support : 3 : SDHC Card (Security Version 2.00)

SD_BUS_WIDTHS : DAT Bus widths supported : 5
                                         : 1 bit (DAT0)
                                         : 4 bit (DAT0-3)

EX_SECURITY : Extended Security Support : 0 (not supported)

CMD_SUPPORT : Command Support bits : 2
                                   : Set Block Count (CMD23)

------------------------------------------------------------
Preferred Erase Size : 4194304
                     : 4 MiB

------------------------------------------------------------
Erase Size : 512 KiB

------------------------------------------------------------
Derived Data

LBA Sector Alignment
--------------------

Align each partition with the preferred erase size
    4194304 / 512 = 8192 sectors

_________________
Ok boomer
True ignorance is not the absence of knowledge, but the refusal to acquire it.
Ab esse ad posse valet, a posse ad esse non valet consequentia

My fediverse account: @erm67@erm67.dynu.net
Back to top
View user's profile Send private message
crocket
Guru
Guru


Joined: 29 Apr 2017
Posts: 558

PostPosted: Fri Mar 29, 2019 8:57 am    Post subject: Reply with quote

erm67 wrote:
different cards same values, I am starting to think it is useless or filled with the same values for all sd cards ...

Don't forget to tune for your card /sys/block/mmcblk0/queue/max_sectors_kb in theory it should be equal to the erase sector size but linux uses the same values for all cards. Your CCD suggest to use 64kb (erase sector size) but again it's the same as mine, and maybe the same for all sd cards .....


The value of /sys/block/mmcblk0/queue/max_sectors_kb is 512 on my Raspberry Pi.
Back to top
View user's profile Send private message
erm67
l33t
l33t


Joined: 01 Nov 2005
Posts: 653
Location: EU

PostPosted: Sat Apr 06, 2019 10:03 am    Post subject: Reply with quote

crocket wrote:
erm67 wrote:
different cards same values, I am starting to think it is useless or filled with the same values for all sd cards ...

Don't forget to tune for your card /sys/block/mmcblk0/queue/max_sectors_kb in theory it should be equal to the erase sector size but linux uses the same values for all cards. Your CCD suggest to use 64kb (erase sector size) but again it's the same as mine, and maybe the same for all sd cards .....


The value of /sys/block/mmcblk0/queue/max_sectors_kb is 512 on my Raspberry Pi.

It is a sane value for FAT filesystem, don't know for ZFS :-)
_________________
Ok boomer
True ignorance is not the absence of knowledge, but the refusal to acquire it.
Ab esse ad posse valet, a posse ad esse non valet consequentia

My fediverse account: @erm67@erm67.dynu.net
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum