I use 6 gallon glass carboys. After cleaning the carboy, I add about 2-3 gallons of Star San solution to it. You really only need enough Star San to coat the surfaces of the carboy, some people use less, I like using 2-3 gallons. I give the carboy a few shakes and let the solution sit for a few minutes. I then drain the Star San into gallon jugs for resuse. Whatever bubbles are left in the carboy after draining, and shaking a little bit to get some of the bubbles, stay in the carboy. The saying with Star San is don't fear the foam, so I don't.
Just to be clear, Star San is sanitizing. Cleaning is something you do sometime before sanitizing. Clean after use, sanitize before use. And depending on how something looks, or how long my carboy has been sitting around, I sometimes clean again right before sanitizing. When cleaning, I fill the carboy up with hot water and oxiclean or pbw. I the cleaning solution soak for a few hours or overnight. I then give it a scrub with the carboy brush, rinse and store. Then sanitize before use. Again, clean after use, sanitize before use; it makes life a lot easier.