I like to add about 1 gallon of starsan into the carboy and then just lay the carboy on its side. I will turn the carboy every so often to make sure that the entire inside of the carboy gets contact time w/ the starsan. Then when I need to use the carboy, I turn the carboy upside down to empty the starsan. This way the carboy is sanitized and there's very little foam. Before doing this, I would shake up the carboy causing a ton of foam.