Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
How Chrome ate 21GB of storage (francoismaillet.com)
189 points by ddcarnage on Sept 17, 2016 | hide | past | favorite | 76 comments



I feel like it's slightly dishonest not to mention that (according to the Chrome devs) this problem is caused by poorly-behaved modifications to the Chrome installer made by third-party redistributors, and not by Chrome itself.

(Disclosure: I work for Google, but not on Chrome.)


It's true that based on the bug report linked in the post, the application bundle is modified by a 3rd party installer running as root. I still think Chrome should correctly handle the permissions problem with a warning or asking for root privileges to fix it, but I've updated the post to point out Chrome itself is not the origin of the problem.


I meant 3rd party plugin installer, like DivX.


> I feel like it's slightly dishonest not to mention that (according to the Chrome devs) this problem is caused by poorly-behaved modifications to the Chrome installer made by third-party redistributors, and not by Chrome itself.

What do you mean ? if I download Chrome from the official website I get a third party installer ? because I have the exact same problem with that very official installer.


He means that bug report is about a third party installer screwing up the permissions and nothing changing it?

Can you point me to an official installer with the same problem?

I'm not aware of those installers installing anything as root.


It looks like the linked article has been updated at the end to clarify.

It sounds like some third party extension's installer (e.g. DivX) is reaching into Chrome.app and mucking with permissions (setting owner to root). Not sure why they don't install into "/Library/Internet Plug-Ins" (maybe it doesn't work with chrome anymore?)

(Edit: but a comment in the linked bug report suggests that this may also occur if Chrome is installed as one user and used by another.)


The bug report claims that in the different-user case you do get a privilege escalation prompt.


Oddly the author leaves out any mention of possibilities along these lines.


I've seen the official Opera installer for Windows exhibit this same behavior.


dishonesty averted! He added a disclosure. :-)


> I’m happily walking away from this with an extra 21GB in my pocket! And now I ask you: is your Chrome bigger than mine?

Given I don't have to rely on third party updaters, I doubt it. Let's see...

    $ let size=0; dpkg -L chromium | while read path; do if [ -f "$path" ]; then let size=$size+$(du -sb "$path" | awk '{print $1}'); echo $size bytes, $(($size/1024/1024)) megabytes; fi; done;
    172060669 bytes, 164 megabytes
    $ du -sh .{cache,config}/chromium
    8.4M  .cache/chromium
    25M	  .config/chromium
So the cache is 8M, config files 25M and program files 164M (listed by dpkg -L, then some command line magic to add up file sizes). A grand total of just under 200MB.


heh, nice

    user@t61:~$ let size=0; dpkg -L chromium | while read path; do if [ -f "$path" ]; then let size=$size+$(du -sb "$path" | awk '{print $1}'); echo $size bytes, $(($size/1024/1024)) megabytes; fi; done;
    162190110 bytes, 154 megabytes
    user@t61:~$ du -sh .{cache,config}/chromium
    386M    .cache/chromium
    84M     .config/chromium


I win? :P

    zod@DESKTOP MINGW64 ~/AppData/Local/Google
    $ du -sh ~/AppData/Local/Google
    2.9G    /c/Users/Zod/AppData/Local/Google
Edit: I do have 885 tabs open. (yikes! D:)


I made a simple firefox/chrome extension for people like you and me that horde tabs. You might find it useful to find tabs and quickly navigate to them by clicking on the link in the list. It's free and open source. The github page has a gif showing usage.

Chrome Extension: https://chrome.google.com/webstore/detail/tabist/hdjegjggiog...

Firefox Extension: https://addons.mozilla.org/en-US/firefox/addon/tabist/

source code: https://github.com/fiveNinePlusR/tabist


Cool! Is it possible to bring up Tabist with a hotkey? (Ideally configurable, but I'll take whatever I can get.) I'd use it all the time then.


It sure it is... any idea what it should be? Firefox has a problem with re-assigning keys but in chrome you can change them inside the extension manager area. There's a bug filed for firefox to fix this.


Any shortcut that could be pressed with one hand on a qwerty keyboard would probably be good.

I'm partial to Ctrl-` since it's cross-platform and seems to be unused, but some international keyboards might have difficulty with that.

Ctrl-Space would also be pretty nice.


can't bind to Ctrl-` because of some limitation of the browser and Ctrl-Space didn't work for some reason as well. I ended up using (ctrl/comamnd)+Shift+E as it didn't seem to have a shortcut assigned to it and it is very easy to use with one hand. Hopefully that works well for most people. I'll update the extensions today but it takes a few days to get code approval on firefox. Chrome update should be available within a few hours of submitting.


Sweet!

My next feature request would be to show the domain (e.g. "news.ycombinator.com") next to each link, like HN does. That'd let ctrl-F find by domain.

Additionally, being able to sort by domain would be good. Not per-window, but globally. Just a big list of tabs. I'm almost never looking for a particular window, but rather a particular tab of a specific site.

Another minor feature request is to put the total number of tabs as a badge number on the icon itself. I.e. instead of just showing tabist's icon, show the icon with "53" on it if I have 53 tabs open.

Or, y'know, it's pretty good how it is now, so feel free to just ignore this. :)

Thanks for the extension!


Thanks for the feedback!

Those are all good ideas and I am likely to implement them. I published the new version so it should be available within a few days for firefox and within a few hours for chrome.

If you have any other issues/feature requests/concerns you can submit an issues over here: https://github.com/fiveNinePlusR/tabist


Just updated to 0.1.6. Unfortunately the new shortcut doesn't seem to be working on OS X Chrome. Version info: 53.0.2785.116 (64-bit)

Is there any debugging or diagnostic info I can provide?

In addition to Command-Shift-E, I've tried all variants of control/option/command/shift E.

The favicon change was awesome. Globally sorting by domain seems a little less necessary now.

Thanks again for the extension / update. This is great!


Not sure why that's not working for you. Let me download it from the chrome store and see. it's working for me on chrome osx 64bit same version of chrome.

Perhaps try restarting chrome and if that doesn't work you can try uninstalling the extension and reinstalling it. I just got the extension from the chrome store and command-shift-E worked fine. there is also the possibility that you have command-shift-e shadowed by another command(system wide shortcut or another extension). try going to chrome:extensions and going to the very bottom and selecting "keyboard shortcuts" and changing the one labeled "Toggle or activate a Tabist tab" the Tabist entry.

feel free to email me at the email in my profile if that doesn't work or if you figured out what the issue was.

cheers!


Aha! Thanks for that.

I think the problem was that I had Tabist installed before, and so the suggested keybind didn't take effect when I upgraded to a new version. Not a big deal with only a few users.

I didn't know about the keyboard shortcut menu. Here's what it originally looked like: http://i.imgur.com/jmTInyL.png

Much appreciated.

EDIT: On second thought, I have Tampermonkey installed, which apparently defaults to Command-Shift-E: http://i.imgur.com/DAEvgNB.png I think that was shadowing it.

Yeah, this extension rocks! I'm going to use this forever.


> Yeah, this extension rocks! I'm going to use this forever.

Awesome :D

Shoot me an email or add an issue on github if you think of anything that might be worth adding.

cheers!


The only other feedback I have is that when you open Tabist and click on a tab, it'd be nice if you automatically close the tabist tab (and if possible to re-focus the previously active tab, which isn't necessarily the rightmost tab). Otherwise you end up with multiple windows with Tabist in focus.

This is fantastic though. I've been telling my friends about Tabist and everyone's saying how useful it is.


That's on my list of todo items... thanks for the feedback and the recommendations! :)


>885 tabs

is that intentional, or do you just never close tabs? How do you navigate tabs without losing your mind?


Well it's part laziness (and priortising) and part working on an abstraction layer for the DOM API which can be quite hairy (it is known :P). So I have 10 windows open in total.

I have lots and lots of pages open of DOM documentation from many sources and many GitHub code searches to see how others' code deals with the mess. ~30% tabs are probably StackOverflow. The rest is (potentially useful) Google searches, programming blog posts and the usual pinned tabs (Gmail etc.).

I use a AutoHotKey script to make the scroll wheel switch between tabs (this is the default behavior on Ubuntu but I'm on Window), this way I can quickly scroll/look for the desired tab through an entire 100-150 tab window in 10-15 seconds. Thinking of this.. I would have probably indeed gone insane without the AHK script.. (or just kept fewer tabs opened instinctively? :P).


Please share your autohotkey script!


or without losing his Chrome ? - to a crash, I mean. Idda thought it would crash well before 885.


This just seems like something that should've been fixed years ago


It was (in fact, it's not clear it was ever broken) That's why if you look at the linked bug report, the only reports are of people who have used third party installers as root that screw up the permissions.

The bug report is basically "when i screw this up, chrome doesn't notice and fix it for me".


I'm not at all sure how this excuses things. If there is a known state that can be reached by the browser, then either a) indicate why it cannot be fixed and give tips for the users or b) put in the code to fix it for the users.


Root can modify the filesystem arbitrarily. To what extent should developers proactively scan their own files for arbitrary changes by 3rd parties? How much work should go into this, rather than fixing other bugs or improving performance?


In this case, there is no need to proactively scan anymore. It was reported by users.

I stressed the wrong thing before. If it can not be fixed, say so.


How do you propose third parties modifying installers without Google's knowledge or permission something Google can fix?


I think GP is just suggesting that Google has had the knowledge about this specific 3rd party issue (via this bug) for years. It can't fix all possible 3rd party installer-induced issues, but it could potentially fix this one. (Or at least notify the user.)


Fair enough!


Does this only occur on Macs?


According to the linked bug it is due to an issue to the DivX installer messing with the users chrome install. I don't know if the DivX installer on other platform experiences this issue but it sounds likely that it is only the Mac installer that has this issue.


If you're using packages on Linux, the package manager is responsible for uninstalling the old version. For example, yum/dnf on Fedora/Redhat will only keep one version of a package during 'yum update' (with the exception of the kernel, where the most recent 3 versions as well as the running kernel are kept to avoid breaking boot).


Yeah, I'm on Xubuntu and I figured this would be handled by the package manager.


I'm almost certain I had a similar problem on Windows, though it was a few months, maybe a year ago.


I think so.

Never faced this issue in Windows and Linux


I had this same issue on XP running in a VM that wasn't set to grow on a Mac.


I installed mine through Homebrew (http://brew.sh/) Cask (https://caskroom.github.io/) and it is fine (only last two versions).


I'm going to post a theory that with 500Gb drives pretty much the normal size that most people won't notice 2.5% tied up in Chrome installs.


Even with 1TB disk space I'm resentful of the amount of space "leaked" by software. Maybe I'm a naz-, maybe I was born in the MB era.. can't say. The other day I booted a P3 era machine and seeing all we did with "just" 128MB made me feel chills all over.


I blame the perpetual-beta mentality along with lazy development practices.

Used to be, we specced out exactly what was in a release and no more. Now, it's just whatever they can cram in under a deadline without all that "unnecessary" optimization.

I'm probably as guilty as anyone else; I like getting a paycheck and so I keep my mouth shut, even though shit like that literally keeps me up some nights.


I see a few reasons: less compiled languages, more abstractions, more best practices, that means a lot of libs. I've seen Wirth pascal compiler, it's two files of a few hundreds of lines, but it's not decoupled in any way. Today most programs are larger than this because they compose lots of rules. It also brings false laziness, since you're not used to write short code, well you don't.


Except if you've bought a Lenovo 100s or similar, with 32GB of eMMC Flash storage. Then you'll cry.


My girlfriend was given a macbook air by her parents, and after OS and her normal programs were installed (office, chrome and not much else) she was left with 5G. 64G SSDs were common not very long ago, disk space for operational components is increasing.


128/256 GB SSDs are pretty common on Macs. For instance, the base models of the air still have 128 GB.


Perhaps. But my 128GB circa-2011 Macbook Air daily-driver is constantly full. As is my 256GB Macbook Pro work computer which has a 60GB Win7 VM just for running the VMware fat client and some Hitachi software.

With 500+GB I wouldn't care, because the media (photos/movies/etc) need to be stored elsewhere regardless.


Both Chrome and Opera pull this shit. It's unbelievable they aren't fixing this.


Indeed. They keep freezing my Ubuntu 14.04. I need to delete ~.config/xxx folder.


This is embarrassingly bad. I know memory is cheap and mostly plentiful, but to have this as a bug for 5+ years is horrible. It's as though Chrome is going the route of web pages and not paying to the size of itself.


This is prior versions of Chrome taking up disk space, not memory. That's a completely separate issue.


Fortunately disk space, unlike memory, is infinite.


A lot of our lapops at work (the majority, in fact) have ~240GB SSDs, so that's about 10% of their disks. Not insignificant.


I think your parent was being facetious


I'd much rather you use 21GB on my SSD than 2.1GB of my ram.


It's usually easier to reclaim RAM than storage. Which application am I not using right now? vs What data will I never need again?


Previous versions of chrome...


Hm. On some machines I only have 8x the SSD as RAM. I might take the 2.1GB to 21GB trade in that case :-).


Then don't use Chrome on those machines?


It's all up in the Cloud


21 GB is about 2% of a 1 TB drive. Not that ridiculous.


Embarrassing, obvious, multi-year bugs are common to all browsers though. In Firefox, bookmarklets on CSP pages have been broken for 3.5 years and counting, with the end nowhere in sight. A handful of bugs that have taken a while to fix is no way to judge the overall quality of the browser.


It's been a loooooooong time since I've seen the last useful bookmarklet in the wild.

Un-useful, however, was stuff that tried to hijack your FB/Twitter ("hey guys paste this in ur browser and get some n00dz in return"). The amounts of crazy stuff people do for supposed nudes or whatever is just astonishing


I have one in my work browser to redirect a journal’s website example.com to example.com.library.university.example.net in order to get the full access. Having a simple button for this made my life a lot easier, though I admit that it is somewhat of an unusual case.


You can admit it: it’s sci-hub


Actually, no, the library-provided full-access website for APS journals is much nicer. If I want a preprint, I can usually find it on arXiv and last time I looked at it, I found sci-hub to have a rather confusing interface.


Chrome has gone the way of IE. Chrome is memory and energy hungry (and now storage hungry if you believe this article), and Google doesn't care.

If you run Chrome on a laptop, you better plug it in.


Google “doesn't care” so much that they spent the last year working on battery life:

https://chrome.googleblog.com/2016/09/chrome-faster-and-more...


Thanks for correcting me. I had outdated impressions.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: