crazy-max / docker-rtorrent-rutorrent

rTorrent and ruTorrent Docker image
MIT License
457 stars 103 forks source link

rTorrent: Add TCP socket configurations #322

Closed stickz closed 2 months ago

stickz commented 5 months ago

By overriding the default rmem and wmem values for TCP sockets, we can greatly improve torrent throughput on rTorrent at a tiny cost to memory.

The default values of 4M per socket are a significant step up from rTorrent defaults. The maximum values are raised on alpine, allowing the user to configure up to 64M if they desire. Socket values only need changed with 2GB of less of system memory.

Environment variables are added to allow the user to control the values within the docker container. Documentation is updated explaining the environment variables and a recommendation for the next steps.

newadventure079 commented 5 months ago

Tiny typo: "unless both the memory and speed requirements are meant" -> "unless both the memory and speed requirements are met"

stickz commented 5 months ago

Tiny typo: "unless both the memory and speed requirements are meant" -> "unless both the memory and speed requirements are met"

Resolved. Thanks!

GH0STDATA commented 4 months ago

@stickz is there any way to possibly host your fork of this on Docker so that we can pull yours instead? Its been about a month and these pull requests haven't been merged. It seems like you're the only one who has been pushing updates to this docker build lately. I'm guessing crazy-max is busy with life and hasn't been able to hop on GitHub recently.

stickz commented 4 months ago

@stickz is there any way to possibly host your fork of this on Docker so that we can pull yours instead? Its been about a month and these pull requests haven't been merged. It seems like you're the only one who has been pushing updates to this docker build lately. I'm guessing crazy-max is busy with life and hasn't been able to hop on GitHub recently.

No, I don't want to create forks. There's also alternatives like the swizzin project you can use, if you're not happy with the pace of development here. I'll remind crazy-max about this pull request. I don't have time ether, it's better to help crazy-max out.

@crazy-max are you able review this pull request? Once merged, could you release a new version? We have memory leak fixes, a crash fix for rtorrent and now significant improvements to throughput on TCP sockets.

GH0STDATA commented 4 months ago

No, I don't want to create forks. There's also alternatives like the swizzin project you can use, if you're not happy with the pace of development here. I'll remind crazy-max about this pull request. I don't have time ether, it's better to help crazy-max out.

That's perfectly understandable. I understand that people are busy, it was worth a shot asking. Thanks for responding and hopefully these fixes get merged soon!

ac1dburnz commented 4 months ago

@stickz im trying to test out your changes locally and I cannot manage to test them.

-02-22 00:49:25.997619-05:00rtorrent: Failed to parse command line option: Error in option file: /etc/rtorrent/.rtlocal.rc:50: Not a value.
2024-02-22 00:49:26.998027-05:00rtorrent: Failed to parse command line option: Error in option file: /etc/rtorrent/.rtlocal.rc:50: Not a value.
2024-02-22 00:49:27.997957-05:00rtorrent: Failed to parse command line option: Error in option file: /etc/rtorrent/.rtlocal.rc:50: Not a value.
2024-02-22 00:49:28.999515-05:00rtorrent: Failed to parse command line option: Error in option file: /etc/rtorrent/.rtlocal.rc:50: Not a value.
2024-02-22 00:49:30.000494-05:00rtorrent: Failed to parse command line option: Error in option file: /etc/rtorrent/.rtlocal.rc:50: Not a value.
2024-02-22 00:49:31.007862-05:00rtorrent: Failed to parse command line option: Error in option file: /etc/rtorrent/.rtlocal.rc:50: Not a value.
2024-02-22 00:49:32.000831-05:00rtorrent: Failed to parse command line option: Error in option file: /etc/rtorrent/.rtlocal.rc:50: Not a value.
2024-02-22 00:49:33.009252-05:00rtorrent: Failed to parse command line option: Error in option file: /etc/rtorrent/.rtlocal.rc:50: Not a value.
2024-02-22 00:49:34.003277-05:00rtorrent: Failed to parse command line option: Error in option file: /etc/rtorrent/.rtlocal.rc:50: Not a value.
2024-02-22 00:49:34.717860-05:00172.11.0.1 - - [22/Feb/2024:00:49:34 -0500] "GET / HTTP/1.1" 200 14834 "-" "kube-probe/1.26"
2024-02-22 00:49:34.717884-05:00172.11.0.1 - - [22/Feb/2024:00:49:34 -0500] "GET / HTTP/1.1" 200 14834 "-" "kube-probe/1.26"
2024-02-22 00:49:35.013992-05:00rtorrent: Failed to parse command line option: Error in option file: /etc/rtorrent/.rtlocal.rc:50: Not a value.
2024-02-22 00:49:35.193961-05:00192.168.2.185 - - [22/Feb/2024:00:49:35 -0500] "GET /plugins/diskspace/action.php?_=1708580954238 HTTP/1.1" 200 44 "http://192.168.2.6:8080/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Safari/605.1.15" 
Screenshot 2024-02-22 at 12 52 01 AM
stickz commented 4 months ago

@stickz im trying to test out your changes locally and I cannot manage to test them.

Just put the following commands in your .rtorrent.rc file. You're overcomplicating things.

network.send_buffer.size.set = 4M
network.receive_buffer.size.set = 4M

This PR is for environment variables within the docker container. It's not required to use it until it's merged.

ac1dburnz commented 4 months ago

@stickz I know it is not mandatory, I just wanted to try it. I was using the environment variables but they were not populating. I think something else might be happening though not fully related to this and something in general isnt working. There are more variables that are just not poplucating the default values. For example,

Configure whether to delay tracker announces at startup

trackers.delay_scrape = @RT_TRACKER_DELAY_SCRAPE@

However, most of the other ones are generating.