Source-based, not “tested optimal”
The Shaker behavior and diagonal-staircase recommendation come from the official wiki. Spacing and surrounding logistics are recommendations you should adapt to your terrain.
Layout concept: feed Wet Sand from the high side of a descending Shaker staircase, keep the area below open for Gold, and give Residue a clear path off the low side. This follows the official Shaker tip; the full layout has not been independently benchmarked by this site.
The Shaker behavior and diagonal-staircase recommendation come from the official wiki. Spacing and surrounding logistics are recommendations you should adapt to your terrain.

The official Shaker page notes that Shakers move Residue very slowly and recommends a downward diagonal layout. Wet Sand is denser than Residue, so incoming Wet Sand can settle on the machines while Residue is displaced toward the output.
Place the Shakers as descending steps before connecting a large input. You want to see the material path clearly.
Gold passes through the Shaker; do not place an unrelated solid-processing line directly under the output.
Start with a controlled feed. Watch whether fresh Wet Sand spreads across the Shakers or immediately buries one location.
If Residue has nowhere to go, adding more input only makes the backup harder to diagnose.
Reduce the feed and confirm the staircase slopes away from the input. More input is not a fix for poor distribution.
Clear the exit and reduce incoming Wet Sand until the top surface becomes readable again.
Non-Gold solids can become trapped in a Shaker body and may need manual removal.
Shaker Gold is probabilistic at 25% per Wet Sand pixel. Check the input and machine behavior before assuming a fault from a short sample.