Modified Ubuntu LTS server image will work, and a minimal Debian kernel will have far less bloat. Note pfSense/FreeBSD is fairly robust, and a mature project.
Keep in mind most network appliances have dedicated hardware hand-off adapters, and so the CPU isn't involved in routing once the connection is setup. It is why people can use a $30 SoC, and still be able to saturate several 10Gb/100Gb ports. =3