A system (1) and a method for renal replacement therapy comprising a blood treatment unit (4) connected to a blood circuit (2) and a dialysis fluid circuit (3), the system (1) further comprises a control unit (31) configured to control the system (1) according to control instructions comprising to, during a treatment, determine a system parameter value and an indication of membrane fouling of the membrane (7), and activate an automatic anti-fouling measure comprising a temporary change of the flow rate in the blood circuit (2) and a temporary decrease of the ultrafiltration rate wherein a timing of the temporary change and a timing of the temporary reduction are synchronized.