rinetd icon indicating copy to clipboard operation
rinetd copied to clipboard

Severe throughput degradation with 0.73 on FreeBSD

Open morganwdavis opened this issue 1 year ago • 4 comments

This new 0.73 build has severely degraded performance in my application compared to the previous 0.62_4. I'm running rinetd as a simple port 80/443 redirector over a Wireguard tunnel between two FreeBSD 13 servers.

Under the previous .62_4 version, loading a web page over the connection results in these respectable browser stats (about a second):

46 requests 759.24 kB / 413.67 kB transferred Finish: 1.08 s DOMContentLoaded: 468 ms load: 603 ms

With the new 0.73 version, the same page has these stats (nearly 30 seconds):

45 requests 758.91 kB / 435.01 kB transferred Finish: 28.06 s DOMContentLoaded: 2.66 s load: 28.06 s

You can literally watch the images on the page draw out in bands as the bytes stream over slowly and render like a PPP connection from 1998. Some requests simply fail to load and render broken web pages.

I initially suspected my problem was due to other factors, so I troubleshooted everything else until I finally narrowed it down to the recently updated version of rinetd. I found the older .62 package and installed it to replace .73 and all was well again.

I install rinetd through the FreeBSD packages mechanism. I reported this issue to the FreeBSD bug tracking system and the port maintainer requested that I share my findings here.

morganwdavis avatar Nov 14 '23 22:11 morganwdavis

I'm the original cause of update to 0.73 in FreeBSD ports :)

For reference: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=274331

I tested if for more than month on production and didn't notice this kind of degradation, although my usage patterns may differ (long living connections).

Older version used custom patch to use poll instead of classic select approach. There's an issue here to allow using modern methods: https://github.com/samhocevar/rinetd/issues/16 although not work was done. I'll try to prepare patch here but it may take few days anyway. If it's critical you still may need to downgrade until it's ready.

marcin-gryszkalis avatar Nov 21 '23 09:11 marcin-gryszkalis

This is a "me too". Performance of my IMAP connections going through rinetd have dropped to about 10 KB/sec even though everything is connected with Gigabit LAN. FreeBSD 13.2.

maxlor avatar Feb 18 '24 10:02 maxlor