change ufw rules and reduce heap