Forum Discussion
BrowserMetrics
I just cleared out the files a couple of days ago and already up to over 12k new files, all spaced 1 day apart. Added all the details into a txt file in the upload!
lexcynHow far apart are the dates/times on your files? [Unless my quick math is wrong, 12,000 files over 2 days (48 hours) would be 250/hour, or a new file every 15 seconds or less. Even if over 4 days (96 hours), that is 125 files/hour, still over 2 new files _per minute_.]
dave260 Here's probably why the NTFS file compression isn't working for you:
- When NTFS compression is enabled on a file:
- The file is broken up into small sections
- Every time one of those sections is written to,
- The data for that section (including any changes being saved) are compressed in RAM.
- If the compressed size is smaller than the size of the uncompressed data, the compressed section is written to disk.
- If the compressed size is about the same or larger than the uncompressed data, that section is written uncompressed
- The data for that section (including any changes being saved) are compressed in RAM.
- What I think Edge is doing:
- Creates a new empty 4MB file
- 'Memory-maps' that file to an area of memory so that Edge can write to it directly
- Each time it has a drop of 'metrics' data, it stores it in RAM
- Since the file is 'memory-mapped', the system (Windows' virtual memory subsystem and/or the CPU's internal Memory Management Unit) automatically writes the changed data to disk, some small number of bytes at a time
- Since only a tiny bit of data is changing at any one moment, NTFS compression doesn't bother with it (guesses: because it's either too small, because by itself it doesn't compress well, or because it never really works for memory-mapped files)
If you were to turn off compression for your entire BrowserMetrics folder and its contents, and them immediately turned it back on, I think you'd find that all existing files would be greatly compressed, but new files would not. So much for that idea!
- dave260Apr 01, 2021Brass ContributorThanks Jim for the update and details! I will attempt to try your ideas, including the other versions of Edge in your other post above. I like your reasoning about why the auto compress may not compress as expected. Brilliant! I didn't know that. Since I had good results with compression at first, I was surprised when I saw almost no compression today. Other comments above in your later post.....
-- Dave - lexcynMar 31, 2021Iron ContributorUsually around 24h apart from first to last. I just checked and there are another 12004 files in there that I just removed. Can't wait until they fix this 🙂
- JimGrishamMar 31, 2021Iron Contributor
Okay, here’s a temporary fix* to try if you need the disk space before this gets fixed (I’m not at my computer and so haven’t tested it yet):
- Close Edge
- Delete existing files from the “BrowserMetrics” folder
- Open the “Properties” window for the “BrowserMetrics” folder, and remove all permissions for your username (optionally except for “Read” permission)
- Reopen Edge, and check for the results (after say, 10 minutes and then a few hours later).
If that doesn’t work, instead of step 3 above, try:3a. Delete the BrowserMetrics folder itself
3b. Create a new empty text file called “BrowserMetrics” in the place of the deleted directory
3c. Make sure the new file does not have a file extension (e.g. “.txt”)
Hopefully that will block Edge from creating new metrics files there.
If you don’t need the disk space right now, though, please don’t do that yet so you can continue helping with the troubleshooting.
- Jim
* Background: the base code from the Chromium project is set to fail gracefully and discard the temporary data if it can’t write to that directory