Skip to content

Instantly share code, notes, and snippets.

@ericblade
Created April 30, 2024 03:49
Show Gist options
  • Save ericblade/79f3315566379d494da3d79093192fb5 to your computer and use it in GitHub Desktop.
Save ericblade/79f3315566379d494da3d79093192fb5 to your computer and use it in GitHub Desktop.
How to reconfigure samba in WD MyCloud
make changes you want to /etc/samba/smb.conf
(i'm messing with aio read size = 1, aio write size = 1, write cache size = 200k, getwd cache = true)
run ```smbcmd -l```
currently seeing a 200% increase in write speeds to both local and USB attached disks, as well as a significant apparent improvement when many files are being accessed simultaneously.
not sure how to make this a permanent change, will need to study. The system has MANY scripts that call the program that configures smb.conf, so it may just need to be on a cronjob or something. ugh.
probably run a cron job that runs a bunch of sed's on the file to add/change the things you want to add/change, and then reloads it on the regular.
at least, if i see it being re-written regularly.
on v5, I can't really tell what init system they are using, it doesn't seem to be initd or systemd, and i'm not even remotely familiar with if there are any others, or if this is a western digital custom.
@ericblade
Copy link
Author

I didn't do any scientific measurements before, but previous to these changes, the CPU on the device was pegged, and memory usage hardly ever moved above 30% Now the CPU is holding at around 50%, and RAM usage at around 45%.

@ericblade
Copy link
Author

CPU under heavy load is quite a bit lower, with large quantities of small accesses on the USB disks connected barely registering, it used to just stay pegged all the time. Still there are spikes up to 100% for a while, but it always settles back down. Throughput is still not fantastic, but surprisingly, I'm getting better large-file size transfers via this device than I was via Thunderbolt direct connection on some disks.

@ericblade
Copy link
Author

.... with alllll of my docker services now running pointing at various disks in this amazingly cheaply built USB disk array, after these config changes, I no longer get constant drops of the network mounts. Stability is drastically improved, write throughput is a monstrous improvement, reads only seem to be improved when there are many parallel occurring

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment