4 ms·
> Chrome is faster and more stable than PhantomJS. And it doesn't eat memory like crazy. Wait, can someone tell me where to download this doesn't-eat-memory-li
by Doctor_Fegg 10y ago
> Chrome is faster and more stable than PhantomJS. And it doesn't eat memory like crazy.
Wait, can someone tell me where to download this doesn't-eat-memory-like-crazy version of Chrome? Activity Monitor is showing me 2GB of Chrome processes right now and that's even with The Great Suspender having paused almost all my tabs.
- yebyen 10y agoI saw a trick where you can run Chrome and give it less memory, and it uses less memory. This is done using cgroups. The blog post is somewhat old[1] and not in sync with the version that is in Git[2], you might find a way to do this without Docker (I was using an old version of Docker and kernel that couldn't get it to work. But I need the old version of Docker for reasons.) Chrome will aggressively consume any memory you give it (up to a point?) to "make your browsing experience better" somehow. You're not wrong. But there is modern technology that can make it better. If you have a fast SSD, then Chrome can still use Swap to make your experience better. The later version in the Dockerfile linked on Git also leverages swapaccount with the seccomp setting. This may be one great use of Docker for people that wouldn't yet have been convinced to use Docker for any serious reason. [1]: https://blog.jessfraz.com/post/docker-containers-on-the-desktop/#5-chrome https://blog.jessfraz.com/post/docker-containers-on-the-desk... [2]: https://github.com/jessfraz/dockerfiles/blob/master/chrome/stable/Dockerfile https://github.com/jessfraz/dockerfiles/blob/master/chrome/s...
- tayo42 10y agoYou can just use cgroups on their own without docker
- tyingq 10y agoI would guess ulimit -v might work as well, so you may not even need cgroups.
- yebyen 10y agoHah! Something new is also something old. Thanks for that. But won't you run into issues with child processes, of which Chrome tends to spawn a zillion? (I'm reading that each one gets its own limit under ulimit...) And potentially get your browser killed when it hits the limit? I haven't tested this and I don't really know how ulimit works, but I think it's a less effective solution than the cgroups for at least one reason.
- tyingq 10y agoYes, it is per process, so it would only limit memory-per-tab. I believe you get the "aw snap" window in chrome if it hits the limit.
- Noseshine 10y agoI'm not sure that the results should be expected to be the same in GUI and in headless mode. I don't know - I'm just saying this is not clear without a test or clarification from someone who knows how it all works.
- robmcm 10y agoIs it Chrome eating memory of the websites you have visited? Suspended tabs suggests issues, which may not free up till you close them.
- kzisme 10y agoI'm assuming they are referring to: https://www.chromestatus.com/features/5678767817097216 https://www.chromestatus.com/features/5678767817097216 Or something pretty close to it.
- acdha 10y agoDisable your extensions one by one until you identify the one leaking memory.
- tokenizerrr 10y agoOr just look at the chrome process manager. Shift+Esc
- acdha 10y agoThat doesn't tell you if an extension is injecting code which causes a page to bloat significantly.
- tokenizerrr 10y agoAh right, good point.