Forum Discussion
BrowserMetrics
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.
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.]- dave260Apr 01, 2021Brass ContributorWell Jim, I just wrote a really good response to your really good post and deleted it accidentally! So briefly, great explanation on how the Browser Metric files work as far as size and frequency. I do use sleep tabs (Tab Session Master). I often have a lot of tabs open. Edge has done pretty well until I ran into high CP usage with Windows Explorer after a few days (25-40%) and Spot Verifier (svsvcs) - 25-30% and some others that are not easily stopped, so I end up rebooting Edge or the computer.
No unusual firewall or DNS setup.
I haven't closely analyzed how often BM files are created. Basically I had 2400/72 hours, so that is about 24/hour or 1 per 2 minutes? I will try some of your ideas about the BM folder and let you know if anything really worked to control the rapid buildup. Actually the BM files, for me, are not nearly the problem that Windows Explorer and other system services are causing with High CPU. Once today I had 100% CPU and every program was closed except System Services that could not be manually stopped. I like W10 and Edge, but these challenges cause me to occasionally look my previous standby, Firefox!
Thanks for your input. If I missed responding to a specific question you had, just let me know.
-- Dave- JimGrishamApr 01, 2021Iron Contributor
Note: this reply likely doesn’t directly relate to the BrowserMetrics issue discussed in the rest of this thread
dave260 : To troubleshoot your CPU usage issue, especially if the ‘Details’ and ‘Services’ tabs of ‘Task Manager’ don’t lead you to the solution, you can always try Microsoft’s free ‘Process Explorer’.
(It’s got a bit of a learning curve, but one should be able to pick up the basics in 5-10 minutes - I’m sure there are gobs of tutorial videos and articles online in addition to the official docs.)
- Jim
P.S. If you’re at all like me, it’s easy to confuse that tool with the similarity named ‘Process Monitor’ - this later one instead monitors and records access by processes to the registry/files/network/etc. It can filter by process or access type (e.g. read vs write vs checking if a file exists), either in real-time or after stopping a recording. I normally use this to figure out why something is slamming the disk and/or network. It could potentially help in your case, too, by showing exactly what a busy process is doing to eat up all that time. (Expect to spend up to maybe 20 minutes figuring out how to use this tool - hint: <CTRL-e>, <CTRL-a>, and <CTRL-x> will be your friends here.) If there’s not much shown in Process Monitor, your app is probably just doing tons of math! 😉
- a new empty 4MB file is created as often as about 10 minutes (but not as a ‘sparse’ file) in the BrowserMetrics folder