DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 27th March 2010
pieterverberne pieterverberne is offline
Real Name: Pieter Verberne
Port Guard
 
Join Date: Oct 2008
Location: The Netherlands, Veldhoven
Posts: 11
Talking rtorrent on NAT-gateway slows down network.

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
Reply With Quote
  #2   (View Single Post)  
Old 27th March 2010
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,125
Default

Have you seen http://www.benzedrine.cx/ackpri.html ?
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
  #3   (View Single Post)  
Old 28th March 2010
pieterverberne pieterverberne is offline
Real Name: Pieter Verberne
Port Guard
 
Join Date: Oct 2008
Location: The Netherlands, Veldhoven
Posts: 11
Default

Thanks! looks very interesting.

It's even in the OpenBSD FAQ! (PF Guide) my bad

Last edited by pieterverberne; 28th March 2010 at 02:57 PM. Reason: addition.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Network configuration issue (gateway(s)) amorphousone OpenBSD General 3 25th November 2009 04:53 AM
Web interface for rTorrent Beastie FreeBSD Ports and Packages 0 24th August 2009 11:53 AM
Can start rtorrent like apache and mysql when system boot mfaridi FreeBSD Ports and Packages 0 26th November 2008 09:27 AM
rtorrent: Could not lock session directory: "/Torrents/Downloading/rtorrent.session/ mfaridi FreeBSD Ports and Packages 2 26th November 2008 06:47 AM
rtorrent and rtGUI mfaridi FreeBSD Ports and Packages 7 1st October 2008 09:27 PM


All times are GMT. The time now is 02:50 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick