i find it verry informative, its all there
especialy the random 4kiops count for the dbs, my guess.
- you can verify the test with different test sizes, i did, and it matched.
Many distributions have a gui tool for partitions (GParted). i think ext4 (4k cluster) for linux is ok.
I’m interested in how this turns out. I’ve had good experiences using USB flash drives to move occasional batches of large media files around (so occasional large sequential writes). I’ve had poor experiences using them as general filesystems with constant small writes (like node logs or a database). They just seemed to wear out: throwing errors, then the system drops them entirely or remounts them read-only.
But I can’t comment on any particular make or model: perhaps that Samsung has great write endurance.
many of them are pre-formated in exfat for compatibility. with a big cluster size, resulting in wearing out quick in normal operation.
sd-cards have that problem usualy too.
flash-drives are not usb-sticks per se, they have an own controler.
also great quality differences can occur.
With 600MB of databases and 128GB of space, you get at least 200 complete rewrites of the databases. Multiply that by the number of times the entire stick can be rewritten. I believe we are safe for at least 10 years, if the controller dosen’t fail.
This is not exactly true due to write amplification. A single 4kB write to a flash drive may trigger a rewrite of a full flash memory’s erase block, apparently even megabytes depending on the flash memory’s controller. It then pays off to get a quality drive with a good controller.
I installed the USB stick (Samsung Bar Plus 128GB) in Synology, to move the databases on it, I formatted it as ext4, and there is an option, disabled by default: “enable delayed allocation for ext4 - …can improve write performance, but might result in data loss…”.
What is this and should I enable it?
I have UPS and db-es are not critical, so I’ll set it to enabled. I started non lazzy FW to see if USB makes any difference for it.
If you are on Synology, you should set noatime for the USB drive too.
You can use a script to run as root, at boot:
mount -o remount,noatime "/volumeUSB1/usbshare"
/volumeUSB1/usbshare is the mount point that you get with
sudo mount command.