If it sounds like a can of marble balls rolling around in it
Then it's preignation due to carbon buildup. It happens when engine works hard. It could be reduced with higher octane gas. But the real cure is decarbon or swap to cold spark plugs. I did it and solved the engine pinging noise, the pre ignition issue, on my Infiniti years ago.