Hi folks,
I have a Soekris 5501 running as router via NAT. My ADSL modem is in
(pseudo) bridge mode, and I use ppp(8)/pppoe(8) to login to my provider.
I also would like to use the device do download torrents with rtorrent.
This works, except that my network performance drops.
So I wrote this line to test http GET performance and run it a few
times
nc.sh:
echo -n GET | nc
www.xs4all.nl 80 > /dev/null
rtorrent not running:
$ time ./nc.sh
0m0.05s real 0m0.00s user 0m0.02s system
0m0.06s real 0m0.00s user 0m0.00s system
0m0.06s real 0m0.00s user 0m0.01s system
0m0.06s real 0m0.00s user 0m0.02s system
0m0.06s real 0m0.00s user 0m0.00s system
0m0.06s real 0m0.00s user 0m0.00s system
rtorrent is running:
$ time ./nc.sh
0m12.07s real 0m0.00s user 0m0.03s system
0m0.07s real 0m0.00s user 0m0.01s system
0m0.07s real 0m0.00s user 0m0.01s system
0m0.06s real 0m0.00s user 0m0.00s system
0m0.13s real 0m0.00s user 0m0.01s system
0m5.67s real 0m0.00s user 0m0.00s system
0m0.06s real 0m0.00s user 0m0.01s system
0m6.08s real 0m0.00s user 0m0.00s system
I tried running 'nice 20 rtorrent' but make no remarkable difference.
The machine is also running httpd, named and sshd.
Is it that my platform cannot handle so many connections? Does anyone
have tips on benchmarking? I really lack diagnostic skills
Some other information:
Code:
$ ps
pieter 9642 0.9 6.0 3400 31460 p3 Ss+ 4:11PM 4:02.73 rtorrent
Code:
pf.conf:
set skip on lo
pass
ext_if="tun0"
int_if="vr0"
wlan_if="ral0"
internal_net="10.0.0.1/16"
wlan_net="192.168.0.0/16"
nat on $ext_if from $internal_net to any -> ($ext_if)
nat on $ext_if from $wlan_net to any -> ($ext_if)
rdr on $ext_if proto tcp from any to port 6346 -> 10.0.0.2
rdr on $ext_if proto udp from any to port 6346 -> 10.0.0.2
rdr on $ext_if proto tcp from any to port 6881:6999 -> 10.0.0.2 #bitorrent
block in on ! lo0 proto tcp to port 6000:6010
pass out on $ext_if proto tcp all modulate state flags S/SA
pass out on $ext_if proto { udp, icmp } all modulate state
Approximately half of '$ netstat -n'. I censored IP addresses.
Code:
Active Internet connections
Proto Recv-Q Send-Q Local Address Foreign Address
(state)
tcp 0 0 80.101.175.113.8081 .59998 SYN_SENT
tcp 0 0 80.101.175.113.9658 .35014 ESTABLISHED
tcp 0 83 80.101.175.113.14615 .15579 ESTABLISHED
tcp 0 0 80.101.175.113.30088 .18293 SYN_SENT
tcp 0 0 80.101.175.113.20531 .48596 SYN_SENT
tcp 0 0 80.101.175.113.23976 .62348 SYN_SENT
tcp 0 14948 80.101.175.113.9256 .21092 ESTABLISHED
tcp 0 0 80.101.175.113.5081 .45090 SYN_SENT
tcp 0 0 80.101.175.113.29157 .36291 ESTABLISHED
tcp 0 0 80.101.175.113.6744 .30351 SYN_SENT
tcp 0 0 80.101.175.113.34522 .10700 SYN_SENT
tcp 0 0 80.101.175.113.15807 .17385 SYN_SENT
tcp 0 0 80.101.175.113.6200 .44270 SYN_SENT
tcp 0 0 80.101.175.113.33257 .44616 SYN_SENT
tcp 0 0 80.101.175.113.2320 .64042 ESTABLISHED
tcp 0 0 80.101.175.113.34335 .60886 ESTABLISHED
tcp 0 0 80.101.175.113.41564 .30116 ESTABLISHED
tcp 0 0 127.0.0.1.53 127.0.0.1.44511
CLOSE_WAIT
tcp 0 0 127.0.0.1.44511 127.0.0.1.53
FIN_WAIT_2
tcp 0 68 80.101.175.113.37694 .46121 FIN_WAIT_1
tcp 0 16384 80.101.175.113.24255 .41610 ESTABLISHED
tcp 0 14948 80.101.175.113.9713 .63517 ESTABLISHED
tcp 0 0 80.101.175.113.7162 .42798 ESTABLISHED
tcp 0 0 80.101.175.113.44818 .38555 ESTABLISHED
tcp 0 0 80.101.175.113.38834 .58791 ESTABLISHED
tcp 0 15942 80.101.175.113.36317 .57427 ESTABLISHED
tcp 0 0 80.101.175.113.47263 .18832 ESTABLISHED
tcp 0 15315 80.101.175.113.6116 .33756 ESTABLISHED
tcp 0 0 80.101.175.113.22529 .16106 ESTABLISHED
tcp 0 0 80.101.175.113.9478 .18632 ESTABLISHED
tcp 0 0 80.101.175.113.19665 .9913 ESTABLISHED
tcp 0 0 80.101.175.113.26200 .13533 ESTABLISHED
tcp 0 0 80.101.175.113.23626 .17619 ESTABLISHED
tcp 0 0 80.101.175.113.45434 .54818 ESTABLISHED
tcp 0 0 80.101.175.113.17929 .32731 ESTABLISHED
tcp 0 0 80.101.175.113.21663 .13449 ESTABLISHED