I'd like to bump this thread and say thanks so much!
I've been using unRaid for a few years now having never played with those settings. My baseline with your script at the default settings (for some reason my md_sync_window is actually 288, lower than what your script says is default) was 40MB/s. After testing it's up to 99MB/s. This is while running a preclear on two drives.
That's an amazing improvement! I can't believe I was making due with less than half my possible speed.