-
Notifications
You must be signed in to change notification settings - Fork 80
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
Logging of the number of blocked sites causing constant HDD noises in permanent PBM #3100
Comments
Saving is asynchronous and the documentation warns against making asynchronous calls when the extension shutdown, as there is no guarantee they will be fulfilled:
So what you are asking is not possible. uBO saves the blocked/allowed request counts, but only when they change, and at most once every 23 seconds: https://github.com/gorhill/uBlock/blob/1.55.0/src/js/storage.js#L103-L108. I could possibly make use of |
I fear 4 minutes would be not enough to really improve this considering all the circumstances so unless there are other reasons to do this it might be not worth for just this ticket. Would the ABP solution then be a possibility (not storing the blocked/allowed request count at all when in PBM)? The counters are nice to have but back then when they changed that it was quite a big improvement here when the HDD was finally silent. Or alternatively an advanced setting could do this as well if others would like to keep the counters in PBM. |
I disagree that PBM should affect whether request stats should be counted or not. However, I do think that an advanced setting to not persist the request stats across sessions regardless on PBM is something that can be useful for the issue here and other requests that I have seen in the past. |
I think that would be fine then and I don't have to go nearly crazy again from the noises. (Or I wait some years until a SSD is built in - but HDD's are still quite common and also useful in some cases) |
To disable collating global blocked/allowed counts. Boolean, default to `false`. Setting to `true` will prevent uBO from loading/saving global blocked/allowed counts, and in such case the "Blocked since install" count instead reflects the count since uBO launched. Setting back to `false` will cause the counts to resume from last time they were saved. Related issue: uBlockOrigin/uBlock-issues#3100
@Sworddragon toggle |
I didn't expect to see this implemented that fast, so thanks for doing all the work associated with it! From the commit description it seems any write/read I/O for those statistics will be disabled and instead we will get memory-only counters since the last start of the extension which can still be quite useful. Things are currently quite hectic here but at the latest when a final version is being released I will do another detailed test to monitor for any disk noises and logged I/O activities. |
What I fixed here is to provide a way to not keep track of global blocked/allowed requests, nothing more nothing less -- and if that works as described, the issue should be closed. Your personal issue of "HDD noises" is not a uBO issue, so this should not prevent closing the issue here. uBO will of course continue to persist data as needed through the various storage-related APIs, this is not something that will change if the goal on your side is no "HDD noises" -- this is something you will have to figure yourself. |
I agree, that rule should apply not only to old software, but also to old / obsolete hardware.
I agree, as nowadays, no one, except dinosaurs, uses HDD for operating system and / or internet browsing, this is 2024, not 2014, OP can get a very fast SSD for a few bucks, if he can't for some reason, it's his problem, not uBO's. Also I wonder whether OP has tried adjusting AAM (Automatic-Acoustic-Management) of his HDD, and set it to "Quiet mode" as most HDDs are capable of it: https://recoverhdd.com/blog/make-your-hdd-faster-or-quieter-with-automatic-acoustic-management-aam.html and whether it does help or not in this case. |
I was thinking about to close the issue with my last post but I wasn't sure if this project prefers closing them on their own (for example bulk-closing on new releases). But yes, the issue can be closed then.
HDD noises are fine as long as they aren't permanent even on idle and the commit should fix that. In the past there were only 2 sources of constant HDD noises here (as anything else on the system including Windows itself usually does anything via bursts-writes): Firefox due to an issue where it is not fully known yet if this is a bug and Adblock Plus due to the same issue as described here for uBlock Origin. Both ad-/content-blockers addressed this issue. Also the HDD noises were tied to uBlock Origins I/O activities from the blocked/allowed counters as observed via Windows's resource monitor and as being a downside this is not only limited to HDD noises - for example it might also prevent a more effective power saving on a system independent of the used storage type. I wouldn't call this a personal issue but it also isn't technically a bug either if one is fine with that - it might just not so really have been optimized (pre-patch).
The HDD is from 2019/2020 (due to replacement) which really isn't that ancient. Also back then 2TB SSD's were around 5 times as expensive as a same-sized HDD (and they are still around 2 times as expensive as of today) and they work just fine even with Windows. But yes, I have already plans for quite a while that my next storage device will be a SSD - once the HDD malfunctions. |
It's not about a year of production of a HDD, it's about how old/ancient is the HDD technology and it's speed, it's too ancient for running OS or internet browsing on it comfortably, they are produced still in 2024 and will be even in 2030, but their purpose is to serve as a storage for big or many files: backups, videos, games, music, setups, iSOs, etc.
I didn't say it was wrong that you bought HDD many years ago.
I don't understand this argument, you don't need a 2 TB SSD disk for OS you can buy a cheap 256 GB or 512GB SSD for OS and still keep your 2TB HDD for files, unless you use a notebook rather than a desktop PC, and you have only a single slot for disk, but even then you can keep your HDD as an external portable HDD connected via USB to your notebook or can buy a combined SDD + HDD disk called SSHD (Solid-State Hybrid Drive).
No, they don't, they are very slow, when you get SSD you will feel the difference, it's like switching from a tractor to a racing car.
When is it going to happen, in 2030 or 2035, I wish you luck... Also thanks for not answering the question about AAM (Automatic-Acoustic-Management). |
On testing this with uBlock Origin 1.57.0 on idling on YouTube I indeed don't see any I/O activities in Windows's resource monitor anymore related to uBlock Origin after I set requestStatsDisabled to true (while I still see them when set to false and in both cases the blocked counter increases over time). So this works as expected but there is one slight visual flaw: The blocked counter still claims to list all since the last installation while it lists only all since the last launch. However, the wiki implies using the same wording for both cases might be the intended behavior. |
Prerequisites
I tried to reproduce the issue when...
Description
It is probably the same issue Adblock Plus was affected years ago ( https://gitlab.com/adblockinc/ext/adblockplus/adblockplusui/-/issues/899 ) and today I even suspect my HDD might be SMR capable which might explain this even more.
Even when automatic filter list updates are disabled to rule this out as a cause and visiting a website that causes uBlock Origin to block anything (so the counter for the number of blocked sites goes up) I see in Windows's resource monitor (can be opened from the task manager) I/O activities in Firefox's profile folder under \storage\default\moz-extension*\idb*.sqlite .
The I/O activities continue even when doing nothing on the website and in my test it was sufficient to go to https://www.youtube.com , clicking reject all in the eventual appearing cookie/privacy banner and then just watching Windows's resource monitor for a few minutes.
I'm not sure I fully agree with Adblock Plus on their chosen solution to just not log the number of blocked entries anymore as I don't think this is too problematic information here (as long as no URL's are logged as well, which I assume uBlock Origin took already care of). If possible it might be sufficient for (permanent) PBM sessions to just keep the new numbers in memory and save them before uBlock Origin unloads (e.g. the user closes Firefox).
A specific URL where the issue occurs.
https://www.youtube.com
Steps to Reproduce
Expected behavior
I/O activities from logging should not happen (or only once at the end) when (permanent) PBM is used.
Actual behavior
Disk activities can be seen in Firefox's profile on \storage\default\moz-extension*\idb*.sqlite (matching the generated ID of uBlock Origin in the path) that occur initially when opening the website and then indefinitely every 1-3 minutes resulting in significant increased noises on HDD's.
uBO version
1.55.0
Browser name and version
Firefox 122.0
Operating System and version
Windows 10 22H2 64 bit
The text was updated successfully, but these errors were encountered: