Page 1 of 1

[Plugin] wslimit v0.2

Posted: Tue Jan 17, 2023 8:28 am
by mhertz
This plugin is for libtorrent v2.x users wanting to limit memory usage to avoid performance degredation when page cache fills up, as been reported previously. It's comparabel to qbittorent's implementation regarding this, also using same default of 512 MiB and being windows only, as linux support isn't available in usefull form currently(though can there try using systemd service file option 'MemoryMax' or 'sudo systemd-run --scope -p MemoryMax=512M --uid=deluge -u deluged deluged', or docker's '-m' option).

I additionally added a few extra related things I saw qbittorrent do, i.e. set memory priority of process to below normal while to avoid thrashing/sluggishness of the app, set "main event loop" thread to normal memory priority which is higher/equal than other threads, and a workaround for improving responsiveness of app when CPU resources are scarce, by raising main event loop thread to be just one level higher than libtorrent threads.

GTK-UI, Web-UI and config-file support for adjusting memory limit.

Code is available inside plugin, just unzip it.

Thanks to ambipro for original idea, offering help and testing, appreciated buddy.

wslimit-0.2.egg

Re: [Plugin] wslimit v0.2

Posted: Thu Jan 19, 2023 7:36 pm
by mhertz
I added adjustable process memory priority as qbittorrent supports that too, though currently only adjustable in GTK-UI and config-file, as the web-UI is hard for me with mapping dropdown combo boxes etc, which i've never used before. Will add later if I can though, but meanwhile can edit 'prio' in wslimit.conf if wanting change away from default 'below-normal'.

Also now checks for windows OS and stops if not.

Link updated in first post.