take port settings from config and optimizations