Loose valves make a ticking noise; I would look at the oil filter. If you find bearing material there the problem could be with a worn bearing. When a bearing starts to fail it gets more and more play resulting in a (quickly) worsening knocking sound.For the past two years - after start-up - my Yanmar 1 GM has been running like a purring kitten (as much as a diesel engine can). Recently a knocking sound has started that seems to be getting progressively worse. Is this a valve adjustment issue?
I agree it is likely a fuel problem, the 1GM is pretty straight forward. Start by checking the cheap stuff first.Have you tried changing the fuel filter(s)? When was the last time you changed them? I get knocking when the filters start to get clogged up.