December 14th, 2009, 09:35
I had a server crash on me (hdd) fail and I decided it was time to go from my 300mhz pc to a newer more efficient openbsd firewall. By the recommendations on this site I went with an atom processor http://supermicro.com/products/motherboard/ATOM/945/X7SLA.cfm?typ=H I have a single stick of 1gb of ram in the box. The machine has dual nics built into the motherboard (re0, re1) I went out and put the latest Amd64 OpenBSD 4.6 on the computer. When I use the dlink router that my ISP supplied then I get 15mb down. When I use the following configuration on my bsd box I get a burst of 1mb and an average of 300kb. the first thing i did was enable ipforwarding net.inet.ip.forwarding=1 my /etc/ppp/ppp.conf file contains the following default: set log Phase Chat LCP IPCP CCP tun command set timeout 0 set redial 15 0 set reconnect 15 10000 set server /var/run/ppp.sock "" 0177 pppoe: set device "!/usr/sbin/pppoe -i re0" set mtu max 1492 set mru max 1492 set speed sync enable lqr disable acfcomp protocomp deny acfcomp add! default HISADDR set authname myusername set authkey mypwd then i edited /etc/rc.local to the following /sbin/ifconfig re0 up /usr/sbin/ppp -ddial pppoe then i set my pf.conf to allow all in and out going What am I doing wrong? How can I improve my connection speed?

December 16th, 2009, 15:08
Try a different NIC. The Atom should be able to handle the traffic easy, but not sure about the re NICs. See if you can find an Intel NIC, and try that out.

Also, use 'systat vmstat' to check for any bottlenecks. If you have another BSD system, use iperf to check the bandwidth between the two systems.

You might try adding this to your sysctl.conf as well:

net.inet.tcp.recvspace=262144 # Increase TCP "receive" windows size to increase performance
net.inet.tcp.sendspace=262144 # Increase TCP "send" windows size to increase performance
net.inet.tcp.sack=1 # enable TCP Selective ACK (SACK) Packet Recovery
net.inet.udp.recvspace=262144 # Increase UDP "receive" windows size to increase performance
net.inet.udp.sendspace=262144 # Increase UDP "send" windows size to increase performance