Forum Discussion
BrowserMetrics
Happened again last night while leaving the browser open overnight, over 76GB of these files
- JimGrishamMar 28, 2021Iron Contributor
lexcyn (and dave260) Have you tried turning on automatic compression for the BrowserMetrics folder, as I detailed above? (If so, do you have anything notable to report?)Anyone else?(I haven’t personally seen any ill effects yet from enabling automatic compression.)
PSA: if you can fulfill the data request from Alexandra-R, please do that first! The sooner the team gets data the sooner they can figure this out.
- Jim
----
Aside: With the explosion (in both usage and number) of plain-text configuration, log, and analytics files in recent years, I wonder if NTFS compression should be used by default in many more places...
[Even with medium-speed SSDs, accessing a compressed file might be faster (fewer IOPS as well), let alone for those poor souls still using HDDs for their boot disk.
I’m not well-versed to know for sure, but memory-mapping files that a program needs extensive access to may contribute to the current disk performance challenges across various ‘modern’ operating systems (in theory and benchmarking, maybe this shouldn’t be a problem due to something like ‘intelligent caching’ in disk and VM systems, but in real-world multi-threaded multi-tasking usage, might not even the most ‘intelligent’ cache prediction system fail to determine user intent in order to optimize performance?).
It shouldn’t be that surprising that browsers such as Chromium-based Edge, in some ways nearly mini-OSs themselves, might end up being a canary for this sort of systemic issue. They are very complex and usage can vary widely by user and time - this isn’t just ‘winword.exe accessing hugereport.doc’ anymore!]
... and all that is aside from the performance impacts of having thousands or more files per process - each one places load on systems and filesystems upon reading (e.g. for each and every file opened, even read-only: verifying access rights, recording ‘atime’ access time, and performing other security/audit logging), writing (most of those same activites, plus updating modification times and file system journals, and perhaps SSD ‘write amplification’), and for purposes of indexing, backup, and security (Windows Defender Real-Time Protection). Many are likely to be left behind when new builds are installed. Sure, some of those things can be disabled on a per-file, directory, or process basis, but... without giving admin rights to the application?
Even if developers of most programs know how to do this, even if allowed to by system security and domain group policy, why would they remember to do this on every release? If using a cross-platform framework, they may not even _be aware_ of these issues, or have an API to address them.
- dave260Mar 31, 2021Brass ContributorJim, yes I did try setting the BrowserMetrics folder to auto compress. That seemed to help initially, but today it is up to 2400 files, 9.6 GB (4K/file). Date-range is 3/28-3/31. Interesting to note that uncompressed files were same size in properties - Size of File and Size on disk (4.00 MB). As compressed, there is a slight difference in Size of File (4.00 MB) vs Size on Disk (3.94 MB). So compression is doing very little it seems. Initially, compression was very good, but I'm wondering if upgrading to latest version of Edge changed compression effectiveness?
Latest Edge version updated after the first compression trial. Now 89.0.774.63 (Official build) (64-bit). Previous version was 89.0.731.xx as I recall..
Alexandra-R My apologies for not submitting the info for your request. I will hopefully get that to you today!
- Dave- JimGrishamMar 31, 2021Iron Contributor
dave260,
Thanks for the details - interesting. Based on those comments and my own observations, it appears that:- a new empty 4MB file is created as often as about 10 minutes (but not as a ‘sparse’ file) in the BrowserMetrics folder
- this _could_ happen more often if you have multiple tabs or windows open
- (depending on browser usage? sleeping tabs?) the file fills up during that time with data that is either pre-compressed or otherwise not well-compressed by the LZX algorithm
- the fact that my files were mostly empty / highly compressible _could_ be related to my having optional diagnostics disabled ... maybe the files are allocated but the policy correctly prevents writing much data to them
- my files may have been mostly empty if my browser was open but not being interacted with during those times (and/or because most/all tabs were ‘sleeping’)
- in some cases those files aren’t deleted after a period (48 hours? after upload?)
Of note, I checked the BrowserMetrics folders for my installations of the Dev and Canary branches and didn’t notice excess files (but I haven’t used those branches much in the past week).- Have you tried the Beta, Dev, or Canary branch/ring versions of Edge*?
- If so, did you notice this issue? (if you answer either of those, please include the version number and branch/ring name)
- If you have any non-standard networking situation (network firewall or custom DNS) that could be blocking analytics uploads, that’s probably worth mentioning.
- Have you noticed BrowserMetrics files being created more often than about every 10 minutes?
- Since Edge runs some/all tabs separately (i.e. thread or process per a set of tabs and/or windows, and _maybe_ also for certain javascript / 3rd party website tracking code), perhaps some of those processes are crashing (even invisibly to the user) and in that case never getting the chance to clean up their mess.
- Have you noticed any sites you have been using frequently crash / auto-reload?
- Are you using the 'sleeping tabs' feature of Edge?
- Jim
* (if you haven’t, they seem to work nicely with synced Edge profiles, so it’s fairly easy to give them a try!)
[P.S. Even if this is an intermittent problem, or it is identified and fixed soon, perhaps to proactively identify _future_ issues, something as complex and resource-intensive as a modern web browser should be programmed to occasionally police its entire profile/temporary/etc. directories to identify abnormally large or old data sets and either automatically clean them up or (at the very least) report the problem to the user and developer.] - a new empty 4MB file is created as often as about 10 minutes (but not as a ‘sparse’ file) in the BrowserMetrics folder
- dave260Mar 25, 2021Brass Contributor
Yes, I'm up to 14 GB since 3/20/21; almost 3 GB/day. Some of you seem to be having much higher usage by Browser Metrics. I'm hoping for progress by the Microsoft Edge team soon!