How to tune ARM openwrt device with sata port for maximum Samba file sharing performance?


I have a wd mybook live, a very old arm device

current speeds
reading through samba steady 60MB/s
writing one big continuous file to empty disk, anything between 1MB/s and 35MB/s

Things I am looking to try but not sure yet

I want to tune for maximum speed on sequential reads
I don't care about wasting space with big blocks
Find CPU's pagesize, align file system block size with cpu page size
try other filesystems with less overhead than
maybe disable ext3 journaling ?
maybe try ext4 or btrfs or something else ?
increase "maxsectors"
use 128MB of the ram with "bcache" ?

Do you have other suggestions to try ?

Thanks !

Here's more information about my setup

The device

Model MyBook Live
Architecture APM821XX
Target Platform apm821xx/sata

processor : 0
cpu : APM821XX
clock : 800.000008MHz
revision : 28.130 (pvr 12c4 1c82)
bogomips : 1600.00

timebase : 800000008
platform : PowerPC 44x Platform
model : MyBook Live
Memory : 256 MB


Version  2.00       ------Sequential Output------ --Sequential Input- --Random-
                    -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Name:Size etc        /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
               488M           55.4m  82 46.7m  51            115m  82 217.2  14
Latency                       51909us   78722us             20722us     452ms

hdparm -tT /dev/sda3

Timing cached reads: 580 MB in 2.00 seconds = 289.96 MB/sec
Timing buffered disk reads: 314 MB in 3.01 seconds = 104.28 MB/sec

OpenWrt 22.03.5 r20134-5f15225c1e / LuCI openwrt-22.03 branch git-23.093.57104-ce20b4a

partitions created as follows

Disk /dev/sda: 7.28 TiB, 8001563222016 bytes, 15628053168 sectors
Disk model: ST8000DM004-2CX1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x5452574f

Device Boot Start End Sectors Size Id Type
/dev/sda1 * 8192 24575 16384 8M 83 Linux
/dev/sda2 32768 245759 212992 104M 83 Linux
/dev/sda3 245760 4294967295 4294721536 2T 83 Linux

created a file system as follows

root@backup:~# tune2fs -l /dev/sda3
tune2fs 1.46.5 (30-Dec-2021)
Filesystem volume name:
Last mounted on: /mnt/storage1
Filesystem magic number: 0xEF53
Filesystem revision #: 1 (dynamic)
Filesystem features: has_journal ext_attr resize_inode dir_index filetype needs_recovery sparse_super large_file
Filesystem flags: unsigned_directory_hash
Default mount options: user_xattr acl
Filesystem state: clean
Errors behavior: Continue
Filesystem OS type: Linux
Inode count: 134217728
Block count: 536840192
Reserved block count: 26842009
Overhead clusters: 8704020
Free blocks: 528135909
Free inodes: 134217717
First block: 0
Block size: 4096
Fragment size: 4096
Reserved GDT blocks: 896
Blocks per group: 32768
Fragments per group: 32768
Inodes per group: 8192
Inode blocks per group: 512
Mount count: 1
Maximum mount count: -1
Check interval: 0 ()
Reserved blocks uid: 0 (user root)
Reserved blocks gid: 0 (group root)
First inode: 11
Inode size: 256
Required extra isize: 32
Desired extra isize: 32
Journal inode: 8
Default directory hash: half_md4
Journal backup: inode blocks

In Samba luci config page I have

Enable extra Tuning
Force synchronous I/O
I have created a guest only share