Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"transmission-gtk" freezes right after downloading because of "nocache" #36

Open
beroal opened this issue Oct 21, 2018 · 4 comments
Open

Comments

@beroal
Copy link

beroal commented Oct 21, 2018

When downloading of any torrent is complete, the program hangs. Then sending the SIGTERM signal does not terminate the Transmission process, only SIGKILL does. "transmission-gtk" does not freeze if I run it without "nocache". I checked this bug on 2 versions of "transmission-gtk". The version of "nocache" is 1.0.

@Feh
Copy link
Owner

Feh commented Oct 22, 2018

SIGKILL can’t be blocked, so that’s not surprising.

I’ve never used “transmission”, could you try to reproduce this with a smaller program and/or a precise sequence of steps? A log of strace might be useful if you can’t get that – e.g. where is the program spending its time.

But before doing that, can you elaborate what you want to achieve? Did you read the README file where it says you can also limit the RAM usage of a program by putting it into a cgroup? That might be a more appropriate use case than the somewhat heavy-handed syscall intercept that nocache is doing.

@beroal
Copy link
Author

beroal commented Oct 22, 2018

Thanks, I will try "strace".

But before doing that, can you elaborate what you want to achieve?

Transmission is a BitTorrent client, so it reads a lot of data from the file system, mostly video. Second access to that data will probably be in a month, so there is no need to keep it in the file system cache.

@Feh
Copy link
Owner

Feh commented Oct 27, 2018

I think using nocache is a bit misgueded here. Instead, if you’re concerned about cache thrashing by a BitTorrent client, I’d suggest executing the command in a cgroup with limited memory – you have all the benefits (LRU cache that caches the most useful stuff) without any of the downsides (using dlsym hacks that don’t reliably work).

@beroal
Copy link
Author

beroal commented Oct 28, 2018

A BitTorrent client is a typical situation where the LRU cache algorithm is inefficient. Least Recently Used time is not precise enough to represent real access frequency. So I help the program by disabling cache for specific directories (using my patch). I do not know how to achieve this with cgroups.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants