Is It Beneficial For Data Centers To Generate Electricity On-Site?

Is It Beneficial For Data Centers To Generate Electricity On-Site?