Discussion:
[libtorrent] How can i disable cache/buffer memory usage completely?
Kurt Seo
2017-01-09 07:53:16 UTC
Permalink
Hi



I am using libtorrent with python binding on linux. Main goal of my
app is analyze diff data using torrent hash info and update diff data
by torrent download.

So most of functions are based of hash-check. My system is very
sensitive for memory usage and i want to limit memory usage very hard.

But any of torrent_settings don't work for me. It uses memory as much
as possible. I tried 'sync' mount option - it's ntfs-3g -, but it
didn't work.


What else i can do?


Thanks always
m***@beroal.in.ua
2017-01-09 08:31:10 UTC
Permalink
Hi, Kurt. If I understand you correctly, your program computes hash of a
lot of data, and that data stick in the Linux file cache despite you
don't need them. If this is correct, then I should say that this problem
occurs in many programs, like media players, and is not specific to
LibTorrent or file sharing.

There is a program for Linux that forbids a specific process to use
cache completely:

https://github.com/Feh/nocache .

My patched version of this program

https://github.com/beroal/nocache

allows to disable cache for specific file paths. It is useful because it
allows to cache configuration and torrent resume files. It is kind of a
workaround, Linux has no convenient switch for disabling file cache, but
it works for me.
Post by Kurt Seo
Hi
I am using libtorrent with python binding on linux. Main goal of my
app is analyze diff data using torrent hash info and update diff data
by torrent download.
So most of functions are based of hash-check. My system is very
sensitive for memory usage and i want to limit memory usage very hard.
But any of torrent_settings don't work for me. It uses memory as much
as possible. I tried 'sync' mount option - it's ntfs-3g -, but it
didn't work.
What else i can do?
Thanks always
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Libtorrent-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/libtorrent-discuss
Loading...