Pump timing, and get the injectors pop tested.
I normally have my pumps pushed as far against the motor as they will go, they seem to run the best there.
If pulling the advance makes the motor quieter, I'd give the pump a nudge towards the engine. If you don't have the proper tools to check timing (borrow from neighbor??), you can set the pump by ear. Loosen the bolts, crack the lines at the pump and rotate. Snug up lines, start car, tweak pump as necessary. My diesels have pumps with unknown mileage, I've never been happy with them set to spec, I wind up advancing as far as I can without resetting the pump 1 tooth off (which is my next step on one motor)