If the knocking goes away at a higher rpm you may have "piston flutter" This is caused when the bearing in the connecting rod where the wrist pin goes through has become elongated instead of round. So at lower rpms (idle) you get a clattering sound. Rev it up and the momentum of the piston moving rapidly up and down compenstaes for the slack and the clatter goes away.
At some point you should do or have done a "Top End" overhaul, new piston, rings, cylinder honed or bored, new wrist pins, bearings, etc. If you don't want to do it yourself you can pull the engine and ship it off to have it done if there is no one in your local area.