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

Brave ignores --disk-cache-dir flag, caches Torrent downloads always on primary harddisk #13895

Open
crcdng opened this issue Feb 2, 2021 · 2 comments
Labels
feature/webtorrent Label for webtorrent related issues OS/Desktop

Comments

@crcdng
Copy link

crcdng commented Feb 2, 2021

Description

Brave always caches Torrent downloads on primary harddisk, ignores --disk-cache-dir flag

Steps to Reproduce

  1. Start Brave on a machine with a primary HD and a secondary HD, e.g. a USB connected drive
  2. Set Download location in "Settings -> Additional Settings -> Downloads -> Location" to secondary HD
  3. Start a (large) download on built-in Web Torrent. A large download makes the problem visible.

Intermediate Result: Brave fills up the primary HD

  1. Start Brave with flag --disk-cache-dir pointing to secondary HD
  2. E.g. on a Mac run in Terminal '"/Applications/Brave Browser.app/Contents/MacOS/Brave Browser" --disk-cache-dir=/Volumes/secondary/cache'
  3. Start large Download on built-in Web Torrent

Actual result:

Result: Brave initiates a cache on the secondary HD in the specified location but still fills up the primary HD

Remark: The space on primary HD is released after closing Brave.

Expected result:

Result: Brave should not fill up the primary HD. The reason to use a secondary HD is limited space on the primary HD.

Reproduces how often:

Always.

Brave version (brave://version info)

Brave | 1.19.88 Chromium: 88.0.4324.96 (Official Build) (x86_64)
Revision | 68dba2d8a0b149a1d3afac56fa74648032bcf46b-refs/branch-heads/4324@{#1784}
OS | macOS Version 11.2 (Build 20D64)

@diracdeltas
Copy link
Member

cc @yrliou @feross

@rebron rebron added the feature/webtorrent Label for webtorrent related issues label Feb 5, 2021
@feross
Copy link

feross commented Mar 22, 2021

This issue is a bit odd because WebTorrent currently uses an in-memory only downloading strategy.

@i3games Perhaps what is happening is that your RAM is being used up and the operating system is moving other memory to disk in a swap file. Can you check your RAM utilization when using WebTorrent and confirm if this is what you see?

If it's using your swap file as I suspect, then this issue will be resolved when we switch to a filesystem based store which will obey the Brave --disk-cache-dir flag. See #5563 issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/webtorrent Label for webtorrent related issues OS/Desktop
Projects
None yet
Development

No branches or pull requests

4 participants