This ssh work is very interesting, but well beyond my capability. It sounds like you are hopeful of identifying whether it's memory thrashing/contention/leaking, and propose a solution. In the meantime, here's another example of the slowness.
I've used log scale on the right hand axis, as the time blowouts are extraordinary, eg. 450,000 hours still to go for backing up 43 GB at around 95 hours into the backup . That's over 50 years!
Time Machine would periodically rescan, and so the total size of the backup grew through time - banner markers indicate the size of the backup at each stage. I didn't notice for some days that the backup was slow, but when I did notice, it still took three reboots of the My Book Live before the speed returned to normal (see the steep rise in the blue line to 50-60 Mbits per second at the end). At this speed, the 43 GB was backed up in one and a half hours ( the red time remaining line drops to single digits) after the third reboot was successful.
I don't usually have this much trouble, but I thought people might be interested to see the pace of the slowness!
Just an update on my WD My Book Live.
Around September 2014, the drive became completely unavailable to my Mac, seemingly because of the Mavericks system upgrade. I tried many reboots, went to WD support, but they could offer nothing, and eventually offered to replace the drive (though it was working fine with a PC). I refused, because I didn't think that was fair to them, or of any use to me, since my drive clearly worked, just not as a Time Machine backup.
I went out and bought a Time Capsule, but didn't disconnect the drive, using it as a Media server for my TV.
Eventually, for unknown reason, but after a few Apple system updates, it started being visible to my Mac again around November. I was not able to get the Time Machine backups to restart, but they are accessible and can be recovered from.
Overall, the WD experience as a Time Machine backup was not successful, though it was fun while it lasted! When it was working, the random slowdowns were a nuisance (see reboot fix above), the corrupted backups were another (see Gillespie fix), and when it finally stopped working with Apple at all, then it became useless. Quite a challenge to get workarounds for each problem. I'm not sure why these problems occurred, and clearly neither did WD who did offer non-expert support. In their defence, it's a Apple software issue mainly I think, but as somebody noted above, the slowness problem seems to be some system operation conflict between WD and Apple.
iMac 21.5" Late 2009
MacBookPro Late 2011
Mac OS X 10.10.1
Time Capsule / Airport Extreme 2014
WD My Book Live
I have had experience with 2 Western Digital NAS drives, a WD MyBook World II 4TB (initially configured RAID 1) and a WD MyBook Live Duo 6TB (configured RAID 1). The reason I went with WD, they were low cost, drives were fully populated and were able to be used in a RAID 1 configuration. The Apple option was not able to be used in a RAID 1 configuration and I already had a wireless router. The MBW was the oldest of the two and worked fine with TimeMachine after a few teething problems and a change of Mac OS that stopped the drive working with TimeMachine for a couple of months until a new firmware update arrived from WD. The MyBook Live Duo was purchased as it was larger capacity, unfortunately it has never worked well with TimeMachine. Backup being horrendously slow. The drive was only used for TimeMachine backup and by only one Mac computer. To speed things up the drive would need to be shut down at least every few days which would speed it up - for a short time. But, things were liveable. When the drive got close to its capacity, backups got EVEN slower and appeared to hang for days. When this occurred the only apparent fix was to delete the sparse bundle and start the TimeMachine Backup from scratch. Not the optimum backup system.
In total frustration and despair I purchased a Synology Diskstation DS213j (8TB - twin 4 TB drives) after searching reviews on the web. It has turned out to be the best thing I have ever done. The Synology unit works seamlessly with the Mac OS and TimeMachine. The Backups are blindingly fast. What used to take hours with the WD drives now takes a mater of a few minutes (if that). This unit is now backing up two macs on the LAN (the LAN configuration has been the same the whole time - 1MB Ethernet).
What of the WD NAS drives? The MBLD (RAID 1 - 3TB storage) is now used for online occasional data storage and backup, it is slow to mount via the finder but works quite well with Windows 7 running under VMware or with plain Windows PCs. The WD MBW, now configured as RAID 0 (4TB storage), is used as a monthly backup for the WD MBLD which has an option to do automatic backups to another NAS drive.
From my experience, yes there are NAS (RAID configurable) drives out there that work well with TimeMachine. You just have to hunt them down.