It's 2% on the entire amount of the judgment debt (which includes any award of costs) unless the judge orders than only part of the judgment debt is to bear interest, in which case it's 2% on that part and 0% on the rest.
There's no power for the court to order 8% interest on any part of the judgment debt. The only circumstance in which interest is charged at a rate other than 2% is where the judgment debt arises out of a contract, and the contract itself specifies an interest rate. So if you're sued in relation to a loan from the bank and the bank gets a judgment against you, that judgment debt will carry interest at the rate set by, or determined under, the loan agreement.