-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Add disk IO write mode write-through to advanced settings #17005
Conversation
This basically allows this patch to work arvidn/libtorrent#6703 Side note: Anyone claiming that the libtorrent patch had no effect is because the settings was being overridden by the OS cache settings so basically it was using os cache instead of write through. |
Main point to note! Reference: arvidn/libtorrent#6561 (comment) & arvidn/libtorrent#6561 (comment) |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although not strictly required, the webui part is absent. Maybe try adding it? (a non-trivial portion of users are using it)
Added! |
@Chocobo1 |
I have no opposing reason to say no. |
This comment was marked as off-topic.
This comment was marked as off-topic.
(for the record, in my case it doesn't solve arvidn/libtorrent#6561 at all : / ) |
I’d assume you mean that the write through mode set with the build from github actions doesn’t work for you on a windows system? Can you provide some more info as to you system configuration, working set size set in qBittorrent and the process memory priority? |
Hello, I mean that the performances (constant download speed in my case) doesn't improve. It's still acting like a yoyo (full speed => very slow while it's writing the piece => full speed => very slow while writing, etc). Of course all is ok with lib 1.2.x. My system is Windows 10 x64, 32gb of ram, i3-8100i cpu, nvme ssd drive (mp510). I try with process memory low, normal, same stuff. Working size set a 2GB, but the ram usage is always under anyway. Now I guess this PR is very usefull from some people, but for the people affected by inconsistent speed problem, it's not helping a lot. Still, good job doing this : ) |
I am not experiencing any difference compared to the latest Master-CL build. The problems I notice are the same as @Rootax mentioned here, here and here. The HDD is reading a lot of MB/s for an unknown reason which slow the writing to HDD down enormously and eventually the download speeds goes down. |
Yes I changed this setting. For the other issue, from what I read it's impacting mechanical drives, but ssd, not so much. But even with only one hashing thread, same behaviour. |
If this is actually relevant then it is real disadvantage of MMap based I/O subsystem. |
@Chocobo1 I had the same experience as @Rootax on 1 hashing thread. Also I did set "Disk IO Write Through", even tried it with POSIX but then qB became frequently less responding ie stuck so that setting went back to default (memory mapped).
From what I have read @arvidn is aware of this since it is not windows-only. |
this is related: arvidn/libtorrent#6861 |
What is current status of this PR? |
Some previous comments suggest that the slow download is due to unnecessary disk reads and this PR doesn't help their situation. So I'm not confident in continuing with this. |
The idea of exposing libtorrent settings is still valuable IMO, it gives users a chance to try something out. |
I think libtorrent should add back RC1_2 style disk I/O and make mmap I/O optional. The former being more predictable and much less buggy. At this point introducing new things in qBit like working set limit and PRs like this one which are half baked solutions, might end up with unexpected pitfalls. |
I don't think it will happen, the main "improvement" was |
This is a huge drawback of libtorrent 2.0, which apparently will not allow it to replace libtorrent 1.2, even despite the support of BitTorrent v2, which no one needs at the cost of such an unsuccessful I/O subsystem. After all, memory problems are far from its only drawback. This can include problems with network drives, problems with the latest macOS, etc. |
Yes, but it seems to have failed. |
Yes, at least for some people in some scenarios. The new disk I/O subsystem does not preclude using a threaded |
This comment was marked as off-topic.
This comment was marked as off-topic.
src/gui/advancedsettings.cpp
Outdated
// Disk IO write mode | ||
m_comboBoxDiskIOWriteMode.addItem(tr("Disable OS Cache"), QVariant::fromValue(BitTorrent::DiskIOWriteMode::DisableOSCache)); | ||
m_comboBoxDiskIOWriteMode.addItem(tr("Enable OS Cache"), QVariant::fromValue(BitTorrent::DiskIOWriteMode::EnableOSCache)); | ||
m_comboBoxDiskIOWriteMode.addItem(tr("Write Through (requires libtorrent >= 2.0.6)"), QVariant::fromValue(BitTorrent::DiskIOWriteMode::WriteThrough)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO (for GUI only) it isn't good to use a such wording, better use #if
to enable/disable it at compile time. Otherwise linux user might complain that they upgraded the libtorrent version from 2.0.5 to 2.0.6 but the option is not working.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
then what'll be selected incase someone downgrades?
#17005 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed the wording a bit. See if that helps.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise linux user might complain that they upgraded the libtorrent version from 2.0.5 to 2.0.6 but the option is not working.
Why not increase requirements up to libtorrent 2.0.6 (for 2.0 branch)?
better use #if to enable/disable it at compile time.
IMO, it's preferred way for GUI.
@summerqb, don't you still understand why we can't do the same in WebUI?
then what'll be selected incase someone downgrades?
#17005 (comment)
The mentioned comment is about differences between the same qBittorrent built with different branches of libtorrent.
I mean if option in config is write-through but libtorrent is 1.2 (e.g. libtorrent 2.0 based build was used previously) you should explicitly replace it with one of the supported options.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
then what'll be selected incase someone downgrades?
From previous discussion with other developers, we reached an conclusion: It is often near impossible to provide reliable behavior for downgrades so we usually won't talk about it. We would only consider upgrade scenario.
As for this specific code: qbt will detect incompatible setting (on start up) and use the default value (which is EnableOSCache
). So the work around you added in advancedsettings.cpp is unnecessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is often near impossible to provide reliable behavior for downgrades so we usually won't talk about it. We would only consider upgrade scenario.
IMO, we shouldn't still consider switching between libtorrent 1.2 and 2.0 within the same qBittorrent as a clear upgrade/downgrade. Although we cannot consider it as something ordinary and reliable.
This comment was marked as outdated.
This comment was marked as outdated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One last comment and then it is ready
Appveyor is failing, so either its libtorrent needs to be updated or qbt needs to bump its supported libtorrent version number. |
Splits the OS cache settings into Disk IO read/write modes
And what will be saved to the settings file if the user applies some changes? I would still prefer to see the option that is effectively used. It seems that we are confused about what we want to get in the end. |
It is missing a conditional at the enum definition which will obstruct the invalid value detection, and I'll handle it.
It seems it already do that.
It is cumbersome to do that in the current code, so IMO lets just let it silently fall back to default value for now. Other comments should be already handled correctly. |
and separate the disk IO read mode settings.
This also removes the OS cache settings since it's broken into separate configs now.