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
HUGE amount of writes by storage.js.temp. Possible LZ4 archivation or less frequent rewrite? #892
Comments
I cannot provide any data, but I can confirm that the timestamp of storage.js is updated very often (-> disk writes). It's probably related to updating the block counter whenever something has been blocked. |
This is actually an important issue caused by the way FF implemented We will fix it asap. |
Oh, I am glad I helped. And thank you guys for working on it. |
Any news? The issue was fixed long ago, but even a month later there is no new point release available. |
@wdbw it's in beta channel here: https://addons.mozilla.org/en-US/firefox/addon/adguard-adblocker/versions/beta?page=1#version-2.8.1beta |
@AjvarXX Can you confirm whether this issue is fixed or not? While using the program FileActivityWatch I saw that several MB were written to the .js.tmp file after opening a website (on YouTube I even got multiple writes). Adguard extension 2.8.6 and Firefox 64bit v.60b9 |
Absolutely positive that it is fixed for me. |
What do you see instead? When do writes occur? For me the storage file (~5MB) is rewritten on every page load, and that can add up quickly. I would like to test with blocking statistics disabled, but there is no option for that. |
I have disabled the storage of the total block count, and that eliminates the writes. Why is this call not done on shutdown only? |
After upgrading to version 2.9.2 I took a closer look at the read/writes. Playing a three and a half minute YouTube video resulted in ~150MB of data written to the storage file. @ameshkov Any idea why this issue is not fixed for me? I doubt that this is the intended behavior. |
That wouldn't be reliable. Look at the Also, it seems that the fix of this issue is under review right now:
Why is it THAT HUGE in your case? It should be a couple of kilobytes max. Please try reinstalling AdGuard from scratch, maybe the old data is still there. |
It was called on YouTube while playing a video every ~7 seconds.
A fresh storage.js has this size: 3,60 MB (3.784.484 bytes) My file size is slightly bigger due to having more filter lists enabled. |
In my case, it is 1.5 KB. What's inside? For instance, here's what inside of mine:
|
Mine contains the filter list entries also, and that makes the file that big.
|
Hm, I don't understand why is it happening. Filters must be stored elsewhere in v2.9, that was the change that fixed this issue. What exact AdGuard distr do you use? AMO or smth else? |
I do have the AMO version installed. Browser console output (enabling the extension with no storage.js present):
|
The culprit is this error: It makes AG use the browser storage instead of the indexedDB |
@wdbw Could you also check |
60.0b12 (64-bit) + I have found the cause for this problem. According to the following bug report, the usage of indexedDB is disabled in private browsing mode: |
Not sure about this. It could've been true if we had used Anyway, we'll check it and get back to you soon. |
Uh, sorry for the late reply. I've filed a new issue about this particular incognito problem: #1006 |
@wdbw Could you export your firefox profile, please? I can't reproduce this issue with my configuration. |
I can reproduce the problem with the following steps:
|
resolved in pull request browser-extension/pull-requests/135 |
…ing events Merge in EXTENSIONS/browser-extension from feature/AG-8370 to feature/AG-2737 Squashed commit of the following: commit 347b552 Merge: 3acf245 3acdedf Author: Vladimir Zhelvis <v.zhelvis@adguard.com> Date: Wed Jun 9 11:43:14 2021 +0300 Merge remote-tracking branch 'origin/feature/AG-2737' into feature/AG-8370 commit 3acf245 Author: Vladimir Zhelvis <v.zhelvis@adguard.com> Date: Tue Jun 8 10:02:59 2021 +0300 add localized status column title commit 9f8eb66 Author: Vladimir Zhelvis <v.zhelvis@adguard.com> Date: Mon Jun 7 17:40:31 2021 +0300 fix status css commit a75f363 Author: Vladimir Zhelvis <v.zhelvis@adguard.com> Date: Mon Jun 7 16:14:24 2021 +0300 temporary disable auto update commit 7770785 Author: Vladimir Zhelvis <v.zhelvis@adguard.com> Date: Mon Jun 7 16:07:25 2021 +0300 delete unused element in filter events commit 898e375 Author: Vladimir Zhelvis <v.zhelvis@adguard.com> Date: Mon Jun 7 14:11:39 2021 +0300 remove commented import commit b4fd685 Author: Vladimir Zhelvis <v.zhelvis@adguard.com> Date: Mon Jun 7 14:06:08 2021 +0300 update eslint config commit 47200cf Merge: 1552036 bdd98dd Author: Vladimir Zhelvis <v.zhelvis@adguard.com> Date: Mon Jun 7 13:35:46 2021 +0300 resolve conflicts commit 1552036 Merge: 5b91e11 e06c20b Author: Vladimir Zhelvis <v.zhelvis@adguard.com> Date: Mon Jun 7 13:20:01 2021 +0300 Merge remote-tracking branch 'origin/feature/AG-8229' into feature/AG-8370 commit e06c20b Author: anton <a.kaprielov@adguard.com> Date: Mon Jun 7 13:08:33 2021 +0300 feature/AG-8229 fix styles commit 5b91e11 Merge: 6819b29 46e754f Author: Vladimir Zhelvis <v.zhelvis@adguard.com> Date: Mon Jun 7 13:04:05 2021 +0300 Merge remote-tracking branch 'origin/feature/AG-8229' into feature/AG-8370 commit 6819b29 Author: Vladimir Zhelvis <v.zhelvis@adguard.com> Date: Mon Jun 7 12:49:49 2021 +0300 remove log event updated commit 2f3473d Author: Vladimir Zhelvis <v.zhelvis@adguard.com> Date: Mon Jun 7 12:45:16 2021 +0300 rename responseStatusCode to statusCode commit c5d8359 Author: Vladimir Zhelvis <v.zhelvis@adguard.com> Date: Mon Jun 7 12:39:24 2021 +0300 fix formatting, split Status components in separated files commit 46e754f Merge: 81de786 f43de63 Author: Maxim Topciu <maximtop@gmail.com> Date: Mon Jun 7 12:15:41 2021 +0300 Merge branch 'feature/AG-2737' into feature/AG-8229 commit ca073b7 Author: Vladimir Zhelvis <v.zhelvis@adguard.com> Date: Mon Jun 7 11:56:04 2021 +0300 add localized titles in filter log statuses commit 4aa757f Author: Vladimir Zhelvis <v.zhelvis@adguard.com> Date: Mon Jun 7 11:35:15 2021 +0300 update request context storage tests commit 482dd5b Author: Vladimir Zhelvis <v.zhelvis@adguard.com> Date: Mon Jun 7 11:09:45 2021 +0300 fix formatting commit ae53866 Author: Vladimir Zhelvis <v.zhelvis@adguard.com> Date: Mon Jun 7 11:04:15 2021 +0300 update request info filter status commit 75a64b4 Author: Vladimir Zhelvis <v.zhelvis@adguard.com> Date: Fri Jun 4 23:31:56 2021 +0300 feature/AG-8370 add conditional rendering in Status comonent, update Status component css ... and 37 more commits
Steps to reproduce
Expected behavior
For such a light session of 4 hours Adguard shouldn't have written whopping 461MB
Actual behavior
Looks like Adguard extension rewrites non-archieved storage.js.tmp file over and over again. This alone would provide up to 4GB of writes per day on SSD.
Screenshot:
<>
I noticed that Firefox had same problem with sessionrestore (sessionrestore.js, recovery.js) and now they "bandaged over" it with including LZ4 archieving which cuts up from 30% to 90% depending on what's inside. Also you can reduce frequency from default 15 seconds of backing up session.
https://bugzilla.mozilla.org/show_bug.cgi?id=1304389
https://bugzilla.mozilla.org/show_bug.cgi?id=934967
Screenshot of the browser console:
Your environment
Addons:
<>
The text was updated successfully, but these errors were encountered: