Compounds which modulate quorum sensing in quorum sensing bacteria. Compounds of the invention inhibit quorum sensing and/or activate quorum sensing in various bacteria. Compounds that inhibit quorum sensing are particularly useful for inhibition of detrimental bacterial biofilm formation. Compounds that activate quorum sensing are particularly useful for promoting growth and biofilm formation of beneficial bacterial.