Replies: 1 comment
I've added the good ideas in 2ccff2b |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Claude and Gemini were very helpful in tweaking a few SMB settings on the TC and my mac which have resulted in substantially improved performance, mainly meaning much more stable, longer-running backup sessions to an external SSD connected to my Time Capsule via USB 2.0. See Gemini's summary below...
Model: TimeCapsule8,119, 5th generation AirPort Time Capsule (2013, 2TB/3TB model)
[Idea/Performance Tuning] Optimizing Samba 4 & Time Machine for Legacy Time Capsule Hardware
I’ve been using this terrific project to setup a custom Samba 4 stack on my legacy Apple AirPort Time Capsule (Gen 5, NetBSD 6).
While the base setup is amazing, I ran into severe bottlenecking, high CPU usage, and transient connection drops—especially when running initial/large backups to an External SSD plugged in via USB 2.0 on legacy hardware with extremely limited RAM (256MB/512MB).
With some tuning, I managed to get the system running much more stably with ~6.5% CPU utilization for active transfers and under 10MB RAM footprint per active connection, completely saturating the USB 2.0 bus without dropping out.
I wanted to share the exact configuration changes we made so they can help other users, or perhaps be integrated into one or more of the default configuration templates.
1. The Core Bottlenecks Addressed
smbdchild process. Lingering connections or massive thread pools can easily trigger NetBSD's Out-Of-Memory (OOM) killer.backupd) mandates this for security on the backup itself, disabling it for other operations (Finder, directory scans) significantly lowers system load.2. Server-Side Optimizations (
smb.conf)We modified the template inside
src/timecapsulesmb/assets/boot/samba4/common.d/50-runtime-staging.shto restrict resource consumption, optimize latency, and eliminate threading overhead:3. macOS Client-Side Optimizations (
/etc/nsmb.conf)Adding these parameters to
/etc/nsmb.confon the Mac client disables signing for standard shares and turns off highly intensive, repetitive notifications:4. Automation & Robust USB Remount Script
Because USB 2.0 can occasionally drop connections under extreme load, running a lightweight daemon on macOS to automatically handle cooldown periods and resume backups helps tremendously.
The 5-minute cooldown period gives the Time Capsule's USB controller and filesystem time to settle, perform any background journal flushes (
fsck), and cleanly remount before starting a new transfer:Run this in the background with logging enabled:
5. Measured Results on My Machine
smbdCPU Load:~6.5%CPU utilization during heavy Time Machine writes (down from peaking or thermal throttling at100%).smbdRAM Footprint: Less than10MBper connection (ensuring safe operations within a tight memory budget).I welcome thoughts on making some of these
smb.confoptimizations (likeaio read size = 0/aio write size = 0and tightermax smbd processes) the default for this repo to help everyone running on legacy hardware out of the box.All reactions