Optimizing IP performance