We have a 4 core Intel i3 machine running ubuntu set up in our office, responsible for two jobs:
- recording 5 security cameras to disk (ffmpeg)
- being a general purpose fileserver.
The machine has a single, 3TB SATA disk and no RAID. The data on the machine doesn't matter, and doesn't need to be 100% available.
When we transferred a disk image (500GB) to it via SAMBA, it would run out of memory and start swapping, slowing down the already busy disk to a point where the machine would be completely unresponsive and need to be reset.
We fixed this by disabling oplocks in /etc/smb.conf:
oplocks = no
No further tuning reqired.